forked from EasyIME/PIME
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCandidateListUIElement.h
46 lines (36 loc) · 1.18 KB
/
CandidateListUIElement.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
#pragma once
#ifndef IME_CANDIDATE_LIST_UI_ELEMENT
#define IME_CANDIDATE_LIST_UI_ELEMENT
#include <msctf.h>
#include "ComPtr.h"
namespace Ime {
class CandidateListUIElement:
public ITfCandidateListUIElement {
public:
CandidateListUIElement(ITfContext* context);
virtual ~CandidateListUIElement(void);
// COM related stuff
// IUnknown
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
STDMETHODIMP_(ULONG) AddRef(void);
STDMETHODIMP_(ULONG) Release(void);
// ITfUIElement
STDMETHODIMP GetDescription(BSTR *pbstrDescription);
STDMETHODIMP GetGUID(GUID *pguid);
STDMETHODIMP Show(BOOL bShow);
STDMETHODIMP IsShown(BOOL *pbShow);
// ITfCandidateListUIElement
STDMETHODIMP GetUpdatedFlags(DWORD *pdwFlags);
STDMETHODIMP GetDocumentMgr(ITfDocumentMgr **ppdim);
STDMETHODIMP GetCount(UINT *puCount);
STDMETHODIMP GetSelection(UINT *puIndex);
STDMETHODIMP GetString(UINT uIndex, BSTR *pstr);
STDMETHODIMP GetPageIndex(UINT *pIndex, UINT uSize, UINT *puPageCnt);
STDMETHODIMP SetPageIndex(UINT *pIndex, UINT uPageCnt);
STDMETHODIMP GetCurrentPage(UINT *puPage);
private:
ComPtr<ITfContext> context_;
int refCount_;
};
}
#endif