Aric Stewart : msctf: Stub implementation of ITfSourceSingle for ITfContext .

Alexandre Julliard julliard at winehq.org
Sat Aug 29 11:35:49 CDT 2009


Module: wine
Branch: master
Commit: e00bc2d3068ef118bf9d61cbfa9eb1d5dac89b12
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e00bc2d3068ef118bf9d61cbfa9eb1d5dac89b12

Author: Aric Stewart <aric at codeweavers.com>
Date:   Fri Aug 28 14:08:20 2009 -0500

msctf: Stub implementation of ITfSourceSingle for ITfContext.

---

 dlls/msctf/context.c |   59 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 58 insertions(+), 1 deletions(-)

diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c
index 5be06d3..5335940 100644
--- a/dlls/msctf/context.c
+++ b/dlls/msctf/context.c
@@ -64,7 +64,7 @@ typedef struct tagContext {
     const ITfInsertAtSelectionVtbl *InsertAtSelectionVtbl;
     /* const ITfMouseTrackerVtbl *MouseTrackerVtbl; */
     /* const ITfQueryEmbeddedVtbl *QueryEmbeddedVtbl; */
-    /* const ITfSourceSingleVtbl *SourceSingleVtbl; */
+    const ITfSourceSingleVtbl *SourceSingleVtbl;
     LONG refCount;
     BOOL connected;
 
@@ -117,6 +117,11 @@ static inline Context *impl_from_ITfInsertAtSelectionVtbl(ITfInsertAtSelection*i
     return (Context *)((char *)iface - FIELD_OFFSET(Context,InsertAtSelectionVtbl));
 }
 
+static inline Context *impl_from_ITfSourceSingleVtbl(ITfSourceSingle* iface)
+{
+    return (Context *)((char *)iface - FIELD_OFFSET(Context,SourceSingleVtbl));
+}
+
 static void free_sink(ContextSink *sink)
 {
         IUnknown_Release(sink->interfaces.pIUnknown);
@@ -204,6 +209,10 @@ static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVO
     {
         *ppvOut = This->CompartmentMgr;
     }
+    else if (IsEqualIID(iid, &IID_ITfSourceSingle))
+    {
+        *ppvOut = &This->SourceSingleVtbl;
+    }
 
     if (*ppvOut)
     {
@@ -729,6 +738,53 @@ static const ITfInsertAtSelectionVtbl Context_InsertAtSelectionVtbl =
     InsertAtSelection_InsertEmbeddedAtSelection,
 };
 
+/*****************************************************
+ * ITfSourceSingle functions
+ *****************************************************/
+static HRESULT WINAPI SourceSingle_QueryInterface(ITfSourceSingle *iface, REFIID iid, LPVOID *ppvOut)
+{
+    Context *This = impl_from_ITfSourceSingleVtbl(iface);
+    return Context_QueryInterface((ITfContext *)This, iid, *ppvOut);
+}
+
+static ULONG WINAPI SourceSingle_AddRef(ITfSourceSingle *iface)
+{
+    Context *This = impl_from_ITfSourceSingleVtbl(iface);
+    return Context_AddRef((ITfContext *)This);
+}
+
+static ULONG WINAPI SourceSingle_Release(ITfSourceSingle *iface)
+{
+    Context *This = impl_from_ITfSourceSingleVtbl(iface);
+    return Context_Release((ITfContext *)This);
+}
+
+static WINAPI HRESULT SourceSingle_AdviseSingleSink( ITfSourceSingle *iface,
+    TfClientId tid, REFIID riid, IUnknown *punk)
+{
+    Context *This = impl_from_ITfSourceSingleVtbl(iface);
+    FIXME("STUB:(%p) %i %s %p\n",This, tid, debugstr_guid(riid),punk);
+    return E_NOTIMPL;
+}
+
+static WINAPI HRESULT SourceSingle_UnadviseSingleSink( ITfSourceSingle *iface,
+    TfClientId tid, REFIID riid)
+{
+    Context *This = impl_from_ITfSourceSingleVtbl(iface);
+    FIXME("STUB:(%p) %i %s\n",This, tid, debugstr_guid(riid));
+    return E_NOTIMPL;
+}
+
+static const ITfSourceSingleVtbl Context_SourceSingleVtbl =
+{
+    SourceSingle_QueryInterface,
+    SourceSingle_AddRef,
+    SourceSingle_Release,
+
+    SourceSingle_AdviseSingleSink,
+    SourceSingle_UnadviseSingleSink,
+};
+
 HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore)
 {
     Context *This;
@@ -750,6 +806,7 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr
     This->ContextVtbl= &Context_ContextVtbl;
     This->SourceVtbl = &Context_SourceVtbl;
     This->InsertAtSelectionVtbl = &Context_InsertAtSelectionVtbl;
+    This->SourceSingleVtbl = &Context_SourceSingleVtbl;
     This->refCount = 1;
     This->tidOwner = tidOwner;
     This->connected = FALSE;




More information about the wine-cvs mailing list