ReactOS 0.4.15-dev-8219-ge8b88cf
bridge.h
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: The bridge of msctfime.ime
5 * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#pragma once
9
10#include "sinks.h"
11#include "tls.h"
12
14{
15protected:
27
30
31 LRESULT EscHanjaMode(TLS *pTLS, HIMC hIMC, LPVOID lpData);
32
33public:
34 CicBridge();
35 virtual ~CicBridge();
36
37 // IUnknown interface
38 STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObj) override;
41
42 // ITfSysHookSink interface
46
51
55
57 _Inout_ TLS *pTLS,
58 _Inout_ ITfThreadMgr_P *pThreadMgr,
59 _In_ HIMC hIMC,
60 _In_ BOOL fSelect,
61 _In_ HKL hKL);
63 TLS *pTLS,
64 ITfThreadMgr_P *pThreadMgr,
65 CicIMCLock& imcLock,
66 CicInputContext *pCicIC);
67
68 void PostTransMsg(_In_ HWND hWnd, _In_ INT cTransMsgs, _In_ const TRANSMSG *pTransMsgs);
70
73 _In_ ITfThreadMgr *pThreadMgr,
74 _In_ HKL hKL,
75 _In_ HWND hWnd);
77 _Inout_ TLS* pTLS,
78 _In_ ITfThreadMgr *pThreadMgr,
79 _In_ HKL hKL,
81 _Inout_opt_ LPVOID lpData);
82
83 HRESULT SetActiveContextAlways(TLS *pTLS, HIMC hIMC, BOOL fActive, HWND hWnd, HKL hKL);
84
85 void SetAssociate(
86 TLS *pTLS,
87 HWND hWnd,
88 HIMC hIMC,
89 ITfThreadMgr_P *pThreadMgr,
90 ITfDocumentMgr *pDocMgr);
91
93 TLS *pTLS,
94 ITfThreadMgr_P *pThreadMgr,
95 HIMC hIMC,
96 DWORD dwAction,
97 DWORD dwIndex,
98 DWORD_PTR dwValue);
99
101 TLS *pTLS,
102 ITfThreadMgr_P *pThreadMgr,
103 HIMC hIMC,
106 CONST LPBYTE lpbKeyState,
107 INT *pnUnknown60);
108
110 TLS *pTLS,
111 ITfThreadMgr_P *pThreadMgr,
112 UINT uVirtKey,
113 UINT uScanCode,
114 CONST LPBYTE lpbKeyState,
115 LPTRANSMSGLIST lpTransBuf,
116 UINT fuState,
117 HIMC hIMC,
118 UINT *pResult);
119
121 TLS *pTLS,
122 ITfThreadMgr_P *pThreadMgr,
123 HIMC hIMC,
124 DWORD dwIndex,
125 LPCVOID lpComp,
126 DWORD dwCompLen,
127 LPCVOID lpRead,
128 DWORD dwReadLen);
129
131 TLS *pTLS,
132 HIMC hIMC,
133 UINT uSubFunc,
134 LPVOID lpData);
135
136 static BOOL IsOwnDim(ITfDocumentMgr *pDocMgr);
137
138 BOOL
140 ITfThreadMgr_P *pThreadMgr,
141 CicIMCLock& imcLock,
142 CicInputContext *pCicIC);
143
144 HRESULT
146 ITfThreadMgr_P *pThreadMgr,
147 CicIMCLock& imcLock,
148 CicInputContext *pCicIC,
149 DWORD dwValue,
150 LANGID LangID);
151};
HWND hWnd
Definition: settings.c:17
#define STDMETHODIMP
Definition: basetyps.h:43
STDMETHODIMP OnPreFocusDIM(HWND hwnd) override
@implemented
Definition: bridge.cpp:488
ITfContext * GetInputContext(CicIMCCLock< CTFIMECONTEXT > &imeContext)
@implemented
Definition: bridge.cpp:181
LRESULT EscapeKorean(TLS *pTLS, HIMC hIMC, UINT uSubFunc, LPVOID lpData)
@implemented
Definition: bridge.cpp:894
static BOOL IsOwnDim(ITfDocumentMgr *pDocMgr)
@implemented
Definition: bridge.cpp:904
HRESULT DestroyInputContext(TLS *pTLS, HIMC hIMC)
@implemented
Definition: bridge.cpp:143
HRESULT CreateInputContext(TLS *pTLS, HIMC hIMC)
@implemented
Definition: bridge.cpp:79
BOOL ProcessKey(TLS *pTLS, ITfThreadMgr_P *pThreadMgr, HIMC hIMC, WPARAM wParam, LPARAM lParam, CONST LPBYTE lpbKeyState, INT *pnUnknown60)
@unimplemented
Definition: bridge.cpp:787
CicBridge()
@implemented
Definition: bridge.cpp:13
HRESULT SetActiveContextAlways(TLS *pTLS, HIMC hIMC, BOOL fActive, HWND hWnd, HKL hKL)
Definition: bridge.cpp:622
LRESULT EscHanjaMode(TLS *pTLS, HIMC hIMC, LPVOID lpData)
@unimplemented
Definition: bridge.cpp:866
virtual ~CicBridge()
@implemented
Definition: bridge.cpp:55
DWORD m_cActivateLocks
Definition: bridge.h:20
static BOOL CALLBACK EnumCreateInputContextCallback(HIMC hIMC, LPARAM lParam)
Definition: bridge.cpp:259
CThreadMgrEventSink * m_pThreadMgrEventSink
Definition: bridge.h:23
ITfDocumentMgr * m_pDocMgr
Definition: bridge.h:22
BOOL m_bImmxInited
Definition: bridge.h:17
void PostTransMsg(_In_ HWND hWnd, _In_ INT cTransMsgs, _In_ const TRANSMSG *pTransMsgs)
@implemented
Definition: bridge.cpp:507
BOOL SetCompositionString(TLS *pTLS, ITfThreadMgr_P *pThreadMgr, HIMC hIMC, DWORD dwIndex, LPCVOID lpComp, DWORD dwCompLen, LPCVOID lpRead, DWORD dwReadLen)
@implemented
Definition: bridge.cpp:817
STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppvObj) override
@implemented
Definition: bridge.cpp:27
STDMETHODIMP_(ULONG) AddRef() override
BOOL m_bUnknown2
Definition: bridge.h:26
HRESULT OnSetOpenStatus(TLS *pTLS, ITfThreadMgr_P *pThreadMgr, CicIMCLock &imcLock, CicInputContext *pCicIC)
@implemented
Definition: bridge.cpp:190
HRESULT ActivateIMMX(_Inout_ TLS *pTLS, _Inout_ ITfThreadMgr_P *pThreadMgr)
@implemented
Definition: bridge.cpp:277
static BOOL CALLBACK EnumDestroyInputContextCallback(HIMC hIMC, LPARAM lParam)
Definition: bridge.cpp:268
STDMETHODIMP OnSysKeyboardProc(UINT, LONG) override
@unimplemented
Definition: bridge.cpp:494
STDMETHODIMP_(ULONG) Release() override
HRESULT SelectEx(_Inout_ TLS *pTLS, _Inout_ ITfThreadMgr_P *pThreadMgr, _In_ HIMC hIMC, _In_ BOOL fSelect, _In_ HKL hKL)
Definition: bridge.cpp:210
BOOL m_bDeactivating
Definition: bridge.h:19
HRESULT ToAsciiEx(TLS *pTLS, ITfThreadMgr_P *pThreadMgr, UINT uVirtKey, UINT uScanCode, CONST LPBYTE lpbKeyState, LPTRANSMSGLIST lpTransBuf, UINT fuState, HIMC hIMC, UINT *pResult)
@unimplemented
Definition: bridge.cpp:801
HRESULT ConfigureRegisterWord(_Inout_ TLS *pTLS, _In_ ITfThreadMgr *pThreadMgr, _In_ HKL hKL, _In_ HWND hWnd, _Inout_opt_ LPVOID lpData)
@implemented
Definition: bridge.cpp:557
HRESULT Notify(TLS *pTLS, ITfThreadMgr_P *pThreadMgr, HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD_PTR dwValue)
@implemented
Definition: bridge.cpp:701
LONG m_cRefs
Definition: bridge.h:16
BOOL UnInitIMMX(_Inout_ TLS *pTLS)
@implemented
Definition: bridge.cpp:453
HRESULT DeactivateIMMX(_Inout_ TLS *pTLS, _Inout_ ITfThreadMgr_P *pThreadMgr)
@implemented
Definition: bridge.cpp:340
CIC_LIBTHREAD m_LibThread
Definition: bridge.h:25
BOOL DoOpenCandidateHanja(ITfThreadMgr_P *pThreadMgr, CicIMCLock &imcLock, CicInputContext *pCicIC)
@unimplemented
Definition: bridge.cpp:680
ITfDocumentMgr * GetDocumentManager(_Inout_ CicIMCCLock< CTFIMECONTEXT > &imeContext)
@implemented
Definition: bridge.cpp:67
BOOL m_bUnknown1
Definition: bridge.h:18
HRESULT OnSetConversionSentenceMode(ITfThreadMgr_P *pThreadMgr, CicIMCLock &imcLock, CicInputContext *pCicIC, DWORD dwValue, LANGID LangID)
@unimplemented
Definition: bridge.cpp:690
void SetAssociate(TLS *pTLS, HWND hWnd, HIMC hIMC, ITfThreadMgr_P *pThreadMgr, ITfDocumentMgr *pDocMgr)
@unimplemented
Definition: bridge.cpp:611
HRESULT InitIMMX(_Inout_ TLS *pTLS)
@implemented
Definition: bridge.cpp:386
STDMETHODIMP OnSysShellProc(INT, UINT, LONG) override
@implemented
Definition: bridge.cpp:500
TfClientId m_cliendId
Definition: bridge.h:24
ITfKeystrokeMgr * m_pKeystrokeMgr
Definition: bridge.h:21
HRESULT ConfigureGeneral(_Inout_ TLS *pTLS, _In_ ITfThreadMgr *pThreadMgr, _In_ HKL hKL, _In_ HWND hWnd)
@implemented
Definition: bridge.cpp:520
Definition: tls.h:14
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
DWORD HIMC
Definition: dimm.idl:75
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
ULONG AddRef()
ULONG Release()
USHORT LANGID
Definition: mui.h:9
#define _Inout_
Definition: ms_sal.h:378
#define _Inout_opt_
Definition: ms_sal.h:379
#define _In_
Definition: ms_sal.h:308
DWORD TfClientId
Definition: msctf.idl:105
UINT_PTR HKL
Definition: msctf.idl:143
unsigned int UINT
Definition: ndis.h:50
#define CONST
Definition: pedump.c:81
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
_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
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
CONST void * LPCVOID
Definition: windef.h:191