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);
54
WCHAR* Diff(WCHAR* pOld,WCHAR* pNew,UINT pFirstCode,UINT pLastCode);
57
DWORD _dwThreadMgrEventSinkCookie;
58
DWORD _dwTextEditSinkCookie;
59
ITfContext *_pTextEditSinkContext;
60
ITfThreadMgr* _pThreadMgr;
62
WCHAR *_pszCompositionText;
63
ULONG _uCompositionText;
70
volatile DWORD m_lock_flags;