87 ITfThreadMgr_Release(
tm);
90 if (
This->contextStack[0])
91 ITfContext_Release(
This->contextStack[0]);
92 if (
This->contextStack[1])
93 ITfContext_Release(
This->contextStack[1]);
106 *ppvOut = &
This->ITfDocumentMgr_iface;
110 *ppvOut = &
This->ITfSource_iface;
112 else if (
IsEqualIID(iid, &IID_ITfCompartmentMgr))
114 *ppvOut =
This->CompartmentMgr;
119 ITfDocumentMgr_AddRef(iface);
153 TRACE(
"(%p) 0x%x 0x%x %p %p %p\n",
This,tidOwner,
dwFlags,punk,ppic,pecTextStore);
164 if (
This->contextStack[1])
165 return TF_E_STACKFULL;
167 if (!pic ||
FAILED(ITfContext_QueryInterface(pic,&IID_ITfContext,(
LPVOID*) &
check)))
171 ITfThreadMgrEventSink_OnInitDocumentMgr(
This->ThreadMgrSink,iface);
173 This->contextStack[1] =
This->contextStack[0];
177 ITfThreadMgrEventSink_OnPushContext(
This->ThreadMgrSink,
check);
192 if (
This->contextStack[
i])
194 ITfThreadMgrEventSink_OnPopContext(
This->ThreadMgrSink,
This->contextStack[
i]);
196 ITfContext_Release(
This->contextStack[
i]);
200 ITfThreadMgrEventSink_OnUninitDocumentMgr(
This->ThreadMgrSink, iface);
210 ITfThreadMgrEventSink_OnPopContext(
This->ThreadMgrSink,
This->contextStack[0]);
212 ITfContext_Release(
This->contextStack[0]);
213 This->contextStack[0] =
This->contextStack[1];
217 ITfThreadMgrEventSink_OnUninitDocumentMgr(
This->ThreadMgrSink, iface);
229 if (
This->contextStack[0])
230 ITfContext_AddRef(
This->contextStack[0]);
232 *ppic =
This->contextStack[0];
246 if (
This->contextStack[1])
247 tgt =
This->contextStack[1];
249 tgt =
This->contextStack[0];
252 ITfContext_AddRef(tgt);
282 return ITfDocumentMgr_QueryInterface(&
This->ITfDocumentMgr_iface, iid, ppvOut);
288 return ITfDocumentMgr_AddRef(&
This->ITfDocumentMgr_iface);
294 return ITfDocumentMgr_Release(&
This->ITfDocumentMgr_iface);
307 if (!
riid || !punk || !pdwCookie)
312 WARN(
"semi-stub for ITfTransitoryExtensionSink: callback won't be used.\n");
313 return advise_sink(&
This->TransitoryExtensionSink, &IID_ITfTransitoryExtensionSink,
353 This->ThreadMgrSink = ThreadMgrSink;
358 *ppOut = &
This->ITfDocumentMgr_iface;
359 TRACE(
"returning %p\n", *ppOut);
379 *ppvOut = &
This->IEnumTfContexts_iface;
384 IEnumTfContexts_AddRef(iface);
419 while (fetched < ulCount)
424 if (!
This->docmgr->contextStack[
This->index])
427 *rgContext =
This->docmgr->contextStack[
This->index];
428 ITfContext_AddRef(*rgContext);
435 if (pcFetched) *pcFetched = fetched;
497 *ppOut = &
This->IEnumTfContexts_iface;
498 TRACE(
"returning %p\n", *ppOut);
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_init(struct list_entry *head)
HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *iface)
HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut)
#define HeapFree(x, y, z)
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 HRESULT WINAPI DocumentMgr_QueryInterface(ITfDocumentMgr *iface, REFIID iid, LPVOID *ppvOut)
static ULONG WINAPI DocumentMgr_Release(ITfDocumentMgr *iface)
static DocumentMgr * impl_from_ITfDocumentMgr(ITfDocumentMgr *iface)
static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic)
static HRESULT WINAPI DocumentMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCookie)
static HRESULT WINAPI DocumentMgrSource_AdviseSink(ITfSource *iface, REFIID riid, IUnknown *punk, DWORD *pdwCookie)
static ULONG WINAPI EnumTfContext_Release(IEnumTfContexts *iface)
static HRESULT WINAPI EnumTfContext_Next(IEnumTfContexts *iface, ULONG ulCount, ITfContext **rgContext, ULONG *pcFetched)
static const ITfSourceVtbl DocumentMgrSourceVtbl
static HRESULT WINAPI DocumentMgr_EnumContexts(ITfDocumentMgr *iface, IEnumTfContexts **ppEnum)
static HRESULT WINAPI EnumTfContext_Reset(IEnumTfContexts *iface)
static DocumentMgr * impl_from_ITfSource(ITfSource *iface)
static const ITfDocumentMgrVtbl DocumentMgrVtbl
static ULONG WINAPI DocumentMgr_AddRef(ITfDocumentMgr *iface)
static HRESULT WINAPI DocumentMgr_CreateContext(ITfDocumentMgr *iface, TfClientId tidOwner, DWORD dwFlags, IUnknown *punk, ITfContext **ppic, TfEditCookie *pecTextStore)
static ULONG WINAPI DocumentMgrSource_AddRef(ITfSource *iface)
static ULONG WINAPI DocumentMgrSource_Release(ITfSource *iface)
static const IEnumTfContextsVtbl IEnumTfContexts_Vtbl
static ULONG WINAPI EnumTfContext_AddRef(IEnumTfContexts *iface)
static HRESULT WINAPI DocumentMgr_GetBase(ITfDocumentMgr *iface, ITfContext **ppic)
static EnumTfContext * impl_from_IEnumTfContexts(IEnumTfContexts *iface)
struct tagDocumentMgr DocumentMgr
static HRESULT EnumTfContext_Constructor(DocumentMgr *mgr, IEnumTfContexts **ppOut)
static HRESULT WINAPI EnumTfContext_Skip(IEnumTfContexts *iface, ULONG celt)
struct tagEnumTfContext EnumTfContext
static HRESULT WINAPI EnumTfContext_Clone(IEnumTfContexts *iface, IEnumTfContexts **ppenum)
static HRESULT WINAPI DocumentMgrSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink *ThreadMgrSink, ITfDocumentMgr **ppOut)
static HRESULT WINAPI EnumTfContext_QueryInterface(IEnumTfContexts *iface, REFIID iid, LPVOID *ppvOut)
static void EnumTfContext_Destructor(EnumTfContext *This)
static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags)
static HRESULT WINAPI DocumentMgr_GetTop(ITfDocumentMgr *iface, ITfContext **ppic)
static void DocumentMgr_Destructor(DocumentMgr *This)
#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
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
#define IsEqualIID(riid1, riid2)
ITfThreadMgrEventSink * ThreadMgrSink
ITfSource ITfSource_iface
ITfDocumentMgr ITfDocumentMgr_iface
ITfContext * contextStack[2]
struct list TransitoryExtensionSink
ITfCompartmentMgr * CompartmentMgr
IEnumTfContexts IEnumTfContexts_iface
#define CONTAINING_RECORD(address, type, field)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags