annotate EXCLUDE/GLTSF/include/TSF.hpp @ 4732:e1307be6cb9e

Implementing base parts of TSF
author dewyatt
date Sun, 30 May 2010 15:48:16 -0400
parents bfc8ad7234b6
children 0c7c67d4e6ee
rev   line source
4731
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
1 #ifndef TSF_HPP
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
2 #define TSF_HPP
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
3
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
4 #include <msctf.h>
4732
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
5 #include <atlbase.h>
4731
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
6
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
7 class TSF
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
8 {
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
9 public:
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
10
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
11 protected:
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
12 class UI_Sink : public ITfUIElementSink, public ITfInputProcessorProfileActivationSink
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
13 {
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
14 public:
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
15 UI_Sink();
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
16 ~UI_Sink();
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
17
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
18 // IUnknown
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
19 STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
20 STDMETHODIMP_(ULONG) AddRef(void);
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
21 STDMETHODIMP_(ULONG) Release(void);
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
22
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
23 // ITfUIElementSink
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
24 STDMETHODIMP BeginUIElement(DWORD dwUIElementId, BOOL *pbShow);
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
25 STDMETHODIMP UpdateUIElement(DWORD dwUIElementId);
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
26 STDMETHODIMP EndUIElement(DWORD dwUIElementId);
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
27
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
28 // ITfInputProcessorProfileActivationSink
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
29 STDMETHODIMP OnActivated(DWORD dwProfileType, LANGID langid,
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
30 REFCLSID clsid, REFGUID catid,
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
31 REFGUID guidProfile, HKL hkl,
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
32 DWORD dwFlags);
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
33
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
34 // ITfCompartmentEventSink
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
35 STDMETHODIMP OnChange(REFGUID rguid);
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
36
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
37 private:
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
38 LONG my_Reference_Count;
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
39 };
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
40
4732
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
41 TSF();
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
42 ~TSF();
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
43
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
44 void Initialize();
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
45 void Finalize();
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
46
4731
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
47 private:
4732
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
48 bool my_COM_Initialized;
4731
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
49
4732
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
50 CComPtr<ITfThreadMgrEx> my_Thread_Manager;
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
51 UI_Sink *my_UI_Sink;
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
52
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
53 DWORD my_UI_Element_Sink_Cookie;
e1307be6cb9e Implementing base parts of TSF
dewyatt
parents: 4731
diff changeset
54 DWORD my_IPPA_Sink_Cookie;
4731
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
55 };
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
56
bfc8ad7234b6 Adding some initial TSF code
dewyatt
parents:
diff changeset
57 #endif