ReactOS 0.4.15-dev-8222-g9164419
UIComposition Class Reference

#include <ui.h>

Collaboration diagram for UIComposition:

Public Member Functions

 UIComposition (HWND hwndParent)
 @unimplemented
 
virtual ~UIComposition ()
 @implemented
 
HRESULT CreateDefFrameWnd (HWND hwndParent, HIMC hIMC)
 @implemented
 
HRESULT CreateCompButtonWnd (HWND hwndParent, HIMC hIMC)
 @implemented
 
HRESULT CreateCompositionWindow (CicIMCLock &imcLock, HWND hwndParent)
 @implemented
 
HRESULT DestroyCompositionWindow ()
 @implemented
 
HRESULT UpdateShowCompWndFlag (CicIMCLock &imcLock, DWORD *pdwCompStrLen)
 @implemented
 
HRESULT UpdateFont (CicIMCLock &imcLock)
 @implemented
 
HRESULT UpdateCompositionRect (CicIMCLock &imcLock)
 @unimplemented
 
LPWSTR GetCompStrBuffer (INT cchStr)
 @implemented
 
INT GetLevelFromIMC (CicIMCLock &imcLock)
 @implemented
 
void OnImeStartComposition (CicIMCLock &imcLock, HWND hUIWnd)
 @unimplemented
 
HRESULT OnImeCompositionUpdate (CicIMCLock &imcLock)
 @implemented
 
HRESULT OnImeEndComposition ()
 @unimplemented
 
HRESULT OnImeNotifySetCompositionWindow (CicIMCLock &imcLock)
 @implemented
 
HRESULT OnImeSetContextAfter (CicIMCLock &imcLock)
 @implemented
 
void OnImeSetContext (CicIMCLock &imcLock, HWND hUIWnd, WPARAM wParam, LPARAM lParam)
 @unimplemented
 
void OnPaintTheme (WPARAM wParam)
 @unimplemented
 
void OnTimer (HWND hWnd)
 
HRESULT OnDestroy ()
 @implemented
 

Static Public Member Functions

static BOOL SendMessageToUI (CicIMCLock &imcLock, WPARAM wParam, LPARAM lParam)
 
static BOOL InquireImeUIWndState (CicIMCLock &imcLock)
 
static BOOL GetImeUIWndTextExtent (CicIMCLock &imcLock, LPARAM lParam)
 @implemented
 
static LRESULT CALLBACK CompWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 @unimplemented
 

Public Attributes

HWND m_hwndParent
 
BOOL m_bHasCompWnd
 
COMPWND m_CompStrs [4]
 
HFONT m_hFont1
 
DWORD m_dwUnknown54
 
HFONT m_hFont2
 
DWORD m_dwUnknown55
 
SIZE m_CaretSize
 
DWORD m_dwUnknown56 [2]
 
LPWSTR m_strCompStr
 
INT m_cchCompStr
 
BOOL m_bInComposition
 
BOOL m_bHasCompStr
 
CDefCompFrameWindowm_pDefCompFrameWindow
 
CCompButtonFrameWindowm_pCompButtonFrameWindow
 

Detailed Description

Definition at line 146 of file ui.h.

Constructor & Destructor Documentation

◆ UIComposition()

UIComposition::UIComposition ( HWND  hwndParent)

@unimplemented

Definition at line 458 of file ui.cpp.

459{
460}

◆ ~UIComposition()

UIComposition::~UIComposition ( )
virtual

@implemented

Definition at line 463 of file ui.cpp.

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}
static void cicMemFree(LPVOID ptr)
Definition: cicbase.h:27
HRESULT DestroyCompositionWindow()
@implemented
Definition: ui.cpp:619
INT m_cchCompStr
Definition: ui.h:159
HFONT m_hFont1
Definition: ui.h:152
HFONT m_hFont2
Definition: ui.h:154
LPWSTR m_strCompStr
Definition: ui.h:158
#define NULL
Definition: types.h:112
pKey DeleteObject()

Member Function Documentation

◆ CompWndProc()

LRESULT CALLBACK UIComposition::CompWndProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

@unimplemented

Definition at line 780 of file ui.cpp.

781{
782 if (uMsg == WM_CREATE)
783 return -1; // FIXME
784 return 0;
785}
#define WM_CREATE
Definition: winuser.h:1608

Referenced by RegisterImeClass().

◆ CreateCompButtonWnd()

HRESULT UIComposition::CreateCompButtonWnd ( HWND  hwndParent,
HIMC  hIMC 
)

@implemented

Definition at line 526 of file ui.cpp.

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}
#define cicNoThrow
Definition: cicbase.h:34
void Init()
@implemented
Definition: ui.cpp:129
Definition: tls.h:14
static TLS * GetTLS()
@implemented
Definition: tls.cpp:32
BOOL NonEACompositionEnabled()
@implemented
Definition: tls.cpp:91
CCompButtonFrameWindow * m_pCompButtonFrameWindow
Definition: ui.h:163
static HWND hwndParent
Definition: cryptui.c:300
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_FAIL
Definition: ddrawi.h:102
BOOL IsEALang(_In_opt_ LANGID LangID)
Definition: misc.cpp:14
#define S_OK
Definition: intsafe.h:52

Referenced by CreateCompositionWindow().

◆ CreateCompositionWindow()

HRESULT UIComposition::CreateCompositionWindow ( CicIMCLock imcLock,
HWND  hwndParent 
)

@implemented

Definition at line 566 of file ui.cpp.

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}
Arabic default style
Definition: afstyles.h:94
HWND m_hwndCompStr
Definition: ui.h:95
HIMC m_hIMC
Definition: cicimc.h:95
HRESULT m_hr
Definition: cicimc.h:96
void CreateCaret(HWND hWnd, SIZE size)
Definition: ciccaret.cpp:36
HRESULT CreateDefFrameWnd(HWND hwndParent, HIMC hIMC)
@implemented
Definition: ui.cpp:504
BOOL m_bHasCompWnd
Definition: ui.h:150
SIZE m_CaretSize
Definition: ui.h:156
COMPWND m_CompStrs[4]
Definition: ui.h:151
CDefCompFrameWindow * m_pDefCompFrameWindow
Definition: ui.h:162
HRESULT CreateCompButtonWnd(HWND hwndParent, HIMC hIMC)
@implemented
Definition: ui.cpp:526
HINSTANCE g_hInst
Definition: ctfmon.cpp:23
#define TRUE
Definition: types.h:120
unsigned long DWORD
Definition: ntddk_ex.h:95
#define FAILED(hr)
Definition: intsafe.h:51
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define L(x)
Definition: ntvdm.h:50
#define WS_CHILD
Definition: pedump.c:617
#define WS_POPUP
Definition: pedump.c:616
#define WS_DISABLED
Definition: pedump.c:621
HRESULT hr
Definition: shlfolder.c:183
HWND m_hWnd
Definition: ui.h:136
CicCaret m_Caret
Definition: ui.h:138
#define GWLP_USERDATA
Definition: treelist.c:63
int32_t INT
Definition: typedefs.h:58
#define UICOMP_GWLP_INDEX
Definition: ui.cpp:454
BOOL WINAPI IsWindow(_In_opt_ HWND)
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)
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define SetWindowLongPtrW
Definition: winuser.h:5355

◆ CreateDefFrameWnd()

HRESULT UIComposition::CreateDefFrameWnd ( HWND  hwndParent,
HIMC  hIMC 
)

@implemented

Definition at line 504 of file ui.cpp.

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}
void Init()
@implemented
Definition: ui.cpp:201

Referenced by CreateCompositionWindow().

◆ DestroyCompositionWindow()

HRESULT UIComposition::DestroyCompositionWindow ( )

@implemented

Definition at line 619 of file ui.cpp.

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}
void DestroyCaret()
Definition: ciccaret.cpp:47
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
Definition: ui.h:135
CPolyText m_PolyText
Definition: ui.h:137
void RemoveAll()
@implemented
Definition: ui.cpp:436
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by CreateCompositionWindow(), OnDestroy(), OnImeEndComposition(), and ~UIComposition().

◆ GetCompStrBuffer()

LPWSTR UIComposition::GetCompStrBuffer ( INT  cchStr)

@implemented

Definition at line 725 of file ui.cpp.

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}
static LPVOID cicMemReAlloc(LPVOID ptr, SIZE_T newSize)
Definition: cicbase.h:20
static LPVOID cicMemAllocClear(SIZE_T size)
Definition: cicbase.h:15
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ GetImeUIWndTextExtent()

BOOL UIComposition::GetImeUIWndTextExtent ( CicIMCLock imcLock,
LPARAM  lParam 
)
static

@implemented

Definition at line 719 of file ui.cpp.

720{
721 return !UIComposition::SendMessageToUI(imcLock, 0x14, lParam);
722}
static BOOL SendMessageToUI(CicIMCLock &imcLock, WPARAM wParam, LPARAM lParam)
Definition: ui.cpp:489
LPARAM lParam
Definition: combotst.c:139

◆ GetLevelFromIMC()

INT UIComposition::GetLevelFromIMC ( CicIMCLock imcLock)

@implemented

Definition at line 800 of file ui.cpp.

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}
INPUTCONTEXTDX & get() const
Definition: cicimc.h:165
#define CFS_RECT
Definition: imm.h:324
#define CFS_FORCE_POSITION
Definition: imm.h:326
#define CFS_DEFAULT
Definition: imm.h:323
#define CFS_POINT
Definition: imm.h:325
RECT rcArea
Definition: dimm.idl:88
DWORD dwStyle
Definition: dimm.idl:86
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
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

Referenced by OnImeSetContextAfter().

◆ InquireImeUIWndState()

BOOL UIComposition::InquireImeUIWndState ( CicIMCLock imcLock)
static

Definition at line 651 of file ui.cpp.

652{
653 BOOL bValue = FALSE;
654 UIComposition::SendMessageToUI(imcLock, 0x11u, (LPARAM)&bValue);
655 return bValue;
656}
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG_PTR LPARAM
Definition: windef.h:208

◆ OnDestroy()

HRESULT UIComposition::OnDestroy ( )

@implemented

Definition at line 773 of file ui.cpp.

774{
776}

Referenced by UI::_Destroy().

◆ OnImeCompositionUpdate()

HRESULT UIComposition::OnImeCompositionUpdate ( CicIMCLock imcLock)

@implemented

Definition at line 747 of file ui.cpp.

748{
749 m_dwUnknown56[0] |= 0x8000;
751}
DWORD m_dwUnknown56[2]
Definition: ui.h:157
HRESULT UpdateShowCompWndFlag(CicIMCLock &imcLock, DWORD *pdwCompStrLen)
@implemented
Definition: ui.cpp:659

Referenced by CIMEUIWindowHandler::ImeUIWndProcWorker().

◆ OnImeEndComposition()

HRESULT UIComposition::OnImeEndComposition ( )

@unimplemented

Definition at line 754 of file ui.cpp.

755{
756 m_dwUnknown56[0] = 0;
758}

Referenced by CIMEUIWindowHandler::ImeUIWndProcWorker().

◆ OnImeNotifySetCompositionWindow()

HRESULT UIComposition::OnImeNotifySetCompositionWindow ( CicIMCLock imcLock)

@implemented

Definition at line 788 of file ui.cpp.

789{
790 return UpdateCompositionRect(imcLock);
791}
HRESULT UpdateCompositionRect(CicIMCLock &imcLock)
@unimplemented
Definition: ui.cpp:794

Referenced by CIMEUIWindowHandler::ImeUIWndProcWorker().

◆ OnImeSetContext()

void UIComposition::OnImeSetContext ( CicIMCLock imcLock,
HWND  hUIWnd,
WPARAM  wParam,
LPARAM  lParam 
)

@unimplemented

Definition at line 761 of file ui.cpp.

762{
763 //FIXME
764}

Referenced by UI::OnImeSetContext().

◆ OnImeSetContextAfter()

HRESULT UIComposition::OnImeSetContextAfter ( CicIMCLock imcLock)

@implemented

Definition at line 825 of file ui.cpp.

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}
void HideCaret()
Definition: ciccaret.cpp:57
INT GetLevelFromIMC(CicIMCLock &imcLock)
@implemented
Definition: ui.cpp:800
BOOL m_bHasCompStr
Definition: ui.h:161
#define SW_HIDE
Definition: winuser.h:768
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOWNOACTIVATE
Definition: winuser.h:774
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56

Referenced by CIMEUIWindowHandler::ImeUIWndProcWorker().

◆ OnImeStartComposition()

void UIComposition::OnImeStartComposition ( CicIMCLock imcLock,
HWND  hUIWnd 
)

@unimplemented

Definition at line 741 of file ui.cpp.

742{
743 //FIXME
744}

Referenced by CIMEUIWindowHandler::ImeUIWndProcWorker().

◆ OnPaintTheme()

void UIComposition::OnPaintTheme ( WPARAM  wParam)

@unimplemented

Definition at line 767 of file ui.cpp.

768{
769 //FIXME
770}

Referenced by CIMEUIWindowHandler::ImeUIWndProcWorker().

◆ OnTimer()

void UIComposition::OnTimer ( HWND  hWnd)

Definition at line 709 of file ui.cpp.

710{
712 if (iCompStr == -1)
714 else
715 m_CompStrs[iCompStr].m_Caret.OnTimer();
716}
HWND hWnd
Definition: settings.c:17
void OnTimer()
Definition: ciccaret.cpp:80
#define INT
Definition: polytest.cpp:20
#define GetWindowLongPtrW
Definition: winuser.h:4829

◆ SendMessageToUI()

BOOL UIComposition::SendMessageToUI ( CicIMCLock imcLock,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 489 of file ui.cpp.

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}
DWORD m_cWnds
Definition: tls.h:28
WPARAM wParam
Definition: combotst.c:138
HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd)
Definition: ime.c:890
int ret
LONG_PTR LRESULT
Definition: windef.h:209
#define WM_IME_NOTIFY
Definition: winuser.h:1830
#define SendMessage
Definition: winuser.h:5852

Referenced by GetImeUIWndTextExtent(), and InquireImeUIWndState().

◆ UpdateCompositionRect()

HRESULT UIComposition::UpdateCompositionRect ( CicIMCLock imcLock)

@unimplemented

Definition at line 794 of file ui.cpp.

795{
796 return E_NOTIMPL;
797}
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by OnImeNotifySetCompositionWindow().

◆ UpdateFont()

HRESULT UIComposition::UpdateFont ( CicIMCLock imcLock)

@implemented

Definition at line 682 of file ui.cpp.

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}
#define UNICODE_NULL
#define _countof(array)
Definition: sndvol32.h:70
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
LONG lfOrientation
Definition: dimm.idl:62
LONG lfEscapement
Definition: dimm.idl:61
#define MoveMemory
Definition: winbase.h:1709
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)

◆ UpdateShowCompWndFlag()

HRESULT UIComposition::UpdateShowCompWndFlag ( CicIMCLock imcLock,
DWORD pdwCompStrLen 
)

@implemented

Definition at line 659 of file ui.cpp.

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}

Referenced by OnImeCompositionUpdate(), and OnImeSetContextAfter().

Member Data Documentation

◆ m_bHasCompStr

BOOL UIComposition::m_bHasCompStr

Definition at line 161 of file ui.h.

Referenced by OnImeSetContextAfter(), and UpdateShowCompWndFlag().

◆ m_bHasCompWnd

BOOL UIComposition::m_bHasCompWnd

Definition at line 150 of file ui.h.

Referenced by CreateCompositionWindow().

◆ m_bInComposition

BOOL UIComposition::m_bInComposition

Definition at line 160 of file ui.h.

Referenced by CIMEUIWindowHandler::ImeUIWndProcWorker().

◆ m_CaretSize

SIZE UIComposition::m_CaretSize

Definition at line 156 of file ui.h.

Referenced by CreateCompositionWindow().

◆ m_cchCompStr

INT UIComposition::m_cchCompStr

Definition at line 159 of file ui.h.

Referenced by GetCompStrBuffer(), and ~UIComposition().

◆ m_CompStrs

COMPWND UIComposition::m_CompStrs[4]

◆ m_dwUnknown54

DWORD UIComposition::m_dwUnknown54

Definition at line 153 of file ui.h.

◆ m_dwUnknown55

DWORD UIComposition::m_dwUnknown55

Definition at line 155 of file ui.h.

◆ m_dwUnknown56

DWORD UIComposition::m_dwUnknown56[2]

◆ m_hFont1

HFONT UIComposition::m_hFont1

Definition at line 152 of file ui.h.

Referenced by UpdateFont(), and ~UIComposition().

◆ m_hFont2

HFONT UIComposition::m_hFont2

Definition at line 154 of file ui.h.

Referenced by UpdateFont(), and ~UIComposition().

◆ m_hwndParent

HWND UIComposition::m_hwndParent

Definition at line 149 of file ui.h.

◆ m_pCompButtonFrameWindow

CCompButtonFrameWindow* UIComposition::m_pCompButtonFrameWindow

Definition at line 163 of file ui.h.

Referenced by CreateCompButtonWnd(), and DestroyCompositionWindow().

◆ m_pDefCompFrameWindow

CDefCompFrameWindow* UIComposition::m_pDefCompFrameWindow

◆ m_strCompStr

LPWSTR UIComposition::m_strCompStr

Definition at line 158 of file ui.h.

Referenced by GetCompStrBuffer(), and ~UIComposition().


The documentation for this class was generated from the following files: