[MSIMTF]
authorThomas Faber <thomas.faber@reactos.org>
Fri, 26 Jun 2015 12:27:54 +0000 (12:27 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 26 Jun 2015 12:27:54 +0000 (12:27 +0000)
- Add a stub implementation for IActiveIMMMessagePumpOwner.
- Use #ifdef __REACTOS__ to mark a ROS-diff
CORE-4953 #resolve

svn path=/trunk/; revision=68275

reactos/dll/win32/msimtf/activeimmapp.c
reactos/dll/win32/msimtf/msimtf_ros.diff
reactos/dll/win32/msimtf/precomp.h
reactos/include/psdk/dimm.idl

index 30ce15f..8ecd16a 100644 (file)
@@ -22,6 +22,7 @@
 
 typedef struct tagActiveIMMApp {
     IActiveIMMApp IActiveIMMApp_iface;
+    IActiveIMMMessagePumpOwner IActiveIMMMessagePumpOwner_iface;
     LONG refCount;
 } ActiveIMMApp;
 
@@ -46,6 +47,10 @@ static HRESULT WINAPI ActiveIMMApp_QueryInterface (IActiveIMMApp* iface,
     {
         *ppvOut = This;
     }
+    else if (IsEqualIID(iid, &IID_IActiveIMMMessagePumpOwner))
+    {
+        *ppvOut = &This->IActiveIMMMessagePumpOwner_iface;
+    }
 
     if (*ppvOut)
     {
@@ -639,7 +644,9 @@ static HRESULT WINAPI ActiveIMMApp_Deactivate(IActiveIMMApp* This)
 static HRESULT WINAPI ActiveIMMApp_OnDefWindowProc(IActiveIMMApp* This,
         HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
 {
-    //FIXME("Stub (%p %x %lx %lx)\n",hWnd,Msg,wParam,lParam);
+#ifndef __REACTOS__
+    FIXME("Stub (%p %x %lx %lx)\n",hWnd,Msg,wParam,lParam);
+#endif
     return E_FAIL;
 }
 
@@ -792,6 +799,80 @@ static const IActiveIMMAppVtbl ActiveIMMAppVtbl =
     ActiveIMMApp_EnumInputContext
 };
 
+static inline ActiveIMMApp *impl_from_IActiveIMMMessagePumpOwner(IActiveIMMMessagePumpOwner *iface)
+{
+    return CONTAINING_RECORD(iface, ActiveIMMApp, IActiveIMMMessagePumpOwner_iface);
+}
+
+static HRESULT WINAPI ActiveIMMMessagePumpOwner_QueryInterface(IActiveIMMMessagePumpOwner* iface,
+        REFIID iid, LPVOID *ppvOut)
+{
+    ActiveIMMApp *This = impl_from_IActiveIMMMessagePumpOwner(iface);
+    return IActiveIMMApp_QueryInterface(&This->IActiveIMMApp_iface, iid, ppvOut);
+}
+
+static ULONG WINAPI ActiveIMMMessagePumpOwner_AddRef(IActiveIMMMessagePumpOwner* iface)
+{
+    ActiveIMMApp *This = impl_from_IActiveIMMMessagePumpOwner(iface);
+    return IActiveIMMApp_AddRef(&This->IActiveIMMApp_iface);
+}
+
+static ULONG WINAPI ActiveIMMMessagePumpOwner_Release(IActiveIMMMessagePumpOwner* iface)
+{
+    ActiveIMMApp *This = impl_from_IActiveIMMMessagePumpOwner(iface);
+    return IActiveIMMApp_Release(&This->IActiveIMMApp_iface);
+}
+
+static HRESULT WINAPI ActiveIMMMessagePumpOwner_Start(IActiveIMMMessagePumpOwner* iface)
+{
+    ActiveIMMApp *This = impl_from_IActiveIMMMessagePumpOwner(iface);
+    FIXME("(%p)->(): stub\n", This);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ActiveIMMMessagePumpOwner_End(IActiveIMMMessagePumpOwner* iface)
+{
+    ActiveIMMApp *This = impl_from_IActiveIMMMessagePumpOwner(iface);
+    FIXME("(%p)->(): stub\n", This);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ActiveIMMMessagePumpOwner_OnTranslateMessage(IActiveIMMMessagePumpOwner* iface,
+        const MSG *msg)
+{
+    ActiveIMMApp *This = impl_from_IActiveIMMMessagePumpOwner(iface);
+    FIXME("(%p)->(%p): stub\n", This, msg);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ActiveIMMMessagePumpOwner_Pause(IActiveIMMMessagePumpOwner* iface,
+        DWORD *cookie)
+{
+    ActiveIMMApp *This = impl_from_IActiveIMMMessagePumpOwner(iface);
+    FIXME("(%p)->(%p): stub\n", This, cookie);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ActiveIMMMessagePumpOwner_Resume(IActiveIMMMessagePumpOwner* iface,
+        DWORD cookie)
+{
+    ActiveIMMApp *This = impl_from_IActiveIMMMessagePumpOwner(iface);
+    FIXME("(%p)->(%u): stub\n", This, cookie);
+    return E_NOTIMPL;
+}
+
+static const IActiveIMMMessagePumpOwnerVtbl ActiveIMMMessagePumpOwnerVtbl =
+{
+    ActiveIMMMessagePumpOwner_QueryInterface,
+    ActiveIMMMessagePumpOwner_AddRef,
+    ActiveIMMMessagePumpOwner_Release,
+    ActiveIMMMessagePumpOwner_Start,
+    ActiveIMMMessagePumpOwner_End,
+    ActiveIMMMessagePumpOwner_OnTranslateMessage,
+    ActiveIMMMessagePumpOwner_Pause,
+    ActiveIMMMessagePumpOwner_Resume,
+};
+
 DECLSPEC_HIDDEN HRESULT ActiveIMMApp_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
 {
     ActiveIMMApp *This;
@@ -803,6 +884,7 @@ DECLSPEC_HIDDEN HRESULT ActiveIMMApp_Constructor(IUnknown *pUnkOuter, IUnknown *
         return E_OUTOFMEMORY;
 
     This->IActiveIMMApp_iface.lpVtbl = &ActiveIMMAppVtbl;
+    This->IActiveIMMMessagePumpOwner_iface.lpVtbl = &ActiveIMMMessagePumpOwnerVtbl;
     This->refCount = 1;
 
     TRACE("returning %p\n",This);
index 19c3b09..56aa85e 100644 (file)
@@ -1,13 +1,14 @@
 Index: activeimmapp.c
 ===================================================================
---- activeimmapp.c     (revision 48273)
+--- activeimmapp.c     (Wine c4be28ed)
 +++ activeimmapp.c     (working copy)
-@@ -655,7 +655,7 @@
+@@ -664,7 +644,9 @@
  static HRESULT WINAPI ActiveIMMApp_OnDefWindowProc(IActiveIMMApp* This,
          HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
  {
--    FIXME("Stub (%p %x %lx %lx)\n",hWnd,Msg,wParam,lParam);
-+    //FIXME("Stub (%p %x %lx %lx)\n",hWnd,Msg,wParam,lParam);
++#ifndef __REACTOS__
+     FIXME("Stub (%p %x %lx %lx)\n",hWnd,Msg,wParam,lParam);
++#endif
      return E_FAIL;
  }
  
index bf62888..43a5d4a 100644 (file)
@@ -14,6 +14,7 @@
 #include <windef.h>
 #include <winbase.h>
 #include <wingdi.h>
+#include <winuser.h>
 #include <objbase.h>
 #include <dimm.h>
 
index 645506b..3fd8ca1 100644 (file)
@@ -580,6 +580,20 @@ interface IActiveIMMApp : IUnknown
             [out] IEnumInputContext **ppEnum);
 }
 
+[
+    object,
+    uuid(b5cf2cfa-8aeb-11d1-9364-0060b067b86e),
+    pointer_default(unique)
+]
+interface IActiveIMMMessagePumpOwner : IUnknown
+{
+    HRESULT Start();
+    HRESULT End();
+    HRESULT OnTranslateMessage([in] const MSG *msg);
+    HRESULT Pause([out] DWORD *cookie);
+    HRESULT Resume([in] DWORD cookie);
+}
+
 [
     uuid(4955dd33-b159-11d0-8fcf-00aa006bcc59)
 ]
@@ -588,6 +602,5 @@ coclass CActiveIMM
     [default] interface IActiveIMMApp;
     /* interface IActiveIMMIME; */
     /* interface IActiveIMMRegistrar; */
-    /* interface IActiveIMMMessagePumpOwner; */
+    interface IActiveIMMMessagePumpOwner;
 }
-