ReactOS 0.4.15-dev-8138-g1e75ea8
ui.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS msctfime.ime
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: User Interface of msctfime.ime
5 * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#include "msctfime.h"
9
11
12/***********************************************************************/
13
24
27{
28 return (uMsg == WM_MSIME_SERVICE ||
29 uMsg == WM_MSIME_UIREADY ||
31 uMsg == WM_MSIME_RECONVERT ||
32 uMsg == WM_MSIME_DOCUMENTFEED ||
33 uMsg == WM_MSIME_QUERYPOSITION ||
34 uMsg == WM_MSIME_MODEBIAS ||
35 uMsg == WM_MSIME_SHOWIMEPAD ||
36 uMsg == WM_MSIME_MOUSE ||
37 uMsg == WM_MSIME_KEYMAP);
38}
39
42{
43 // Using ANSI (A) version here can reduce binary size.
46 WM_MSIME_RECONVERTREQUEST = RegisterWindowMessageA("MSIMEReconvertRequest");
48 WM_MSIME_DOCUMENTFEED = RegisterWindowMessageA("MSIMEDocumentFeed");
49 WM_MSIME_QUERYPOSITION = RegisterWindowMessageA("MSIMEQueryPosition");
52 WM_MSIME_MOUSE = RegisterWindowMessageA("MSIMEMouseOperation");
54 return (WM_MSIME_SERVICE &&
64}
65
66/***********************************************************************/
67
70 CDefCompFrameWindow *pDefCompFrameWindow,
72 DWORD style) : CUIFGripper(pDefCompFrameWindow, prc, style)
73{
74 m_pDefCompFrameWindow = pDefCompFrameWindow;
75}
76
77/***********************************************************************/
78
82 DWORD nObjectID,
85 DWORD dwButtonFlags,
86 LPCWSTR pszText)
87 : CUIFToolbarButton(pParent, nObjectID, prc, style, dwButtonFlags, pszText)
88{
90}
91
94{
96 if (hIcon)
97 {
100 }
101}
102
104void CCompFinalizeButton::OnLeftClick()
105{
107 if (hIMC)
109}
110
111/***********************************************************************/
112
116{
117 m_hIMC = hIMC;
118}
119
120/***********************************************************************/
121
124 : CCompFrameWindow(hIMC, style)
125{
126}
127
130{
132 return;
133
134 RECT rc = { 0, 0, 0, 0 };
135 m_pFinalizeButton = new(cicNoThrow) CCompFinalizeButton(this, 0, &rc, 0, 0x10000, NULL);
136
137 m_pFinalizeButton->Initialize();
139
142
143 WCHAR szText[256];
145 m_pFinalizeButton->SetToolTip(szText);
146
147 AddUIObj(m_pFinalizeButton);
148}
149
152{
155 Move(x, y, nWidth + 4, nHeight + 4);
156
158 {
159 RECT rc = { 1, 1, nWidth + 1, nHeight + 1 };
160 m_pFinalizeButton->SetRect(&rc);
161 }
162
163 Show(bShow);
164}
165
167STDMETHODIMP_(void) CCompButtonFrameWindow::OnCreate(HWND hWnd)
168{
169 ::SetWindowTheme(hWnd, L"TOOLBAR", NULL);
170
171 ZeroMemory(&m_Margins, sizeof(m_Margins));
172
173 CUIFTheme theme;
174 theme.m_hTheme = NULL;
175 theme.m_iPartId = 1;
176 theme.m_iStateId = 0;
177 theme.m_pszClassList = L"TOOLBAR";
179 theme.GetThemeMargins(NULL, 1, 3602, NULL, &m_Margins);
180}
181
182/***********************************************************************/
183
186 : CCompFrameWindow(hIMC, style)
187{
188 LoadPosition();
189 m_iPartId = 1;
190 m_iStateId = 1;
191 m_pszClassList = L"TASKBAR";
192}
193
196{
197 SavePosition();
198}
199
202{
203 RECT rc;
204
205 if (!m_pGripper)
206 {
207 ZeroMemory(&rc, sizeof(rc));
208 m_pGripper = new(cicNoThrow) CDefCompFrameGripper(this, &rc, 0);
209 m_pGripper->Initialize();
210 AddUIObj(m_pGripper);
211 }
212
214 {
215 ZeroMemory(&rc, sizeof(rc));
216 m_pFinalizeButton = new(cicNoThrow) CCompFinalizeButton(this, 0, &rc, 0, 0x10000, NULL);
217 m_pFinalizeButton->Initialize();
219
222
223 WCHAR szText[256];
225 SetToolTip(szText);
226
227 AddUIObj(m_pFinalizeButton);
228 }
229}
230
233{
235 return 5;
236
237 INT ret = -1;
239 SIZE partSize;
240 if (SUCCEEDED(m_pGripper->GetThemePartSize(hDC, 1, 0, TS_TRUE, &partSize)))
241 ret = partSize.cx + 4;
242
244
245 return ((ret < 0) ? 5 : ret);
246}
247
250{
251 if (ppt)
253
254 if (prc)
255 {
258 }
259}
260
263{
264 INT GripperWidth = GetGripperWidth();
265
266 RECT rc;
268
269 Move(rc.left, rc.top, GripperWidth + nWidth + 24, nHeight + 10);
270
271 if (m_pGripper)
272 {
273 rc = { 2, 3, GripperWidth + 2, nHeight + 7 };
274 m_pGripper->SetRect(&rc);
275 }
276
278 {
279 rc = {
280 GripperWidth + nWidth + 4,
281 3,
282 m_Margins.cxLeftWidth + m_Margins.cxRightWidth + GripperWidth + nWidth + 22,
284 };
285 m_pFinalizeButton->SetRect(&rc);
286 }
287
288 Show(bShow);
289
290 ::MoveWindow(m_hwndCompStr, GripperWidth + 2, 7, nWidth, nHeight, TRUE);
292}
293
296{
297 DWORD x = 0, y = 0;
298
300 CicRegKey regKey;
302 TEXT("SOFTWARE\\Microsoft\\CTF\\CUAS\\DefaultCompositionWindow"));
303 if (error == ERROR_SUCCESS)
304 {
305 regKey.QueryDword(TEXT("Left"), &x);
306 regKey.QueryDword(TEXT("Top"), &y);
307 }
308
309 Move(x, y, 0, 0);
310}
311
314{
316 CicRegKey regKey;
318 TEXT("SOFTWARE\\Microsoft\\CTF\\CUAS\\DefaultCompositionWindow"));
319 if (error == ERROR_SUCCESS)
320 {
321 regKey.SetDword(TEXT("Left"), m_nLeft);
322 regKey.SetDword(TEXT("Top"), m_nTop);
323 }
324}
325
327STDMETHODIMP_(void) CDefCompFrameWindow::OnCreate(HWND hWnd)
328{
329 ::SetWindowTheme(hWnd, L"TASKBAR", NULL);
330
331 ZeroMemory(&m_Margins, sizeof(m_Margins));
332
333 CUIFTheme theme;
334 theme.m_hTheme = NULL;
335 theme.m_iPartId = 1;
336 theme.m_iStateId = 0;
337 theme.m_pszClassList = L"TOOLBAR";
339 GetThemeMargins(NULL, 1, 3602, NULL, &m_Margins);
340}
341
343STDMETHODIMP_(BOOL) CDefCompFrameWindow::OnSetCursor(UINT uMsg, LONG x, LONG y)
344{
346 return FALSE;
347
348 RECT rc;
351 POINT pt = { x, y };
352 return ::PtInRect(&rc, pt);
353}
354
357CDefCompFrameWindow::OnWindowPosChanged(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
358{
359 CicIMCLock imcLock(m_hIMC);
360 if (SUCCEEDED(imcLock.m_hr))
361 ::SendMessage(imcLock.get().hWnd, WM_IME_NOTIFY, 0xF, (LPARAM)m_hIMC);
362 return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
363}
364
366STDMETHODIMP_(void) CDefCompFrameWindow::HandleMouseMsg(UINT uMsg, LONG x, LONG y)
367{
369 {
370 RECT rc;
373
374 POINT pt = { x, y };
375 if (::PtInRect(&rc, pt))
376 ::SendMessage(m_hwndCompStr, 0x7E8, 0, 0);
377 }
378
379 CUIFWindow::HandleMouseMsg(uMsg, x, y);
380}
381
382/***********************************************************************/
383
386{
387 return &m_PolyTextArray[iItem];
388}
389
392{
393 for (size_t iItem = 0; iItem < m_PolyTextArray.size(); ++iItem)
394 {
395 POLYTEXTW *pPolyText = &m_PolyTextArray[iItem];
396 pPolyText->x += xDelta;
397 pPolyText->y += yDelta;
398 ::OffsetRect((LPRECT)&pPolyText->rcl, xDelta, yDelta);
399 }
400 return S_OK;
401}
402
405{
406 size_t iItem, cItems = m_PolyTextArray.size();
407 if (!cItems)
408 return E_FAIL;
409
410 POLYTEXTW *pData1 = &m_PolyTextArray[cItems - 1];
411
412 for (iItem = 0; iItem < cItems; ++iItem)
413 {
414 POLYTEXTW *pData2 = &m_PolyTextArray[iItem];
415 if (bHorizontal)
416 {
417 if (pData1->x == pData2->x)
418 break;
419 }
420 else
421 {
422 if (pData1->y == pData2->y)
423 break;
424 }
425 }
426
427 if (iItem >= cItems)
428 return E_FAIL;
429
430 m_PolyTextArray.Remove(iItem, cItems - iItem);
431 m_ValueArray.Remove(iItem, cItems - iItem);
432 return S_OK;
433}
434
437{
438 m_PolyTextArray.clear();
440}
441
442/***********************************************************************/
443
446{
449}
450
451/***********************************************************************/
452
453// For GetWindowLongPtr/SetWindowLongPtr
454#define UICOMP_GWLP_INDEX 0
455#define UICOMP_GWLP_SIZE (UICOMP_GWLP_INDEX + sizeof(INT))
456
459{
460}
461
464{
466
467 if (m_hFont1)
468 {
470 m_hFont1 = NULL;
471 }
472
473 if (m_hFont2)
474 {
476 m_hFont2 = NULL;
477 }
478
479 if (m_strCompStr)
480 {
483 }
484
485 m_cchCompStr = 0;
486}
487
488// @implemented
490{
491 HWND hImeWnd = ImmGetDefaultIMEWnd(0);
492 if (!::IsWindow(hImeWnd))
493 return TRUE;
494 TLS *pTLS = TLS::GetTLS();
495 LRESULT ret;
496 if (pTLS && pTLS->m_cWnds > 1)
497 ret = ::SendMessage(imcLock.get().hWnd, WM_IME_NOTIFY, wParam, lParam);
498 else
500 return !ret;
501}
502
505{
507 {
510 return E_OUTOFMEMORY;
511 if (!m_pDefCompFrameWindow->Initialize())
512 {
515 return E_FAIL;
516 }
517
519 }
520
522 return S_OK;
523}
524
527{
528 TLS *pTLS = TLS::GetTLS();
529 if (!pTLS || !pTLS->NonEACompositionEnabled())
530 return S_OK;
531
532 if (IsEALang(0))
533 {
535 {
538 }
539 return S_OK;
540 }
541
543 {
546 return E_OUTOFMEMORY;
547
548 if (!m_pCompButtonFrameWindow->Initialize())
549 {
551 {
554 }
555 return E_FAIL;
556 }
557
559 }
560
562 return S_OK;
563}
564
567{
568 if (FAILED(imcLock.m_hr))
569 return imcLock.m_hr;
570
572 return E_FAIL;
573
574 for (INT iCompStr = 0; iCompStr < 3; ++iCompStr)
575 {
577 HWND hwndCompStr = ::CreateWindowExW(0, L"MSCTFIME Composition", NULL, style,
578 0, 0, 0, 0, hwndParent, NULL, g_hInst, NULL);
579 m_CompStrs[iCompStr].m_hWnd = hwndCompStr;
580 ::SetWindowLongPtrW(hwndCompStr, GWLP_USERDATA, (LONG_PTR)this);
581 ::SetWindowLongPtrW(hwndCompStr, UICOMP_GWLP_INDEX, iCompStr);
582 m_CompStrs[iCompStr].m_Caret.CreateCaret(hwndCompStr, m_CaretSize);
583 }
584
586 if (FAILED(hr))
587 {
589 return E_OUTOFMEMORY;
590 }
591
593 if (FAILED(hr))
594 {
596 return E_OUTOFMEMORY;
597 }
598
600 HWND hwndCompStr = ::CreateWindowExW(WS_EX_CLIENTEDGE, L"MSCTFIME Composition", NULL, style,
601 0, 0, 0, 0, *m_pDefCompFrameWindow, NULL, g_hInst, NULL);
602 if (!hwndCompStr)
603 {
605 return E_OUTOFMEMORY;
606 }
607
608 m_CompStrs[3].m_hWnd = hwndCompStr;
610 ::SetWindowLongPtrW(hwndCompStr, GWLP_USERDATA, (LONG_PTR)this);
611 ::SetWindowLongPtrW(hwndCompStr, UICOMP_GWLP_INDEX, -1);
612 m_CompStrs[3].m_Caret.CreateCaret(hwndCompStr, m_CaretSize);
614
615 return S_OK;
616}
617
620{
621 for (INT i = 0; i < 4; ++i)
622 {
623 COMPWND *pCompStr = &m_CompStrs[i];
624 pCompStr->m_Caret.DestroyCaret();
625 if (::IsWindow(pCompStr->m_hWnd))
626 {
627 DestroyWindow(pCompStr->m_hWnd);
628 pCompStr->m_PolyText.RemoveAll();
629 }
630 pCompStr->m_hWnd = NULL;
631 }
632
634 {
638 }
639
641 {
645 }
646
647 return 0;
648}
649
650// @implemented
652{
653 BOOL bValue = FALSE;
654 UIComposition::SendMessageToUI(imcLock, 0x11u, (LPARAM)&bValue);
655 return bValue;
656}
657
660{
661 if (FAILED(imcLock.m_hr))
662 return imcLock.m_hr;
663 if (!::IsWindow(imcLock.get().hWnd))
664 return E_FAIL;
665
666 CicIMCCLock<COMPOSITIONSTRING> compStr(imcLock.get().hCompStr);
667 if (FAILED(compStr.m_hr))
668 return compStr.m_hr;
669
670 if ((m_dwUnknown56[0] & 0x80000000) && compStr.get().dwCompStrLen)
672 else
674
675 if (pdwCompStrLen)
676 *pdwCompStrLen = compStr.get().dwCompStrLen;
677
678 return S_OK;
679}
680
683{
684 if (FAILED(imcLock.m_hr))
685 return imcLock.m_hr;
686
687 if (m_hFont1)
689 if (m_hFont2)
691
692 LOGFONTW lf = imcLock.get().lfFont.W;
694
695 lf.lfEscapement = 0;
696 lf.lfOrientation = 0;
697 BOOL bVertical = (lf.lfFaceName[0] == L'@');
698 if (bVertical)
699 {
700 MoveMemory(lf.lfFaceName, &lf.lfFaceName[1], sizeof(lf.lfFaceName) - sizeof(WCHAR));
702 }
704
705 return S_OK;
706}
707
708// @implemented
710{
712 if (iCompStr == -1)
714 else
715 m_CompStrs[iCompStr].m_Caret.OnTimer();
716}
717
720{
721 return !UIComposition::SendMessageToUI(imcLock, 0x14, lParam);
722}
723
726{
727 if (!m_strCompStr)
728 {
729 m_strCompStr = (LPWSTR)cicMemAllocClear((cchStr + 1) * sizeof(WCHAR));
730 m_cchCompStr = cchStr;
731 }
732 if (m_cchCompStr < cchStr)
733 {
734 m_strCompStr = (LPWSTR)cicMemReAlloc(m_strCompStr, (cchStr + 1) * sizeof(WCHAR));
735 m_cchCompStr = cchStr;
736 }
737 return m_strCompStr;
738}
739
742{
743 //FIXME
744}
745
748{
749 m_dwUnknown56[0] |= 0x8000;
751}
752
755{
756 m_dwUnknown56[0] = 0;
758}
759
762{
763 //FIXME
764}
765
768{
769 //FIXME
770}
771
774{
776}
777
781{
782 if (uMsg == WM_CREATE)
783 return -1; // FIXME
784 return 0;
785}
786
789{
790 return UpdateCompositionRect(imcLock);
791}
792
795{
796 return E_NOTIMPL;
797}
798
801{
802 DWORD dwStyle = imcLock.get().cfCompForm.dwStyle;
803 if (dwStyle == CFS_DEFAULT)
804 return 1;
805 if (!(dwStyle & (CFS_FORCE_POSITION | CFS_POINT | CFS_RECT)))
806 return 0;
807
808 RECT rc;
809 ::GetClientRect(imcLock.get().hWnd, &rc);
810 if (!::PtInRect(&rc, imcLock.get().cfCompForm.ptCurrentPos))
811 return 1;
812
813 INPUTCONTEXT *pIC = &imcLock.get();
814 if ((pIC->cfCompForm.dwStyle & CFS_RECT) &&
815 (pIC->cfCompForm.rcArea.top == pIC->cfCompForm.rcArea.bottom) &&
817 {
818 return 1;
819 }
820
821 return 2;
822}
823
826{
828 {
829 m_dwUnknown56[0] &= ~0x8000;
830 return S_OK;
831 }
832
833 if (FAILED(imcLock.m_hr))
834 return imcLock.m_hr;
835
836 INT Level = GetLevelFromIMC(imcLock);
837 if ((Level == 1 || Level == 2) && (m_dwUnknown56[0] & 0x80000000) && m_dwUnknown56[1])
838 {
839 DWORD dwCompStrLen = 0;
840 UpdateShowCompWndFlag(imcLock, &dwCompStrLen);
841
842 if (Level == 1)
843 {
845 }
846 else if (Level == 2 && !m_bHasCompStr && dwCompStrLen)
847 {
848 for (INT iCompStr = 0; iCompStr < 3; ++iCompStr)
849 {
850 m_CompStrs[iCompStr].m_Caret.HideCaret();
851 ::ShowWindow(m_CompStrs[iCompStr].m_Caret, SW_HIDE);
852 }
853 }
854 }
855 else
856 {
858
859 for (INT iCompStr = 0; iCompStr < 3; ++iCompStr)
860 {
861 m_CompStrs[iCompStr].m_Caret.HideCaret();
862 ::ShowWindow(m_CompStrs[iCompStr].m_Caret, SW_HIDE);
863 }
864 }
865
866 return S_OK;
867}
868
869/***********************************************************************/
870
871// For GetWindowLongPtr/SetWindowLongPtr
872#define UI_GWLP_HIMC 0
873#define UI_GWLP_UI sizeof(HIMC)
874#define UI_GWLP_SIZE (UI_GWLP_UI + sizeof(UI*))
875
878{
879}
880
883{
884 delete m_pComp;
885}
886
889{
891 if (!m_pComp)
892 return E_OUTOFMEMORY;
893
895 return S_OK;
896}
897
900{
903}
904
907{
909 if (pUI)
910 return;
911 pUI = new(cicNoThrow) UI(hWnd);
912 if (pUI)
913 pUI->_Create();
914}
915
918{
920 if (!pUI)
921 return;
922
923 pUI->_Destroy();
924 delete pUI;
925}
926
929{
931}
932
933/***********************************************************************/
934
936{
946};
947
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}
983
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}
1006
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}
1025
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}
1066
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}
1099
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}
1124
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}
1141
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}
1230
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}
1339
1340/***********************************************************************/
1341
1345 _In_ HWND hWnd,
1346 _In_ UINT uMsg,
1349{
1351}
1352
1353/***********************************************************************/
1354
1357{
1358 WNDCLASSEXW wcx;
1359
1360 if (!GetClassInfoExW(g_hInst, L"MSCTFIME UI", &wcx))
1361 {
1362 ZeroMemory(&wcx, sizeof(wcx));
1363 wcx.cbSize = sizeof(WNDCLASSEXW);
1365 wcx.hIcon = LoadIconW(0, (LPCWSTR)IDC_ARROW);
1366 wcx.hInstance = g_hInst;
1369 wcx.style = CS_IME | CS_GLOBALCLASS;
1370 wcx.lpfnWndProc = UIWndProc;
1371 wcx.lpszClassName = L"MSCTFIME UI";
1372 if (!RegisterClassExW(&wcx))
1373 return FALSE;
1374 }
1375
1376 if (!GetClassInfoExW(g_hInst, L"MSCTFIME Composition", &wcx))
1377 {
1378 ZeroMemory(&wcx, sizeof(wcx));
1379 wcx.cbSize = sizeof(WNDCLASSEXW);
1381 wcx.hIcon = NULL;
1382 wcx.hInstance = g_hInst;
1387 wcx.lpszClassName = L"MSCTFIME Composition";
1388 if (!RegisterClassExW(&wcx))
1389 return FALSE;
1390 }
1391
1392 return TRUE;
1393}
1394
1397{
1398 WNDCLASSEXW wcx;
1399
1400 GetClassInfoExW(g_hInst, L"MSCTFIME UI", &wcx);
1401 UnregisterClassW(L"MSCTFIME UI", g_hInst);
1402 DestroyIcon(wcx.hIcon);
1403 DestroyIcon(wcx.hIconSm);
1404
1405 GetClassInfoExW(g_hInst, L"MSCTFIME Composition", &wcx);
1406 UnregisterClassW(L"MSCTFIME Composition", g_hInst);
1407 DestroyIcon(wcx.hIcon);
1408 DestroyIcon(wcx.hIconSm);
1409}
static HDC hDC
Definition: 3dtext.c:33
@ TS_TRUE
Arabic default style
Definition: afstyles.h:94
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define EXTERN_C
Definition: basetyps.h:12
#define cicNoThrow
Definition: cicbase.h:34
static void cicMemFree(LPVOID ptr)
Definition: cicbase.h:27
static LPVOID cicMemReAlloc(LPVOID ptr, SIZE_T newSize)
Definition: cicbase.h:20
static LPVOID cicMemAllocClear(SIZE_T size)
Definition: cicbase.h:15
CCompButtonFrameWindow(HIMC hIMC, DWORD style)
@implemented
Definition: ui.cpp:123
MARGINS m_Margins
Definition: ui.h:79
void Init()
@implemented
Definition: ui.cpp:129
CCompFinalizeButton * m_pFinalizeButton
Definition: ui.h:80
void MoveShow(LONG x, LONG y, BOOL bShow)
@implemented
Definition: ui.cpp:151
~CCompFinalizeButton() override
@implemented
Definition: ui.cpp:93
CCompFinalizeButton(CCompFrameWindow *pParent, DWORD nObjectID, LPCRECT prc, DWORD style, DWORD dwButtonFlags, LPCWSTR pszText)
@implemented
Definition: ui.cpp:80
CCompFrameWindow * m_pCompFrameWindow
Definition: ui.h:50
HIMC m_hIMC
Definition: ui.h:69
CCompFrameWindow(HIMC hIMC, DWORD style)
@implemented
Definition: ui.cpp:114
CDefCompFrameGripper(CDefCompFrameWindow *pDefCompFrameWindow, LPCRECT prc, DWORD style)
@implemented
Definition: ui.cpp:69
CDefCompFrameWindow * m_pDefCompFrameWindow
Definition: ui.h:40
void MyScreenToClient(LPPOINT ppt, LPRECT prc)
@implemented
Definition: ui.cpp:249
CDefCompFrameGripper * m_pGripper
Definition: ui.h:96
void SetCompStrRect(INT nWidth, INT nHeight, BOOL bShow)
@implemented
Definition: ui.cpp:262
void SavePosition()
@implemented
Definition: ui.cpp:313
CDefCompFrameWindow(HIMC hIMC, DWORD style)
@implemented
Definition: ui.cpp:185
INT GetGripperWidth()
@implemented
Definition: ui.cpp:232
~CDefCompFrameWindow() override
@implemented
Definition: ui.cpp:195
MARGINS m_Margins
Definition: ui.h:98
UINT WPARAM wParam
Definition: ui.h:114
CCompFinalizeButton * m_pFinalizeButton
Definition: ui.h:97
void LoadPosition()
@implemented
Definition: ui.cpp:295
void Init()
@implemented
Definition: ui.cpp:201
HWND m_hwndCompStr
Definition: ui.h:95
HRESULT m_hr
Definition: cicimc.h:32
HIMC m_hIMC
Definition: cicimc.h:95
HRESULT m_hr
Definition: cicimc.h:96
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
LPCRECT prc
Definition: cicuif.h:230
LPCWSTR m_pszClassList
Definition: cicuif.h:90
STDMETHOD() GetThemeMargins(HDC hDC, int iStateId, int iPropId, LPRECT prc, MARGINS *pMargins)
Definition: cicuif.cpp:178
HRESULT InternalOpenThemeData(HWND hWnd)
Definition: cicuif.cpp:66
INT m_iStateId
Definition: cicuif.h:92
INT m_iPartId
Definition: cicuif.h:91
STDMETHOD() GetThemePartSize(HDC hDC, int iStateId, LPRECT prc, THEMESIZE eSize, SIZE *psz)
Definition: cicuif.cpp:154
HTHEME m_hTheme
Definition: cicuif.h:93
HRESULT EnsureThemeData(HWND hWnd)
Definition: cicuif.cpp:77
void SetIcon(HICON hIcon)
Definition: cicuif.cpp:3525
UINT WPARAM LPARAM lParam
Definition: cicuif.h:590
INT m_nTop
Definition: cicuif.h:514
INT INT nWidth
Definition: cicuif.h:563
INT INT INT nHeight
Definition: cicuif.h:563
INT m_nLeft
Definition: cicuif.h:513
HWND m_hWnd
Definition: cicuif.h:518
void clear()
Definition: cicarray.h:36
void Remove(size_t iItem, size_t cRemove=1)
Definition: cicarray.cpp:57
void HideCaret()
Definition: ciccaret.cpp:57
void DestroyCaret()
Definition: ciccaret.cpp:47
void OnTimer()
Definition: ciccaret.cpp:80
void CreateCaret(HWND hWnd, SIZE size)
Definition: ciccaret.cpp:36
T_DATA & get() const
Definition: cicimc.h:68
INPUTCONTEXTDX & get() const
Definition: cicimc.h:165
ITfContextOwnerServices * m_pContextOwnerServices
Definition: inputcontext.h:84
HRESULT SetupReconvertString(CicIMCLock &imcLock, ITfThreadMgr_P *pThreadMgr, UINT uCodePage, UINT uMsg, BOOL bUndo)
@unimplemented
HRESULT DelayedReconvertFuncCall(CicIMCLock &imcLock)
@unimplemented
void ClearPrevCandidatePos()
HRESULT EscbClearDocFeedBuffer(CicIMCLock &imcLock, BOOL bFlag)
@unimplemented
HRESULT EndReconvertString(CicIMCLock &imcLock)
@unimplemented
CModeBias m_ModeBias
Definition: inputcontext.h:94
DWORD m_dwUnknown7[5]
Definition: inputcontext.h:101
HRESULT MsImeMouseHandler(DWORD dwUnknown58, DWORD dwUnknown59, UINT keys, CicIMCLock &imcLock)
@unimplemented
HRESULT GetLangId(_Out_ LANGID *pLangID)
@implemented
Definition: profile.cpp:114
LSTATUS SetDword(LPCTSTR pszValueName, DWORD dwValue)
Definition: cicreg.h:67
LSTATUS Open(HKEY hKey, LPCTSTR lpSubKey, REGSAM samDesired=KEY_READ)
Definition: cicreg.h:51
LSTATUS Create(HKEY hKey, LPCTSTR lpSubKey)
Definition: cicreg.h:56
LSTATUS QueryDword(LPCTSTR pszValueName, LPDWORD pdwValue)
Definition: cicreg.h:61
Definition: tls.h:14
DWORD m_dwSystemInfoFlags
Definition: tls.h:18
ITfThreadMgr_P * m_pThreadMgr
Definition: tls.h:21
static TLS * GetTLS()
@implemented
Definition: tls.cpp:32
BOOL NonEACompositionEnabled()
@implemented
Definition: tls.cpp:91
CicProfile * m_pProfile
Definition: tls.h:20
DWORD m_cWnds
Definition: tls.h:28
BOOL m_bInComposition
Definition: ui.h:160
HRESULT UpdateCompositionRect(CicIMCLock &imcLock)
@unimplemented
Definition: ui.cpp:794
INT GetLevelFromIMC(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:800
static BOOL GetImeUIWndTextExtent(CicIMCLock &imcLock, LPARAM lParam)
@implemented
Definition: ui.cpp:719
static BOOL InquireImeUIWndState(CicIMCLock &imcLock)
Definition: ui.cpp:651
HRESULT DestroyCompositionWindow()
@implemented
Definition: ui.cpp:619
HRESULT CreateDefFrameWnd(HWND hwndParent, HIMC hIMC)
@implemented
Definition: ui.cpp:504
INT m_cchCompStr
Definition: ui.h:159
virtual ~UIComposition()
@implemented
Definition: ui.cpp:463
void OnImeStartComposition(CicIMCLock &imcLock, HWND hUIWnd)
@unimplemented
Definition: ui.cpp:741
LPWSTR GetCompStrBuffer(INT cchStr)
@implemented
Definition: ui.cpp:725
BOOL m_bHasCompStr
Definition: ui.h:161
HRESULT UpdateFont(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:682
BOOL m_bHasCompWnd
Definition: ui.h:150
HRESULT OnImeSetContextAfter(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:825
CCompButtonFrameWindow * m_pCompButtonFrameWindow
Definition: ui.h:163
UIComposition(HWND hwndParent)
@unimplemented
Definition: ui.cpp:458
static BOOL SendMessageToUI(CicIMCLock &imcLock, WPARAM wParam, LPARAM lParam)
Definition: ui.cpp:489
HRESULT OnDestroy()
@implemented
Definition: ui.cpp:773
void OnImeSetContext(CicIMCLock &imcLock, HWND hUIWnd, WPARAM wParam, LPARAM lParam)
@unimplemented
Definition: ui.cpp:761
HFONT m_hFont1
Definition: ui.h:152
HRESULT OnImeNotifySetCompositionWindow(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:788
SIZE m_CaretSize
Definition: ui.h:156
HRESULT CreateCompositionWindow(CicIMCLock &imcLock, HWND hwndParent)
@implemented
Definition: ui.cpp:566
DWORD m_dwUnknown56[2]
Definition: ui.h:157
COMPWND m_CompStrs[4]
Definition: ui.h:151
HFONT m_hFont2
Definition: ui.h:154
CDefCompFrameWindow * m_pDefCompFrameWindow
Definition: ui.h:162
LPWSTR m_strCompStr
Definition: ui.h:158
HRESULT OnImeEndComposition()
@unimplemented
Definition: ui.cpp:754
HRESULT UpdateShowCompWndFlag(CicIMCLock &imcLock, DWORD *pdwCompStrLen)
@implemented
Definition: ui.cpp:659
void OnTimer(HWND hWnd)
Definition: ui.cpp:709
HRESULT CreateCompButtonWnd(HWND hwndParent, HIMC hIMC)
@implemented
Definition: ui.cpp:526
HRESULT OnImeCompositionUpdate(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:747
void OnPaintTheme(WPARAM wParam)
@unimplemented
Definition: ui.cpp:767
static LRESULT CALLBACK CompWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
@unimplemented
Definition: ui.cpp:780
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
HINSTANCE g_hInst
Definition: ctfmon.cpp:23
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
DWORD HIMC
Definition: dimm.idl:75
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDI_DOWN
Definition: resource.h:11
BOOL IsEALang(_In_opt_ LANGID LangID)
Definition: misc.cpp:14
#define IDS_FINALIZE_STRING
Definition: resource.h:15
#define CALLBACK
Definition: compat.h:35
HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd)
Definition: ime.c:890
BOOL WINAPI ImmNotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD_PTR dwValue)
Definition: ime.c:907
HRESULT WINAPI GetThemeMargins(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, RECT *prc, MARGINS *pMargins)
Definition: property.c:216
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxObject * pParent
Definition: fxdpcapi.cpp:86
pKey DeleteObject()
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define CFS_RECT
Definition: imm.h:324
#define CFS_FORCE_POSITION
Definition: imm.h:326
#define IMN_SETCOMPOSITIONFONT
Definition: imm.h:381
#define IMN_CLOSECANDIDATE
Definition: imm.h:375
#define CPS_COMPLETE
Definition: imm.h:178
#define CFS_DEFAULT
Definition: imm.h:323
#define CFS_POINT
Definition: imm.h:325
#define IMN_OPENCANDIDATE
Definition: imm.h:376
#define GCS_COMPSTR
Definition: imm.h:227
#define IMN_SETCOMPOSITIONWINDOW
Definition: imm.h:382
#define IMN_SETCANDIDATEPOS
Definition: imm.h:380
#define IME_SYSINFO_WINLOGON
Definition: immdev.h:409
#define NI_COMPOSITIONSTR
Definition: immdev.h:403
HRESULT OnAttributeChange([in] REFGUID rguidAttribute)
ULONG AddRef()
ULONG Release()
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define HIBYTE(W)
Definition: jmemdos.c:486
#define TEXT(s)
Definition: k32.h:26
USHORT LANGID
Definition: mui.h:9
const GUID * guid
#define error(str)
Definition: mkdosfs.c:1605
static HDC
Definition: imagelist.c:92
static HICON
Definition: imagelist.c:84
#define _In_
Definition: ms_sal.h:308
HICON hIcon
Definition: msconfig.c:44
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define UNICODE_NULL
_Out_ LPRECT prc
Definition: ntgdi.h:1658
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_POPUP
Definition: pedump.c:616
long LONG
Definition: pedump.c:60
#define WS_DISABLED
Definition: pedump.c:621
#define INT
Definition: polytest.cpp:20
#define PRIMARYLANGID(l)
Definition: nls.h:16
#define LANG_KOREAN
Definition: nls.h:84
HRESULT hr
Definition: shlfolder.c:183
#define _countof(array)
Definition: sndvol32.h:70
static LRESULT CALLBACK ImeUIWndProcWorker(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:1233
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
static LRESULT CALLBACK ImeUIMsImeHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:1102
static LRESULT CALLBACK ImeUINotifyHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
@unimplemented
Definition: ui.cpp:1144
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 ImeUIDelayedReconvertFuncCall(HWND hWnd)
@implemented
Definition: ui.cpp:1127
static HRESULT CALLBACK ImeUIMsImeMouseHandler(HWND hWnd, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:950
RECT rcArea
Definition: dimm.idl:88
DWORD dwStyle
Definition: dimm.idl:86
Definition: ui.h:135
CPolyText m_PolyText
Definition: ui.h:137
HWND m_hWnd
Definition: ui.h:136
CicCaret m_Caret
Definition: ui.h:138
void _ClientToScreen(LPRECT prc)
@implemented
Definition: ui.cpp:445
HRESULT RemoveLastLine(BOOL bHorizontal)
@implemented
Definition: ui.cpp:404
CicArray< POLYTEXTW > m_PolyTextArray
Definition: ui.h:123
CicArray< DWORD > m_ValueArray
Definition: ui.h:124
HRESULT ShiftPolyText(INT xDelta, INT yDelta)
@implemented
Definition: ui.cpp:391
POLYTEXTW * GetPolyAt(INT iItem)
@implemented
Definition: ui.cpp:385
void RemoveAll()
@implemented
Definition: ui.cpp:436
HIMCC hCtfImeContext
Definition: imm32_undoc.h:166
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
LONG lfOrientation
Definition: dimm.idl:62
LONG lfEscapement
Definition: dimm.idl:61
Definition: ui.h:200
virtual ~UI()
@implemented
Definition: ui.cpp:882
void OnImeSetContext(CicIMCLock &imcLock, WPARAM wParam, LPARAM lParam)
@implemented
Definition: ui.cpp:928
UI(HWND hWnd)
@implemented
Definition: ui.cpp:877
HWND m_hWnd
Definition: ui.h:201
void _Destroy()
@implemented
Definition: ui.cpp:899
static void OnCreate(HWND hWnd)
@implemented
Definition: ui.cpp:906
static void OnDestroy(HWND hWnd)
@implemented
Definition: ui.cpp:917
HRESULT _Create()
@implemented
Definition: ui.cpp:888
UIComposition * m_pComp
Definition: ui.h:202
int cyBottomHeight
Definition: misc.c:283
int cyTopHeight
Definition: misc.c:282
int cxRightWidth
Definition: misc.c:281
int cxLeftWidth
Definition: misc.c:280
RECT rcl
Definition: wingdi.h:2566
LONG cx
Definition: kdterminal.h:27
LPCWSTR lpszClassName
Definition: winuser.h:3226
HBRUSH hbrBackground
Definition: winuser.h:3224
WNDPROC lpfnWndProc
Definition: winuser.h:3218
UINT cbSize
Definition: winuser.h:3216
int cbWndExtra
Definition: winuser.h:3220
HCURSOR hCursor
Definition: winuser.h:3223
HICON hIconSm
Definition: winuser.h:3227
HINSTANCE hInstance
Definition: winuser.h:3221
UINT style
Definition: winuser.h:3217
HICON hIcon
Definition: winuser.h:3222
COMPOSITIONFORM cfCompForm
Definition: immdev.h:139
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define GWLP_USERDATA
Definition: treelist.c:63
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
UINT WM_MSIME_RECONVERTREQUEST
Definition: ui.cpp:16
UINT WM_MSIME_DOCUMENTFEED
Definition: ui.cpp:18
BOOL RegisterImeClass(VOID)
@implemented
Definition: ui.cpp:1356
UINT WM_MSIME_UIREADY
Definition: ui.cpp:15
#define UI_GWLP_SIZE
Definition: ui.cpp:874
BOOL IsMsImeMessage(_In_ UINT uMsg)
@implemented
Definition: ui.cpp:26
#define UICOMP_GWLP_INDEX
Definition: ui.cpp:454
UINT WM_MSIME_SHOWIMEPAD
Definition: ui.cpp:21
UINT WM_MSIME_MODEBIAS
Definition: ui.cpp:20
UINT WM_MSIME_KEYMAP
Definition: ui.cpp:23
UINT WM_MSIME_RECONVERT
Definition: ui.cpp:17
#define UICOMP_GWLP_SIZE
Definition: ui.cpp:455
UINT WM_MSIME_SERVICE
Definition: ui.cpp:14
#define UI_GWLP_UI
Definition: ui.cpp:873
UINT WM_MSIME_MOUSE
Definition: ui.cpp:22
#define UI_GWLP_HIMC
Definition: ui.cpp:872
EXTERN_C LRESULT CALLBACK UIWndProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
@implemented
Definition: ui.cpp:1344
UINT WM_MSIME_QUERYPOSITION
Definition: ui.cpp:19
BOOL RegisterMSIMEMessage(VOID)
@implemented
Definition: ui.cpp:41
STDMETHODIMP_(void) CCompButtonFrameWindow
@implemented
Definition: ui.cpp:167
VOID UnregisterImeClass(VOID)
@implemented
Definition: ui.cpp:1396
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
int ret
_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
#define ZeroMemory
Definition: winbase.h:1712
#define MoveMemory
Definition: winbase.h:1709
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define NULL_BRUSH
Definition: wingdi.h:901
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
#define HKEY_CURRENT_USER
Definition: winreg.h:11
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define MK_RBUTTON
Definition: winuser.h:2368
#define CS_VREDRAW
Definition: winuser.h:658
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define MK_SHIFT
Definition: winuser.h:2369
#define SW_HIDE
Definition: winuser.h:768
UINT WINAPI RegisterWindowMessageA(_In_ LPCSTR)
#define GetWindowLongPtrW
Definition: winuser.h:4829
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define CS_IME
Definition: winuser.h:659
#define WM_IME_NOTIFY
Definition: winuser.h:1830
#define IMAGE_ICON
Definition: winuser.h:212
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WM_CREATE
Definition: winuser.h:1608
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define CS_HREDRAW
Definition: winuser.h:653
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2234
#define IDC_ARROW
Definition: winuser.h:687
#define SW_SHOWNOACTIVATE
Definition: winuser.h:774
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2136
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_IME_SETCONTEXT
Definition: winuser.h:1829
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define MK_MBUTTON
Definition: winuser.h:2371
#define WM_TIMER
Definition: winuser.h:1742
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define SendMessage
Definition: winuser.h:5843
#define IDC_IBEAM
Definition: winuser.h:688
HDC WINAPI GetDC(_In_opt_ HWND)
#define PostMessage
Definition: winuser.h:5832
#define CS_GLOBALCLASS
Definition: winuser.h:652
#define MK_LBUTTON
Definition: winuser.h:2367
struct _WNDCLASSEXW WNDCLASSEXW
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define WM_IME_SELECT
Definition: winuser.h:1833
#define WM_DESTROY
Definition: winuser.h:1609
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define WM_ENDSESSION
Definition: winuser.h:1627
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
Definition: winuser.h:5346
BOOL WINAPI DestroyWindow(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2106
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2084
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193