-
Notifications
You must be signed in to change notification settings - Fork 0
/
LanguageProfileNotifySink.h
50 lines (39 loc) · 1.3 KB
/
LanguageProfileNotifySink.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once
#include "msctf.h"
class CLanguageProfileNotifySink : public ITfLanguageProfileNotifySink
{
public:
CLanguageProfileNotifySink();
~CLanguageProfileNotifySink();
// [IUnknown]
//
STDMETHOD_(DWORD, AddRef)();
STDMETHOD_(DWORD, Release)();
STDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppReturn);
// [ITfLanguageProfileNotifySink]
//
STDMETHODIMP OnLanguageChange(LANGID langid, BOOL *pfAccept);
STDMETHODIMP OnLanguageChanged();
HRESULT AdviseSink(ITfSource *pSource, DWORD *pdwCookie);
HRESULT UnadviseSink(ITfSource *pSource, DWORD dwCookie);
private:
DWORD m_ObjRefCount;
};
class CActiveLanguageProfileNotifySink : public ITfActiveLanguageProfileNotifySink
{
public:
CActiveLanguageProfileNotifySink();
~CActiveLanguageProfileNotifySink();
// [IUnknown]
//
STDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppReturn);
STDMETHOD_(DWORD, AddRef)();
STDMETHOD_(DWORD, Release)();
// [CActiveLanguageProfileNotifySink]
//
STDMETHODIMP OnActivated(REFCLSID clsid,REFGUID guidProfile, BOOL fActivated);
HRESULT AdviseSink(ITfSource *pSource, DWORD *pdwCookie);
HRESULT UnadviseSink(ITfSource *pSource, DWORD dwCookie);
private:
DWORD m_ObjRefCount;
};