Mercurial > sdl-ios-xcode
annotate EXCLUDE/GLTSF/include/TSF.hpp @ 4748:d1ce08e2697f
Added missing line to make things compile.
author | dewyatt |
---|---|
date | Tue, 06 Jul 2010 03:27:22 -0400 |
parents | f51a9f01b508 |
children |
rev | line source |
---|---|
4731 | 1 #ifndef TSF_HPP |
2 #define TSF_HPP | |
3 | |
4 #include <msctf.h> | |
4732 | 5 #include <atlbase.h> |
4731 | 6 |
7 class TSF | |
8 { | |
9 public: | |
4734
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4732
diff
changeset
|
10 static void Initialize(); |
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4732
diff
changeset
|
11 static void Finalize(); |
4732 | 12 |
4731 | 13 private: |
4739 | 14 class TSF_Text_Store : public ITextStoreACP, public ITfContextOwnerCompositionSink |
15 { | |
16 public: | |
17 //IUnknown | |
18 STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject); | |
19 STDMETHODIMP_(ULONG) AddRef(); | |
20 STDMETHODIMP_(ULONG) Release(); | |
21 | |
22 //ITextStoreACP | |
23 STDMETHODIMP AdviseSink(REFIID riid, IUnknown *punk, DWORD dwMask); | |
24 STDMETHODIMP UnadviseSink(IUnknown *punk); | |
25 STDMETHODIMP RequestLock(DWORD dwLockFlags, HRESULT *phrSession); | |
26 STDMETHODIMP GetStatus(TS_STATUS *pdcs); | |
27 STDMETHODIMP QueryInsert(LONG acpTestStart, LONG acpTestEnd, ULONG cch, LONG *pacpResultStart, LONG *pacpResultEnd); | |
28 STDMETHODIMP GetSelection(ULONG ulIndex, ULONG ulCount, TS_SELECTION_ACP *pSelection, ULONG *pcFetched); | |
29 STDMETHODIMP SetSelection(ULONG ulCount, const TS_SELECTION_ACP *pSelection); | |
30 STDMETHODIMP GetText(LONG acpStart, LONG acpEnd, WCHAR *pchPlain, ULONG cchPlainReq, ULONG *pcchPlainRet, TS_RUNINFO *prgRunInfo, ULONG cRunInfoReq, ULONG *pcRunInfoRet, LONG *pacpNext); | |
31 STDMETHODIMP SetText(DWORD dwFlags, LONG acpStart, LONG acpEnd, const WCHAR *pchText, ULONG cch, TS_TEXTCHANGE *pChange); | |
32 STDMETHODIMP GetFormattedText(LONG acpStart, LONG acpEnd, IDataObject **ppDataObject); | |
33 STDMETHODIMP GetEmbedded(LONG acpPos, REFGUID rguidService, REFIID riid, IUnknown **ppunk); | |
34 STDMETHODIMP QueryInsertEmbedded(const GUID *pguidService, const FORMATETC *pFormatEtc, BOOL *pfInsertable); | |
35 STDMETHODIMP InsertEmbedded(DWORD dwFlags, LONG acpStart, LONG acpEnd, IDataObject *pDataObject, TS_TEXTCHANGE *pChange); | |
36 STDMETHODIMP InsertTextAtSelection(DWORD dwFlags, const WCHAR *pchText, ULONG cch, LONG *pacpStart, LONG *pacpEnd, TS_TEXTCHANGE *pChange); | |
37 STDMETHODIMP InsertEmbeddedAtSelection(DWORD dwFlags, IDataObject *pDataObject, LONG *pacpStart, LONG *pacpEnd, TS_TEXTCHANGE *pChange); | |
38 STDMETHODIMP RequestSupportedAttrs(DWORD dwFlags, ULONG cFilterAttrs, const TS_ATTRID *paFilterAttrs); | |
39 STDMETHODIMP RequestAttrsAtPosition(LONG acpPos, ULONG cFilterAttrs, const TS_ATTRID *paFilterAttrs, DWORD dwFlags); | |
40 STDMETHODIMP RequestAttrsTransitioningAtPosition(LONG acpPos, ULONG cFilterAttrs, const TS_ATTRID *paFilterAttrs, DWORD dwFlags); | |
41 STDMETHODIMP FindNextAttrTransition(LONG acpStart, LONG acpHalt, ULONG cFilterAttrs, const TS_ATTRID *paFilterAttrs, DWORD dwFlags, LONG *pacpNext, BOOL *pfFound, LONG *plFoundOffset); | |
42 STDMETHODIMP RetrieveRequestedAttrs(ULONG ulCount, TS_ATTRVAL *paAttrVals, ULONG *pcFetched); | |
43 STDMETHODIMP GetEndACP(LONG *pacp); | |
44 STDMETHODIMP GetActiveView(TsViewCookie *pvcView); | |
45 STDMETHODIMP GetACPFromPoint(TsViewCookie vcView, const POINT *ptScreen, DWORD dwFlags, LONG *pacp); | |
46 STDMETHODIMP GetTextExt(TsViewCookie vcView, LONG acpStart, LONG acpEnd, RECT *prc, BOOL *pfClipped); | |
47 STDMETHODIMP GetScreenExt(TsViewCookie vcView, RECT *prc); | |
48 STDMETHODIMP GetWnd(TsViewCookie vcView, HWND *phwnd); | |
49 | |
50 //ITfOwnerCompositionSink | |
51 STDMETHODIMP OnStartComposition(ITfCompositionView *pComposition, BOOL *pfOk); | |
52 STDMETHODIMP OnUpdateComposition(ITfCompositionView *pComposition, ITfRange *pRangeNew); | |
53 STDMETHODIMP OnEndComposition(ITfCompositionView *pComposition); | |
54 | |
55 void Initialize(); | |
56 void Finalize(); | |
57 | |
58 TSF_Text_Store(); | |
59 ~TSF_Text_Store(); | |
60 | |
61 private: | |
62 ULONG my_Reference_Count; | |
63 CComPtr<ITfDocumentMgr> my_Document_Manager; | |
64 CComPtr<ITfContext> my_Context; | |
65 DWORD my_Edit_Cookie; | |
66 CComPtr<ITextStoreACPSink> my_Sink; | |
67 DWORD my_Sink_Mask; | |
68 DWORD my_Lock; | |
69 DWORD my_Lock_Queued; | |
70 CComPtr<ITfCompositionView> my_Composition_View; | |
71 TS_SELECTION_ACP my_Composition_Selection; | |
72 }; | |
73 | |
4734
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4732
diff
changeset
|
74 TSF(); |
4731 | 75 |
4734
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4732
diff
changeset
|
76 static bool COM_Initialized; |
4732 | 77 |
4734
0c7c67d4e6ee
Added On_Char method to Window_Listener for WM_CHAR messages.
dewyatt
parents:
4732
diff
changeset
|
78 static CComPtr<ITfThreadMgr> Thread_Manager; |
4739 | 79 static TfClientId Client_Id; |
80 static TSF_Text_Store *Text_Store; | |
4731 | 81 }; |
82 | |
83 #endif |