14#include <msctf_undoc.h>
34 , m_pCompartmentMgr(
NULL)
35 , m_pThreadMgrSink(threadMgrSink)
48 TRACE(
"destroying %p\n",
this);
92 ERR(
"!pThreadMgrSink\n");
99 ERR(
"E_OUTOFMEMORY\n");
104 TRACE(
"returning %p\n", *ppOut);
115 else if (iid == IID_ITfSource)
117 else if (iid == IID_ITfCompartmentMgr)
132 TRACE(
"%p -> ()\n",
this);
133 return ::InterlockedIncrement(&
m_cRefs);
138 TRACE(
"%p -> ()\n",
this);
153 TRACE(
"%p -> (%d, 0x%lX, %p, %p, %p)\n",
this, tidOwner,
dwFlags, punk, ppic, pecTextStore);
159 TRACE(
"%p -> (%p)\n",
this, pic);
163 ERR(
"TF_E_STACKFULL\n");
164 return TF_E_STACKFULL;
177 ERR(
"hr: 0x%lX\n",
hr);
222 ERR(
"!m_contextStack[1]\n");
243 TRACE(
"%p -> (%p)\n",
this, ppic);
260 TRACE(
"%p -> (%p)\n",
this, ppic);
277 TRACE(
"%p -> (%p)\n",
this, ppEnum);
285 if (!punk || !pdwCookie)
288 if (
riid != IID_ITfTransitoryExtensionSink)
301 TRACE(
"%p -> (%p)\n",
this, pdwCookie);
341 ERR(
"E_OUTOFMEMORY\n");
346 TRACE(
"returning %p\n", *ppOut);
371 TRACE(
"%p -> ()\n",
this);
372 return ::InterlockedIncrement(&
m_cRefs);
377 TRACE(
"%p -> ()\n",
this);
386 TRACE(
"%p -> (%lu, %p, %p)\n",
this, ulCount, rgContext, pcFetched);
395 for (fetched = 0; fetched < ulCount; ++fetched, ++
m_index, ++rgContext)
408 *pcFetched = fetched;
415 TRACE(
"%p -> (%lu)\n",
this, celt);
422 TRACE(
"%p -> ()\n",
this);
429 TRACE(
"%p -> (%p)\n",
this, ppenum);
440 ERR(
"E_OUTOFMEMORY\n");
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT Context_Uninitialize(ITfContext *iface)
HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore)
HRESULT Context_Initialize(ITfContext *iface, ITfDocumentMgr *manager)
static void list_init(struct list_entry *head)
STDMETHODIMP Push(ITfContext *pic) override
struct list m_transitoryExtensionSink
STDMETHODIMP CreateContext(TfClientId tidOwner, DWORD dwFlags, IUnknown *punk, ITfContext **ppic, TfEditCookie *pecTextStore) override
STDMETHODIMP Pop(DWORD dwFlags) override
STDMETHODIMP UnadviseSink(DWORD pdwCookie) override
STDMETHODIMP GetTop(ITfContext **ppic) override
static HRESULT CreateInstance(_In_ ITfThreadMgrEventSink *pThreadMgrSink, _Out_ ITfDocumentMgr **ppOut)
STDMETHODIMP EnumContexts(IEnumTfContexts **ppEnum) override
ITfThreadMgrEventSink * m_pThreadMgrSink
STDMETHODIMP GetBase(ITfContext **ppic) override
STDMETHODIMP QueryInterface(REFIID iid, LPVOID *ppvObject) override
CDocumentMgr(ITfThreadMgrEventSink *threadMgrSink)
ITfCompartmentMgr * m_pCompartmentMgr
STDMETHODIMP AdviseSink(REFIID riid, IUnknown *punk, DWORD *pdwCookie) override
ITfContext * m_contextStack[2]
STDMETHODIMP QueryInterface(REFIID iid, LPVOID *ppvObject) override
STDMETHODIMP Reset() override
static HRESULT CreateInstance(_In_opt_ CDocumentMgr *mgr, _Out_ IEnumTfContexts **ppOut)
virtual ~CEnumTfContext()
CEnumTfContext(_In_opt_ CDocumentMgr *mgr)
STDMETHODIMP Next(ULONG ulCount, ITfContext **rgContext, ULONG *pcFetched) override
STDMETHODIMP Skip(ULONG celt) override
STDMETHODIMP Clone(IEnumTfContexts **ppenum) override
HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut)
EXTERN_C HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink *pThreadMgrSink, ITfDocumentMgr **ppOut)
EXTERN_C HRESULT EnumTfContext_Constructor(CDocumentMgr *mgr, IEnumTfContexts **ppOut)
#define check(expected, result)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HRESULT OnUninitDocumentMgr([in] ITfDocumentMgr *pdim)
HRESULT OnPopContext([in] ITfContext *pic)
HRESULT OnInitDocumentMgr([in] ITfDocumentMgr *pdim)
HRESULT OnPushContext([in] ITfContext *pic)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
DWORD get_Cookie_magic(DWORD id)
HRESULT unadvise_sink(DWORD cookie)
void free_sinks(struct list *sink_list)
HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim)
HRESULT advise_sink(struct list *sink_list, REFIID riid, DWORD cookie_magic, IUnknown *unk, DWORD *cookie)
#define COOKIE_MAGIC_DMSINK
void ThreadMgr_OnDocumentMgrDestruction(ITfThreadMgr *tm, ITfDocumentMgr *mgr) DECLSPEC_HIDDEN
static __inline const char * wine_dbgstr_guid(const GUID *id)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject