forked from jrywu/DIME
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EnumTfCandidates.h
40 lines (31 loc) · 1.21 KB
/
EnumTfCandidates.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
//
//
// Derived from Microsoft Sample IME by Jeremy '13,7,17
//
//
#pragma once
#include "Globals.h"
class CEnumTfCandidates : public IEnumTfCandidates
{
protected:
// constructor/destructor
CEnumTfCandidates(_In_ const CDIMEArray<ITfCandidateString*> &rgelm, UINT currentNum);
virtual ~CEnumTfCandidates(void);
public:
// create instance
static HRESULT CreateInstance(_Out_ CEnumTfCandidates **ppobj, _In_ const CDIMEArray<ITfCandidateString*> &rgelm, UINT currentNum = 0);
static HRESULT CreateInstance(REFIID riid, _Out_ void **ppvObj, _In_ const CDIMEArray<ITfCandidateString*> &rgelm, UINT currentNum = 0);
// IUnknown methods
virtual STDMETHODIMP QueryInterface(REFIID riid, _Outptr_ void **ppvObj);
virtual STDMETHODIMP_(ULONG) AddRef(void);
virtual STDMETHODIMP_(ULONG) Release(void);
// IEnumTfCandidates methods
virtual STDMETHODIMP Next(ULONG ulCount, _Out_ ITfCandidateString **ppObj, _Out_ ULONG *pcFetched);
virtual STDMETHODIMP Skip(ULONG ulCount);
virtual STDMETHODIMP Reset();
virtual STDMETHODIMP Clone(_Out_ IEnumTfCandidates **ppEnum);
protected:
LONG _refCount;
CDIMEArray<ITfCandidateString*> _rgelm;
UINT _currentCandidateStrIndex;
};