[PATCH 1/5] uianimation: Add IUIAnimationManager stub

Vijay Kiran Kamuju infyquest at gmail.com
Wed Apr 3 12:15:34 CDT 2019


Based on the patch from Louis Lenders <xerox.xerox2000x at gmail.com>
Split into smaller chunks for each stub interface

From: Vijay Kiran Kamuju <infyquest at gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest at gmail.com>
---
 dlls/uianimation/Makefile.in |   2 +
 dlls/uianimation/main.c      | 236 +++++++++++++++++++++++++++++++++++
 2 files changed, 238 insertions(+)

diff --git a/dlls/uianimation/Makefile.in b/dlls/uianimation/Makefile.in
index b504181b9a..cb33313f7b 100644
--- a/dlls/uianimation/Makefile.in
+++ b/dlls/uianimation/Makefile.in
@@ -1,4 +1,6 @@
 MODULE    = uianimation.dll
 
+IMPORTS   = uuid
+
 C_SRCS = \
 	main.c
diff --git a/dlls/uianimation/main.c b/dlls/uianimation/main.c
index 92d594ff5d..6c41269223 100644
--- a/dlls/uianimation/main.c
+++ b/dlls/uianimation/main.c
@@ -21,19 +21,255 @@
 #include "config.h"
 #include <stdarg.h>
 
+#define COBJMACROS
+
 #include "windef.h"
 #include "winbase.h"
 #include "objbase.h"
 #include "rpcproxy.h"
 
+#include "initguid.h"
 #include "uianimation.h"
 
+#include "wine/heap.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(uianimation);
 
 static HINSTANCE hinstance;
 
+/***********************************************************************
+ *          IUIAnimationManager
+ */
+struct manager
+{
+    IUIAnimationManager IUIAnimationManager_iface;
+    LONG ref;
+};
+
+struct manager *impl_from_IUIAnimationManager( IUIAnimationManager *iface )
+{
+    return CONTAINING_RECORD( iface, struct manager, IUIAnimationManager_iface );
+}
+
+static HRESULT WINAPI manager_QueryInterface( IUIAnimationManager *iface, REFIID iid, void **obj )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+
+    TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj );
+
+    if (IsEqualIID( iid, &IID_IUnknown ) ||
+        IsEqualIID( iid, &IID_IUIAnimationManager ))
+    {
+        IUIAnimationManager_AddRef( iface );
+        *obj = iface;
+        return S_OK;
+    }
+
+    FIXME( "interface %s not implemented\n", debugstr_guid( iid ) );
+    *obj = NULL;
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI manager_AddRef( IUIAnimationManager *iface )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    ULONG ref = InterlockedIncrement( &This->ref );
+
+    TRACE( "(%p) ref = %u\n", This, ref );
+    return ref;
+}
+
+static ULONG WINAPI manager_Release( IUIAnimationManager *iface )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    ULONG ref = InterlockedDecrement(&This->ref);
+
+    TRACE( "(%p) ref = %u\n", This, ref );
+
+    if (!ref)
+    {
+        heap_free( This );
+    }
+
+    return ref;
+}
+
+static HRESULT WINAPI manager_CreateAnimationVariable( IUIAnimationManager *iface, DOUBLE initial_value, IUIAnimationVariable **variable )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_ScheduleTransition( IUIAnimationManager *iface, IUIAnimationVariable *variable, IUIAnimationTransition *transition, UI_ANIMATION_SECONDS current_time )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_CreateStoryboard( IUIAnimationManager *iface, IUIAnimationStoryboard **storyboard )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_FinishAllStoryboards( IUIAnimationManager *iface, UI_ANIMATION_SECONDS max_time )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_AbandonAllStoryboards( IUIAnimationManager *iface )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_Update( IUIAnimationManager *iface, UI_ANIMATION_SECONDS cur_time, UI_ANIMATION_UPDATE_RESULT *update_result )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    *update_result=UI_ANIMATION_UPDATE_VARIABLES_CHANGED;
+    return S_OK;
+}
+
+static HRESULT WINAPI manager_GetVariableFromTag( IUIAnimationManager *iface, IUnknown *object, UINT32 id, IUIAnimationVariable **variable )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_GetStoryboardFromTag( IUIAnimationManager *iface, IUnknown *object, UINT32 id, IUIAnimationStoryboard **storyboard )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_GetStatus( IUIAnimationManager *iface, UI_ANIMATION_MANAGER_STATUS *status )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_SetAnimationMode( IUIAnimationManager *iface, UI_ANIMATION_MODE mode )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return S_OK;
+}
+
+static HRESULT WINAPI manager_Pause( IUIAnimationManager *iface )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_Resume( IUIAnimationManager *iface )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_SetManagerEventHandler( IUIAnimationManager *iface, IUIAnimationManagerEventHandler *handler )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return S_OK;
+}
+
+static HRESULT WINAPI manager_SetCancelPriorityComparison( IUIAnimationManager *iface, IUIAnimationPriorityComparison *comparison )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_SetTrimPriorityComparison( IUIAnimationManager *iface, IUIAnimationPriorityComparison *comparison )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_SetCompressPriorityComparison( IUIAnimationManager *iface, IUIAnimationPriorityComparison *comparison)
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_SetConcludePriorityComparison( IUIAnimationManager *iface, IUIAnimationPriorityComparison *comparison )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_SetDefaultLongestAcceptableDelay( IUIAnimationManager *iface, UI_ANIMATION_SECONDS delay )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI manager_Shutdown( IUIAnimationManager *iface )
+{
+    struct manager *This = impl_from_IUIAnimationManager( iface );
+    FIXME( "stub (%p)->(  )\n", This );
+    return E_NOTIMPL;
+}
+
+const struct IUIAnimationManagerVtbl manager_vtbl =
+{
+    manager_QueryInterface,
+    manager_AddRef,
+    manager_Release,
+    manager_CreateAnimationVariable,
+    manager_ScheduleTransition,
+    manager_CreateStoryboard,
+    manager_FinishAllStoryboards,
+    manager_AbandonAllStoryboards,
+    manager_Update,
+    manager_GetVariableFromTag,
+    manager_GetStoryboardFromTag,
+    manager_GetStatus,
+    manager_SetAnimationMode,
+    manager_Pause,
+    manager_Resume,
+    manager_SetManagerEventHandler,
+    manager_SetCancelPriorityComparison,
+    manager_SetTrimPriorityComparison,
+    manager_SetCompressPriorityComparison,
+    manager_SetConcludePriorityComparison,
+    manager_SetDefaultLongestAcceptableDelay,
+    manager_Shutdown
+};
+
+HRESULT manager_create( IUnknown *outer, REFIID iid, void **obj )
+{
+    struct manager *This = heap_alloc( sizeof(*This) );
+    HRESULT hr;
+
+    if (!This) return E_OUTOFMEMORY;
+    This->IUIAnimationManager_iface.lpVtbl = &manager_vtbl;
+    This->ref = 1;
+
+    hr = IUIAnimationManager_QueryInterface( &This->IUIAnimationManager_iface, iid, obj );
+
+    IUIAnimationManager_Release( &This->IUIAnimationManager_iface );
+    return hr;
+}
+
 BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved )
 {
     TRACE("(%p %d %p)\n", dll, reason, reserved);
-- 
2.21.0




More information about the wine-devel mailing list