2
#A part of NonVisual Desktop Access (NVDA)
3
#Copyright (C) 2006-2010 NVDA Contributors <http://www.nvda-project.org/>
4
#This file is covered by the GNU General Public License.
5
#See the file COPYING for more details.
11
//////////////////////////////////////////////////////////////////////
13
// tsf.h: CnvdajpimeTSF declaration
15
//////////////////////////////////////////////////////////////////////
21
class CnvdajpimeTSF : public ITfThreadMgrEventSink,
22
public ITfTextEditSink
29
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
30
STDMETHODIMP_(ULONG) AddRef(void);
31
STDMETHODIMP_(ULONG) Release(void);
33
// ITfThreadMgrEventSink
34
STDMETHODIMP OnInitDocumentMgr(ITfDocumentMgr *pDocMgr);
35
STDMETHODIMP OnUninitDocumentMgr(ITfDocumentMgr *pDocMgr);
36
STDMETHODIMP OnSetFocus(ITfDocumentMgr *pDocMgrFocus, ITfDocumentMgr *pDocMgrPrevFocus);
37
STDMETHODIMP OnPushContext(ITfContext *pContext);
38
STDMETHODIMP OnPopContext(ITfContext *pContext);
41
STDMETHODIMP OnEndEdit(ITfContext *pContext, TfEditCookie ecReadOnly, ITfEditRecord *pEditRecord);
44
BOOL _InitThreadMgrSink();
45
void _UninitThreadMgrSink();
46
BOOL _InitTextEditSink(ITfDocumentMgr *pDocMgr);
48
void _AppendCompositionText(ITfRange *pRange, TfEditCookie ecReadOnly);
49
void _ClearCompositionText();
50
BOOL _CheckComposition(ITfContext *pContext, TfEditCookie ecReadOnly);
52
LONG _GetLength(ITfRange *pRange,TfEditCookie ecReadOnly);
55
DWORD _dwThreadMgrEventSinkCookie;
56
DWORD _dwTextEditSinkCookie;
57
ITfContext *_pTextEditSinkContext;
58
ITfThreadMgr* _pThreadMgr;
60
WCHAR *_pszCompositionText;
61
ULONG _uCompositionText;
68
volatile DWORD m_lock_flags;