ReactOS 0.4.16-dev-122-g325d74c
CInputContextOwner Class Reference

#include <inputcontext.h>

Inheritance diagram for CInputContextOwner:
Collaboration diagram for CInputContextOwner:

Public Member Functions

 CInputContextOwner (FN_IC_OWNER_CALLBACK fnCallback, LPVOID pCallbackPV)
 @unimplemented
 
virtual ~CInputContextOwner ()
 @implemented
 
HRESULT _Advise (IUnknown *pContext)
 @implemented
 
HRESULT _Unadvise ()
 @implemented
 
STDMETHODIMP QueryInterface (REFIID riid, LPVOID *ppvObj) override
 @implemented
 
 STDMETHODIMP_ (ULONG) AddRef() override
 
 STDMETHODIMP_ (ULONG) Release() override
 
STDMETHODIMP GetACPFromPoint (const POINT *ptScreen, DWORD dwFlags, LONG *pacp) override
 @unimplemented
 
STDMETHODIMP GetTextExt (LONG acpStart, LONG acpEnd, RECT *prc, BOOL *pfClipped) override
 @unimplemented
 
STDMETHODIMP GetScreenExt (RECT *prc) override
 @implemented
 
STDMETHODIMP GetStatus (TF_STATUS *pdcs) override
 @implemented
 
STDMETHODIMP GetWnd (HWND *phwnd) override
 @unimplemented
 
STDMETHODIMP GetAttribute (REFGUID rguidAttribute, VARIANT *pvarValue) override
 @unimplemented
 
STDMETHODIMP AdviseMouseSink (ITfRangeACP *range, ITfMouseSink *pSink, DWORD *pdwCookie) override
 @implemented
 
STDMETHODIMP UnadviseMouseSink (DWORD dwCookie) override
 @implemented
 
HRESULT GetACPFromPoint ([in] const POINT *ptScreen, [in] DWORD dwFlags, [out] LONG *pacp)
 
HRESULT GetTextExt ([in] LONG acpStart, [in] LONG acpEnd, [out] RECT *prc, [out] BOOL *pfClipped)
 
HRESULT GetScreenExt ([out] RECT *prc)
 
HRESULT GetStatus ([out] TF_STATUS *pdcs)
 
HRESULT GetWnd ([out] HWND *phwnd)
 
HRESULT GetAttribute ([in] REFGUID rguidAttribute, [out] VARIANT *pvarValue)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
HRESULT AdviseMouseSink ([in] ITfRangeACP *range, [in] ITfMouseSink *pSink, [out] DWORD *pdwCookie)
 
HRESULT UnadviseMouseSink ([in] DWORD dwCookie)
 

Protected Attributes

LONG m_cRefs
 
IUnknownm_pContext
 
DWORD m_dwCookie
 
FN_IC_OWNER_CALLBACK m_fnCallback
 
LPVOID m_pCallbackPV
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 23 of file inputcontext.h.

Constructor & Destructor Documentation

◆ CInputContextOwner()

CInputContextOwner::CInputContextOwner ( FN_IC_OWNER_CALLBACK  fnCallback,
LPVOID  pCallbackPV 
)

@unimplemented

Definition at line 17 of file inputcontext.cpp.

18{
19 m_dwCookie = -1;
20 m_fnCallback = fnCallback;
21 m_cRefs = 1;
22 m_pCallbackPV = pCallbackPV;
23}
FN_IC_OWNER_CALLBACK m_fnCallback
Definition: inputcontext.h:31

◆ ~CInputContextOwner()

CInputContextOwner::~CInputContextOwner ( )
virtual

@implemented

Definition at line 26 of file inputcontext.cpp.

27{
28}

Member Function Documentation

◆ _Advise()

HRESULT CInputContextOwner::_Advise ( IUnknown pContext)

@implemented

Definition at line 31 of file inputcontext.cpp.

32{
33 ITfSource *pSource = NULL;
34
36
38 if (SUCCEEDED(m_pContext->QueryInterface(IID_ITfSource, (LPVOID*)&pSource)) &&
39 SUCCEEDED(pSource->AdviseSink(IID_ITfContextOwner,
40 static_cast<ITfContextOwner*>(this), &m_dwCookie)))
41 {
42 m_pContext = pContext;
44 hr = S_OK;
45 }
46
47 if (pSource)
48 pSource->Release();
49
50 return hr;
51}
IUnknown * m_pContext
Definition: inputcontext.h:29
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
ULONG AddRef()
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
nsrefcnt Release()
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hr
Definition: shlfolder.c:183

◆ _Unadvise()

HRESULT CInputContextOwner::_Unadvise ( )

@implemented

Definition at line 54 of file inputcontext.cpp.

55{
56 ITfSource *pSource = NULL;
57
59 if (m_pContext)
60 {
61 if (SUCCEEDED(m_pContext->QueryInterface(IID_ITfSource, (LPVOID*)&pSource)) &&
62 SUCCEEDED(pSource->UnadviseSink(m_dwCookie)))
63 {
64 hr = S_OK;
65 }
66 }
67
68 if (m_pContext)
69 {
72 }
73
74 if (pSource)
75 pSource->Release();
76
77 return hr;
78}
ULONG Release()

Referenced by CicInputContext::DestroyInputContext().

◆ AdviseMouseSink()

STDMETHODIMP CInputContextOwner::AdviseMouseSink ( ITfRangeACP range,
ITfMouseSink pSink,
DWORD pdwCookie 
)
override

@implemented

Implements ITfMouseTrackerACP.

Definition at line 162 of file inputcontext.cpp.

166{
167 MOUSE_SINK_ARGS args = { range, pSink, pdwCookie };
168 return m_fnCallback(9, &args, m_pCallbackPV);
169}
GLenum GLint * range
Definition: glext.h:7539
Definition: match.c:390

◆ GetACPFromPoint()

STDMETHODIMP CInputContextOwner::GetACPFromPoint ( const POINT ptScreen,
DWORD  dwFlags,
LONG pacp 
)
override

@unimplemented

Implements ITfContextOwner.

Definition at line 111 of file inputcontext.cpp.

115{
116 return E_NOTIMPL;
117}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetAttribute()

STDMETHODIMP CInputContextOwner::GetAttribute ( REFGUID  rguidAttribute,
VARIANT pvarValue 
)
override

@unimplemented

Implements ITfContextOwner.

Definition at line 149 of file inputcontext.cpp.

150{
151 return E_NOTIMPL;
152}

◆ GetScreenExt()

STDMETHODIMP CInputContextOwner::GetScreenExt ( RECT prc)
override

@implemented

Implements ITfContextOwner.

Definition at line 131 of file inputcontext.cpp.

132{
133 return m_fnCallback(2, &prc, m_pCallbackPV);
134}
_Out_ LPRECT prc
Definition: ntgdi.h:1658

◆ GetStatus()

STDMETHODIMP CInputContextOwner::GetStatus ( TF_STATUS *  pdcs)
override

@implemented

Implements ITfContextOwner.

Definition at line 137 of file inputcontext.cpp.

138{
139 return m_fnCallback(6, &pdcs, m_pCallbackPV);
140}

◆ GetTextExt()

STDMETHODIMP CInputContextOwner::GetTextExt ( LONG  acpStart,
LONG  acpEnd,
RECT prc,
BOOL pfClipped 
)
override

@unimplemented

Implements ITfContextOwner.

Definition at line 121 of file inputcontext.cpp.

126{
127 return E_NOTIMPL;
128}

◆ GetWnd()

STDMETHODIMP CInputContextOwner::GetWnd ( HWND phwnd)
override

@unimplemented

Implements ITfContextOwner.

Definition at line 143 of file inputcontext.cpp.

144{
145 return m_fnCallback(7, &phwnd, m_pCallbackPV);
146}

◆ QueryInterface()

STDMETHODIMP CInputContextOwner::QueryInterface ( REFIID  riid,
LPVOID ppvObj 
)
override

@implemented

Definition at line 81 of file inputcontext.cpp.

82{
83 static const QITAB c_tab[] =
84 {
87 { NULL }
88 };
89 return ::QISearch(this, c_tab, riid, ppvObj);
90}
REFIID riid
Definition: atlbase.h:39
#define QITABENT(Cthis, Ifoo)
Definition: shlwapi.h:2096

◆ STDMETHODIMP_() [1/2]

CInputContextOwner::STDMETHODIMP_ ( ULONG  )
override

◆ STDMETHODIMP_() [2/2]

CInputContextOwner::STDMETHODIMP_ ( ULONG  )
override

◆ UnadviseMouseSink()

STDMETHODIMP CInputContextOwner::UnadviseMouseSink ( DWORD  dwCookie)
override

@implemented

Implements ITfMouseTrackerACP.

Definition at line 172 of file inputcontext.cpp.

173{
174 return m_fnCallback(10, &dwCookie, m_pCallbackPV);
175}

Member Data Documentation

◆ m_cRefs

LONG CInputContextOwner::m_cRefs
protected

Definition at line 28 of file inputcontext.h.

Referenced by CInputContextOwner(), and STDMETHODIMP_().

◆ m_dwCookie

DWORD CInputContextOwner::m_dwCookie
protected

Definition at line 30 of file inputcontext.h.

Referenced by _Advise(), _Unadvise(), and CInputContextOwner().

◆ m_fnCallback

FN_IC_OWNER_CALLBACK CInputContextOwner::m_fnCallback
protected

◆ m_pCallbackPV

LPVOID CInputContextOwner::m_pCallbackPV
protected

◆ m_pContext

IUnknown* CInputContextOwner::m_pContext
protected

Definition at line 29 of file inputcontext.h.

Referenced by _Advise(), and _Unadvise().


The documentation for this class was generated from the following files: