mirror of
https://github.com/reactos/reactos.git
synced 2024-10-29 19:13:58 +00:00
b2ec78673d
Improve code flexibility. 3700+ lines of msctfime.cpp was too long. JIRA issue: CORE-19360 - Split msctfime.cpp code to some source files and header files.
81 lines
2.4 KiB
C++
81 lines
2.4 KiB
C++
/*
|
|
* PROJECT: ReactOS msctfime.ime
|
|
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
|
* PURPOSE: Bridge
|
|
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "sinks.h"
|
|
#include "tls.h"
|
|
|
|
class CicBridge : public ITfSysHookSink
|
|
{
|
|
protected:
|
|
LONG m_cRefs;
|
|
BOOL m_bImmxInited;
|
|
BOOL m_bUnknown1;
|
|
BOOL m_bDeactivating;
|
|
DWORD m_cActivateLocks;
|
|
ITfKeystrokeMgr *m_pKeystrokeMgr;
|
|
ITfDocumentMgr *m_pDocMgr;
|
|
CThreadMgrEventSink *m_pThreadMgrEventSink;
|
|
TfClientId m_cliendId;
|
|
CIC_LIBTHREAD m_LibThread;
|
|
BOOL m_bUnknown2;
|
|
|
|
static BOOL CALLBACK EnumCreateInputContextCallback(HIMC hIMC, LPARAM lParam);
|
|
static BOOL CALLBACK EnumDestroyInputContextCallback(HIMC hIMC, LPARAM lParam);
|
|
|
|
public:
|
|
CicBridge();
|
|
virtual ~CicBridge();
|
|
|
|
// IUnknown interface
|
|
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObj) override;
|
|
STDMETHODIMP_(ULONG) AddRef() override;
|
|
STDMETHODIMP_(ULONG) Release() override;
|
|
|
|
// ITfSysHookSink interface
|
|
STDMETHODIMP OnPreFocusDIM(HWND hwnd) override;
|
|
STDMETHODIMP OnSysKeyboardProc(UINT, LONG) override;
|
|
STDMETHODIMP OnSysShellProc(INT, UINT, LONG) override;
|
|
|
|
HRESULT InitIMMX(_Inout_ TLS *pTLS);
|
|
BOOL UnInitIMMX(_Inout_ TLS *pTLS);
|
|
HRESULT ActivateIMMX(_Inout_ TLS *pTLS, _Inout_ ITfThreadMgr_P *pThreadMgr);
|
|
HRESULT DeactivateIMMX(_Inout_ TLS *pTLS, _Inout_ ITfThreadMgr_P *pThreadMgr);
|
|
|
|
HRESULT CreateInputContext(TLS *pTLS, HIMC hIMC);
|
|
HRESULT DestroyInputContext(TLS *pTLS, HIMC hIMC);
|
|
ITfContext *GetInputContext(CicIMCCLock<CTFIMECONTEXT>& imeContext);
|
|
|
|
HRESULT SelectEx(
|
|
_Inout_ TLS *pTLS,
|
|
_Inout_ ITfThreadMgr_P *pThreadMgr,
|
|
_In_ HIMC hIMC,
|
|
_In_ BOOL fSelect,
|
|
_In_ HKL hKL);
|
|
HRESULT OnSetOpenStatus(
|
|
TLS *pTLS,
|
|
ITfThreadMgr_P *pThreadMgr,
|
|
CicIMCLock& imcLock,
|
|
CicInputContext *pCicIC);
|
|
|
|
void PostTransMsg(_In_ HWND hWnd, _In_ INT cTransMsgs, _In_ const TRANSMSG *pTransMsgs);
|
|
void GetDocumentManager(_Inout_ CicIMCCLock<CTFIMECONTEXT>& imeContext);
|
|
|
|
HRESULT
|
|
ConfigureGeneral(_Inout_ TLS* pTLS,
|
|
_In_ ITfThreadMgr *pThreadMgr,
|
|
_In_ HKL hKL,
|
|
_In_ HWND hWnd);
|
|
HRESULT ConfigureRegisterWord(
|
|
_Inout_ TLS* pTLS,
|
|
_In_ ITfThreadMgr *pThreadMgr,
|
|
_In_ HKL hKL,
|
|
_In_ HWND hWnd,
|
|
_Inout_opt_ LPVOID lpData);
|
|
};
|