mirror of
https://github.com/reactos/reactos.git
synced 2024-11-27 05:23:33 +08:00
[MSCTFIME][SDK] s/IMCCLock/CicIMCCLock/ and s/IMCLock/CicIMCLock/
Refactoring. CORE-19360
This commit is contained in:
parent
91b740f900
commit
1726ee83e7
@ -565,11 +565,11 @@ public:
|
|||||||
|
|
||||||
HRESULT
|
HRESULT
|
||||||
GetGuidAtom(
|
GetGuidAtom(
|
||||||
_Inout_ IMCLock& imcLock,
|
_Inout_ CicIMCLock& imcLock,
|
||||||
_In_ BYTE iAtom,
|
_In_ BYTE iAtom,
|
||||||
_Out_opt_ LPDWORD pdwGuidAtom);
|
_Out_opt_ LPDWORD pdwGuidAtom);
|
||||||
|
|
||||||
HRESULT CreateInputContext(ITfThreadMgr *pThreadMgr, IMCLock& imcLock);
|
HRESULT CreateInputContext(ITfThreadMgr *pThreadMgr, CicIMCLock& imcLock);
|
||||||
HRESULT DestroyInputContext();
|
HRESULT DestroyInputContext();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -665,11 +665,11 @@ CicInputContext::OnEndComposition(
|
|||||||
*/
|
*/
|
||||||
HRESULT
|
HRESULT
|
||||||
CicInputContext::GetGuidAtom(
|
CicInputContext::GetGuidAtom(
|
||||||
_Inout_ IMCLock& imcLock,
|
_Inout_ CicIMCLock& imcLock,
|
||||||
_In_ BYTE iAtom,
|
_In_ BYTE iAtom,
|
||||||
_Out_opt_ LPDWORD pdwGuidAtom)
|
_Out_opt_ LPDWORD pdwGuidAtom)
|
||||||
{
|
{
|
||||||
IMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCompStr);
|
CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCompStr);
|
||||||
HRESULT hr = imeContext.m_hr;
|
HRESULT hr = imeContext.m_hr;
|
||||||
if (!imeContext)
|
if (!imeContext)
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
@ -690,7 +690,7 @@ CicInputContext::GetGuidAtom(
|
|||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
HRESULT
|
HRESULT
|
||||||
CicInputContext::CreateInputContext(ITfThreadMgr *pThreadMgr, IMCLock& imcLock)
|
CicInputContext::CreateInputContext(ITfThreadMgr *pThreadMgr, CicIMCLock& imcLock)
|
||||||
{
|
{
|
||||||
//FIXME
|
//FIXME
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
@ -1069,7 +1069,7 @@ public:
|
|||||||
HRESULT DestroyInputContext(TLS *pTLS, HIMC hIMC);
|
HRESULT DestroyInputContext(TLS *pTLS, HIMC hIMC);
|
||||||
|
|
||||||
void PostTransMsg(HWND hWnd, INT cTransMsgs, LPTRANSMSG pTransMsgs);
|
void PostTransMsg(HWND hWnd, INT cTransMsgs, LPTRANSMSG pTransMsgs);
|
||||||
void GetDocumentManager(IMCCLock<CTFIMECONTEXT>& imeContext);
|
void GetDocumentManager(CicIMCCLock<CTFIMECONTEXT>& imeContext);
|
||||||
|
|
||||||
HRESULT ConfigureGeneral(TLS* pTLS, ITfThreadMgr *pThreadMgr, HKL hKL, HWND hWnd);
|
HRESULT ConfigureGeneral(TLS* pTLS, ITfThreadMgr *pThreadMgr, HKL hKL, HWND hWnd);
|
||||||
HRESULT ConfigureRegisterWord(TLS* pTLS, ITfThreadMgr *pThreadMgr, HKL hKL, HWND hWnd, LPVOID lpData);
|
HRESULT ConfigureRegisterWord(TLS* pTLS, ITfThreadMgr *pThreadMgr, HKL hKL, HWND hWnd, LPVOID lpData);
|
||||||
@ -1675,7 +1675,7 @@ CicBridge::~CicBridge()
|
|||||||
UnInitIMMX(pTLS);
|
UnInitIMMX(pTLS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CicBridge::GetDocumentManager(IMCCLock<CTFIMECONTEXT>& imeContext)
|
void CicBridge::GetDocumentManager(CicIMCCLock<CTFIMECONTEXT>& imeContext)
|
||||||
{
|
{
|
||||||
CicInputContext *pCicIC = imeContext.get().m_pCicIC;
|
CicInputContext *pCicIC = imeContext.get().m_pCicIC;
|
||||||
if (pCicIC)
|
if (pCicIC)
|
||||||
@ -1695,7 +1695,7 @@ void CicBridge::GetDocumentManager(IMCCLock<CTFIMECONTEXT>& imeContext)
|
|||||||
*/
|
*/
|
||||||
HRESULT CicBridge::CreateInputContext(TLS *pTLS, HIMC hIMC)
|
HRESULT CicBridge::CreateInputContext(TLS *pTLS, HIMC hIMC)
|
||||||
{
|
{
|
||||||
IMCLock imcLock(hIMC);
|
CicIMCLock imcLock(hIMC);
|
||||||
HRESULT hr = imcLock.m_hr;
|
HRESULT hr = imcLock.m_hr;
|
||||||
if (!imcLock)
|
if (!imcLock)
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
@ -1710,7 +1710,7 @@ HRESULT CicBridge::CreateInputContext(TLS *pTLS, HIMC hIMC)
|
|||||||
imcLock.get().hCtfImeContext = hCtfImeContext;
|
imcLock.get().hCtfImeContext = hCtfImeContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
|
CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
|
||||||
CicInputContext *pCicIC = imeContext.get().m_pCicIC;
|
CicInputContext *pCicIC = imeContext.get().m_pCicIC;
|
||||||
if (!pCicIC)
|
if (!pCicIC)
|
||||||
{
|
{
|
||||||
@ -1758,7 +1758,7 @@ HRESULT CicBridge::CreateInputContext(TLS *pTLS, HIMC hIMC)
|
|||||||
*/
|
*/
|
||||||
HRESULT CicBridge::DestroyInputContext(TLS *pTLS, HIMC hIMC)
|
HRESULT CicBridge::DestroyInputContext(TLS *pTLS, HIMC hIMC)
|
||||||
{
|
{
|
||||||
IMCLock imcLock(hIMC);
|
CicIMCLock imcLock(hIMC);
|
||||||
HRESULT hr = imcLock.m_hr;
|
HRESULT hr = imcLock.m_hr;
|
||||||
if (!imcLock)
|
if (!imcLock)
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
@ -1766,7 +1766,7 @@ HRESULT CicBridge::DestroyInputContext(TLS *pTLS, HIMC hIMC)
|
|||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
IMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
|
CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
|
||||||
if (imeContext)
|
if (imeContext)
|
||||||
hr = imeContext.m_hr;
|
hr = imeContext.m_hr;
|
||||||
|
|
||||||
@ -2515,7 +2515,7 @@ CtfImeGetGuidAtom(
|
|||||||
{
|
{
|
||||||
TRACE("(%p, 0x%lX, %p)\n", hIMC, dwUnknown, pdwGuidAtom);
|
TRACE("(%p, 0x%lX, %p)\n", hIMC, dwUnknown, pdwGuidAtom);
|
||||||
|
|
||||||
IMCLock imcLock(hIMC);
|
CicIMCLock imcLock(hIMC);
|
||||||
|
|
||||||
HRESULT hr = imcLock.m_hr;
|
HRESULT hr = imcLock.m_hr;
|
||||||
if (!imcLock)
|
if (!imcLock)
|
||||||
@ -2523,7 +2523,7 @@ CtfImeGetGuidAtom(
|
|||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
IMCCLock<CTFIMECONTEXT> imccLock(imcLock.get().hCtfImeContext);
|
CicIMCCLock<CTFIMECONTEXT> imccLock(imcLock.get().hCtfImeContext);
|
||||||
hr = imccLock.m_hr;
|
hr = imccLock.m_hr;
|
||||||
if (!imccLock)
|
if (!imccLock)
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
@ -2550,7 +2550,7 @@ CtfImeIsGuidMapEnable(
|
|||||||
|
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
IMCLock imcLock(hIMC);
|
CicIMCLock imcLock(hIMC);
|
||||||
|
|
||||||
hr = imcLock.m_hr;
|
hr = imcLock.m_hr;
|
||||||
if (!imcLock)
|
if (!imcLock)
|
||||||
|
@ -7,13 +7,13 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// class IMCCLOCK<T_DATA>;
|
// class CIC_IMCC_LOCK<T_DATA>;
|
||||||
// class IMCCLock<T_DATA>;
|
// class CicIMCCLock<T_DATA>;
|
||||||
// class _IMCLock;
|
// class CIC_IMC_LOCK;
|
||||||
// class IMCLock;
|
// class CicIMCLock;
|
||||||
|
|
||||||
template <typename T_DATA>
|
template <typename T_DATA>
|
||||||
class IMCCLOCK
|
class CIC_IMCC_LOCK
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
T_DATA *m_pIMCC;
|
T_DATA *m_pIMCC;
|
||||||
@ -22,7 +22,7 @@ public:
|
|||||||
HIMCC m_hIMCC;
|
HIMCC m_hIMCC;
|
||||||
HRESULT m_hr;
|
HRESULT m_hr;
|
||||||
|
|
||||||
IMCCLOCK(HIMCC hIMCC)
|
CIC_IMCC_LOCK(HIMCC hIMCC)
|
||||||
{
|
{
|
||||||
m_pIMCC = NULL;
|
m_pIMCC = NULL;
|
||||||
m_hr = S_OK;
|
m_hr = S_OK;
|
||||||
@ -31,15 +31,15 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename T_DATA>
|
template <typename T_DATA>
|
||||||
class IMCCLock : public IMCCLOCK<T_DATA>
|
class CicIMCCLock : public CIC_IMCC_LOCK<T_DATA>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IMCCLock(HIMCC hIMCC) : IMCCLOCK<T_DATA>(hIMCC)
|
CicIMCCLock(HIMCC hIMCC) : CIC_IMCC_LOCK<T_DATA>(hIMCC)
|
||||||
{
|
{
|
||||||
if (hIMCC)
|
if (hIMCC)
|
||||||
_LockIMCC(this->m_hIMCC, &this->m_pIMCC);
|
_LockIMCC(this->m_hIMCC, &this->m_pIMCC);
|
||||||
}
|
}
|
||||||
~IMCCLock()
|
~CicIMCCLock()
|
||||||
{
|
{
|
||||||
unlock();
|
unlock();
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ protected:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class IMCLOCK
|
class CIC_IMC_LOCK
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
LPINPUTCONTEXTDX m_pIC;
|
LPINPUTCONTEXTDX m_pIC;
|
||||||
@ -88,7 +88,7 @@ public:
|
|||||||
HRESULT m_hr;
|
HRESULT m_hr;
|
||||||
DWORD m_dw3;
|
DWORD m_dw3;
|
||||||
|
|
||||||
IMCLOCK(HIMC hIMC)
|
CIC_IMC_LOCK(HIMC hIMC)
|
||||||
{
|
{
|
||||||
m_pIC = NULL;
|
m_pIC = NULL;
|
||||||
m_hIMC = hIMC;
|
m_hIMC = hIMC;
|
||||||
@ -102,14 +102,14 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class IMCLock : public IMCLOCK
|
class CicIMCLock : public CIC_IMC_LOCK
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IMCLock(HIMC hIMC) : IMCLOCK(hIMC)
|
CicIMCLock(HIMC hIMC) : CIC_IMC_LOCK(hIMC)
|
||||||
{
|
{
|
||||||
m_hr = _LockIMC(hIMC, &m_pIC);
|
m_hr = _LockIMC(hIMC, &m_pIC);
|
||||||
}
|
}
|
||||||
~IMCLock()
|
~CicIMCLock()
|
||||||
{
|
{
|
||||||
unlock();
|
unlock();
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ public:
|
|||||||
if (ImmGetIMCCSize(m_pIC->hCompStr) < sizeof(COMPOSITIONSTRING))
|
if (ImmGetIMCCSize(m_pIC->hCompStr) < sizeof(COMPOSITIONSTRING))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
IMCCLock<COMPOSITIONSTRING> imccLock(m_pIC->hCompStr);
|
CicIMCCLock<COMPOSITIONSTRING> imccLock(m_pIC->hCompStr);
|
||||||
if (!imccLock)
|
if (!imccLock)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user