Based on the patch from Louis Lenders xerox.xerox2000x@gmail.com Split into smaller chunks for each stub interface
From: Vijay Kiran Kamuju infyquest@gmail.com Signed-off-by: Vijay Kiran Kamuju infyquest@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);
Based on patch from Louis Lenders xerox.xerox2000x@gmail.com
From: Vijay Kiran Kamuju infyquest@gmail.com Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/uianimation/main.c | 133 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+)
diff --git a/dlls/uianimation/main.c b/dlls/uianimation/main.c index 6c41269223..f59a4481c7 100644 --- a/dlls/uianimation/main.c +++ b/dlls/uianimation/main.c @@ -270,6 +270,139 @@ HRESULT manager_create( IUnknown *outer, REFIID iid, void **obj ) return hr; }
+/*********************************************************************** + * IUIAnimationTimer + */ +struct timer +{ + IUIAnimationTimer IUIAnimationTimer_iface; + LONG ref; +}; + +struct timer *impl_from_IUIAnimationTimer( IUIAnimationTimer *iface ) +{ + return CONTAINING_RECORD( iface, struct timer, IUIAnimationTimer_iface ); +} + +static HRESULT WINAPI timer_QueryInterface( IUIAnimationTimer *iface, REFIID iid, void **obj ) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + + TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj ); + + if (IsEqualIID( iid, &IID_IUnknown ) || + IsEqualIID( iid, &IID_IUIAnimationTimer )) + { + IUIAnimationTimer_AddRef( iface ); + *obj = iface; + return S_OK; + } + + FIXME( "interface %s not implemented\n", debugstr_guid( iid ) ); + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI timer_AddRef( IUIAnimationTimer *iface ) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + ULONG ref = InterlockedIncrement( &This->ref ); + + TRACE( "(%p) ref = %u\n", This, ref ); + return ref; +} + +static ULONG WINAPI timer_Release( IUIAnimationTimer *iface ) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE( "(%p) ref = %u\n", This, ref ); + + if (!ref) + heap_free( This ); + + return ref; +} + +static HRESULT WINAPI timer_SetTimerUpdateHandler (IUIAnimationTimer *iface, IUIAnimationTimerUpdateHandler *update_handler, UI_ANIMATION_IDLE_BEHAVIOR idle_behaviour) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI timer_SetTimerEventHandler (IUIAnimationTimer *iface, IUIAnimationTimerEventHandler *handler) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + FIXME( "stub (%p)->( )\n", This ); + return S_OK; +} + +static HRESULT WINAPI timer_Enable (IUIAnimationTimer *iface) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + FIXME( "stub (%p)->( )\n", This ); + return S_OK; +} + +static HRESULT WINAPI timer_Disable (IUIAnimationTimer *iface) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI timer_IsEnabled (IUIAnimationTimer *iface) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI timer_GetTime (IUIAnimationTimer *iface,UI_ANIMATION_SECONDS *seconds) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + FIXME( "stub (%p)->( )\n", This ); + return S_OK; +} + +static HRESULT WINAPI timer_SetFrameRateThreshold (IUIAnimationTimer *iface,UINT32 frames_per_sec) +{ + struct timer *This = impl_from_IUIAnimationTimer( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +const struct IUIAnimationTimerVtbl timer_vtbl = +{ + timer_QueryInterface, + timer_AddRef, + timer_Release, + timer_SetTimerUpdateHandler, + timer_SetTimerEventHandler, + timer_Enable, + timer_Disable, + timer_IsEnabled, + timer_GetTime, + timer_SetFrameRateThreshold, +}; + +HRESULT timer_create( IUnknown *outer, REFIID iid, void **obj ) +{ + struct timer *This = heap_alloc( sizeof(*This) ); + HRESULT hr; + + if (!This) return E_OUTOFMEMORY; + This->IUIAnimationTimer_iface.lpVtbl = &timer_vtbl; + This->ref = 1; + + hr = IUIAnimationTimer_QueryInterface( &This->IUIAnimationTimer_iface, iid, obj ); + + IUIAnimationTimer_Release( &This->IUIAnimationTimer_iface ); + return hr; +} + BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) { TRACE("(%p %d %p)\n", dll, reason, reserved);
Based on patch from Louis Lenders xerox.xerox2000x@gmail.com
From: Vijay Kiran Kamuju infyquest@gmail.com Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/uianimation/main.c | 85 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)
diff --git a/dlls/uianimation/main.c b/dlls/uianimation/main.c index f59a4481c7..743b598608 100644 --- a/dlls/uianimation/main.c +++ b/dlls/uianimation/main.c @@ -403,6 +403,91 @@ HRESULT timer_create( IUnknown *outer, REFIID iid, void **obj ) return hr; }
+/*********************************************************************** + * IUIAnimationTransitionFactory + */ +struct tr_factory +{ + IUIAnimationTransitionFactory IUIAnimationTransitionFactory_iface; + LONG ref; +}; + +struct tr_factory *impl_from_IUIAnimationTransitionFactory( IUIAnimationTransitionFactory *iface ) +{ + return CONTAINING_RECORD( iface, struct tr_factory, IUIAnimationTransitionFactory_iface ); +} + +static HRESULT WINAPI tr_factory_QueryInterface( IUIAnimationTransitionFactory *iface, REFIID iid, void **obj ) +{ + struct tr_factory *This = impl_from_IUIAnimationTransitionFactory( iface ); + + TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj ); + + if (IsEqualIID( iid, &IID_IUnknown ) || + IsEqualIID( iid, &IID_IUIAnimationTransitionFactory )) + { + IUIAnimationTransitionFactory_AddRef( iface ); + *obj = iface; + return S_OK; + } + + FIXME( "interface %s not implemented\n", debugstr_guid( iid ) ); + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI tr_factory_AddRef( IUIAnimationTransitionFactory *iface ) +{ + struct tr_factory *This = impl_from_IUIAnimationTransitionFactory( iface ); + ULONG ref = InterlockedIncrement( &This->ref ); + + TRACE( "(%p) ref = %u\n", This, ref ); + return ref; +} + +static ULONG WINAPI tr_factory_Release( IUIAnimationTransitionFactory *iface ) +{ + struct tr_factory *This = impl_from_IUIAnimationTransitionFactory( iface ); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE( "(%p) ref = %u\n", This, ref ); + + if (!ref) + heap_free( This ); + + return ref; +} + +static HRESULT WINAPI tr_factory_CreateTransition(IUIAnimationTransitionFactory *iface, IUIAnimationInterpolator *interpolator, IUIAnimationTransition **transition) +{ + struct tr_factory *This = impl_from_IUIAnimationTransitionFactory( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +const struct IUIAnimationTransitionFactoryVtbl tr_factory_vtbl = +{ + tr_factory_QueryInterface, + tr_factory_AddRef, + tr_factory_Release, + tr_factory_CreateTransition +}; + +HRESULT tr_factory_create( IUnknown *outer, REFIID iid, void **obj ) +{ + struct tr_factory *This = heap_alloc( sizeof(*This) ); + HRESULT hr; + + if (!This) return E_OUTOFMEMORY; + This->IUIAnimationTransitionFactory_iface.lpVtbl = &tr_factory_vtbl; + This->ref = 1; + + hr = IUIAnimationTransitionFactory_QueryInterface( &This->IUIAnimationTransitionFactory_iface, iid, obj ); + + IUIAnimationTransitionFactory_Release( &This->IUIAnimationTransitionFactory_iface ); + return hr; +} + BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) { TRACE("(%p %d %p)\n", dll, reason, reserved);
Based on patch from Louis Lenders xerox.xerox2000x@gmail.com
From: Vijay Kiran Kamuju infyquest@gmail.com Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/uianimation/main.c | 109 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+)
diff --git a/dlls/uianimation/main.c b/dlls/uianimation/main.c index 743b598608..765d116aeb 100644 --- a/dlls/uianimation/main.c +++ b/dlls/uianimation/main.c @@ -488,6 +488,115 @@ HRESULT tr_factory_create( IUnknown *outer, REFIID iid, void **obj ) return hr; }
+/*********************************************************************** + * IUIAnimationTransition + */ +struct animation_transition +{ + IUIAnimationTransition IUIAnimationTransition_iface; + LONG ref; +}; + +struct animation_transition *impl_from_IUIAnimationTransition( IUIAnimationTransition *iface ) +{ + return CONTAINING_RECORD( iface, struct animation_transition, IUIAnimationTransition_iface ); +} + +static HRESULT WINAPI WINAPI animation_transition_QueryInterface( IUIAnimationTransition *iface, REFIID iid, void **obj ) +{ + struct animation_transition *This = impl_from_IUIAnimationTransition( iface ); + + TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj ); + + if (IsEqualIID( iid, &IID_IUnknown ) || + IsEqualIID( iid, &IID_IUIAnimationTransition )) + { + IUIAnimationTransition_AddRef( iface ); + *obj = iface; + return S_OK; + } + + FIXME( "interface %s not implemented\n", debugstr_guid( iid ) ); + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI animation_transition_AddRef( IUIAnimationTransition *iface ) +{ + struct animation_transition *This = impl_from_IUIAnimationTransition( iface ); + ULONG ref = InterlockedIncrement( &This->ref ); + + TRACE( "(%p) ref = %u\n", This, ref ); + return ref; +} + +static ULONG WINAPI animation_transition_Release( IUIAnimationTransition *iface ) +{ + struct animation_transition *This = impl_from_IUIAnimationTransition( iface ); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE( "(%p) ref = %u\n", This, ref ); + + if (!ref) + heap_free( This ); + + return ref; +} + +static HRESULT WINAPI animation_transition_SetInitialValue ( IUIAnimationTransition *iface, DOUBLE value) +{ + struct animation_transition *This = impl_from_IUIAnimationTransition( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI animation_transition_SetInitialVelocity (IUIAnimationTransition *iface,DOUBLE velocity) +{ + struct animation_transition *This = impl_from_IUIAnimationTransition( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI animation_transition_IsDurationKnown (IUIAnimationTransition *iface) +{ + struct animation_transition *This = impl_from_IUIAnimationTransition( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI animation_transition_GetDuration (IUIAnimationTransition *iface, UI_ANIMATION_SECONDS *duration) +{ + struct animation_transition *This = impl_from_IUIAnimationTransition( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +const struct IUIAnimationTransitionVtbl animation_transition_vtbl = +{ + animation_transition_QueryInterface, + animation_transition_AddRef, + animation_transition_Release, + animation_transition_SetInitialValue, + animation_transition_SetInitialVelocity, + animation_transition_IsDurationKnown, + animation_transition_GetDuration +}; + +HRESULT animation_transition_create( IUnknown *outer, REFIID iid, void **obj ) +{ + struct animation_transition *This = heap_alloc( sizeof(*This) ); + HRESULT hr; + + if (!This) return E_OUTOFMEMORY; + This->IUIAnimationTransition_iface.lpVtbl = &animation_transition_vtbl; + This->ref = 1; + + hr = IUIAnimationTransition_QueryInterface( &This->IUIAnimationTransition_iface, iid, obj ); + + IUIAnimationTransition_Release( &This->IUIAnimationTransition_iface ); + return hr; +} + BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) { TRACE("(%p %d %p)\n", dll, reason, reserved);
Based on patch from Louis Lenders xerox.xerox2000x@gmail.com
From: Vijay Kiran Kamuju infyquest@gmail.com Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/uianimation/main.c | 219 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+)
diff --git a/dlls/uianimation/main.c b/dlls/uianimation/main.c index 765d116aeb..074b86e279 100644 --- a/dlls/uianimation/main.c +++ b/dlls/uianimation/main.c @@ -597,6 +597,225 @@ HRESULT animation_transition_create( IUnknown *outer, REFIID iid, void **obj ) return hr; }
+/*********************************************************************** + * IUITransitionLibrary + */ +struct tr_library +{ + IUIAnimationTransitionLibrary IUIAnimationTransitionLibrary_iface; + LONG ref; +}; + +struct tr_library *impl_from_IUIAnimationTransitionLibrary( IUIAnimationTransitionLibrary *iface ) +{ + return CONTAINING_RECORD( iface, struct tr_library, IUIAnimationTransitionLibrary_iface ); +} + +static HRESULT WINAPI WINAPI tr_library_QueryInterface( IUIAnimationTransitionLibrary *iface, REFIID iid, void **obj ) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + + TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj ); + + if (IsEqualIID( iid, &IID_IUnknown ) || + IsEqualIID( iid, &IID_IUIAnimationTransitionLibrary )) + { + IUIAnimationTransitionLibrary_AddRef( iface ); + *obj = iface; + return S_OK; + } + + FIXME( "interface %s not implemented\n", debugstr_guid( iid ) ); + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI tr_library_AddRef( IUIAnimationTransitionLibrary *iface ) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + ULONG ref = InterlockedIncrement( &This->ref ); + + TRACE( "(%p) ref = %u\n", This, ref ); + return ref; +} + +static ULONG WINAPI tr_library_Release( IUIAnimationTransitionLibrary *iface ) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE( "(%p) ref = %u\n", This, ref ); + + if (!ref) + heap_free( This ); + + return ref; +} + +static HRESULT WINAPI tr_library_CreateInstantaneousTransition(IUIAnimationTransitionLibrary *iface, + double finalValue, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + struct animation_transition *tr = heap_alloc( sizeof(*tr) ); + HRESULT hr; + + FIXME( "stub (%p)->( )\n", This ); + + if (!tr) return E_OUTOFMEMORY; + tr->IUIAnimationTransition_iface.lpVtbl = &animation_transition_vtbl; + tr->ref = 1; + + hr = animation_transition_QueryInterface( &tr->IUIAnimationTransition_iface, &IID_IUIAnimationTransition, (void **)transition ); + + IUIAnimationTransition_Release( &tr->IUIAnimationTransition_iface ); + return hr; +} + +static HRESULT WINAPI tr_library_CreateConstantTransition(IUIAnimationTransitionLibrary *iface, + double duration, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI tr_library_CreateDiscreteTransition(IUIAnimationTransitionLibrary *iface, + double delay, double finalValue, double hold, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI tr_library_CreateLinearTransition(IUIAnimationTransitionLibrary *iface, + double duration, double finalValue, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + struct animation_transition *tr = heap_alloc( sizeof(*tr) ); + HRESULT hr; + + FIXME( "stub (%p)->( )\n", This ); + + if (!tr) return E_OUTOFMEMORY; + tr->IUIAnimationTransition_iface.lpVtbl = &animation_transition_vtbl; + tr->ref = 1; + + hr = animation_transition_QueryInterface( &tr->IUIAnimationTransition_iface, &IID_IUIAnimationTransition, (void **)transition ); + + IUIAnimationTransition_Release( &tr->IUIAnimationTransition_iface ); + return hr; +} + +static HRESULT WINAPI tr_library_CreateLinearTransitionFromSpeed(IUIAnimationTransitionLibrary *iface, + double speed, double finalValue, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI tr_library_CreateSinusoidalTransitionFromVelocity(IUIAnimationTransitionLibrary *iface, + double duration, double period, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI tr_library_CreateSinusoidalTransitionFromRange(IUIAnimationTransitionLibrary *iface, + double duration, double minimumValue, double maximumValue, double period, + UI_ANIMATION_SLOPE slope, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI tr_library_CreateAccelerateDecelerateTransition(IUIAnimationTransitionLibrary *iface, + double duration, double finalValue, double accelerationRatio, double decelerationRatio, + IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI tr_library_CreateReversalTransition(IUIAnimationTransitionLibrary *iface, double duration, + IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI tr_library_CreateCubicTransition(IUIAnimationTransitionLibrary *iface, double duration, + double finalValue, double finalVelocity, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI tr_library_CreateSmoothStopTransition(IUIAnimationTransitionLibrary *iface, double maximumDuration, double finalValue, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + struct animation_transition *tr = heap_alloc( sizeof(*tr) ); + HRESULT hr; + + FIXME( "stub (%p)->( )\n", This ); + + if (!tr) return E_OUTOFMEMORY; + tr->IUIAnimationTransition_iface.lpVtbl = &animation_transition_vtbl; + tr->ref = 1; + + hr = animation_transition_QueryInterface( &tr->IUIAnimationTransition_iface, &IID_IUIAnimationTransition, (void **)transition ); + + IUIAnimationTransition_Release( &tr->IUIAnimationTransition_iface ); + return hr; +} + +static HRESULT WINAPI tr_library_CreateParabolicTransitionFromAcceleration(IUIAnimationTransitionLibrary *iface, + double finalValue, double finalVelocity, double acceleration, IUIAnimationTransition **transition) +{ + struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface ); + FIXME( "stub (%p)->( )\n", This ); + return E_NOTIMPL; +} + +const struct IUIAnimationTransitionLibraryVtbl tr_library_vtbl = +{ + tr_library_QueryInterface, + tr_library_AddRef, + tr_library_Release, + tr_library_CreateInstantaneousTransition, + tr_library_CreateConstantTransition, + tr_library_CreateDiscreteTransition, + tr_library_CreateLinearTransition, + tr_library_CreateLinearTransitionFromSpeed, + tr_library_CreateSinusoidalTransitionFromVelocity, + tr_library_CreateSinusoidalTransitionFromRange, + tr_library_CreateAccelerateDecelerateTransition, + tr_library_CreateReversalTransition, + tr_library_CreateCubicTransition, + tr_library_CreateSmoothStopTransition, + tr_library_CreateParabolicTransitionFromAcceleration, +}; + +HRESULT tr_library_create( IUnknown *outer, REFIID iid, void **obj ) +{ + struct tr_library *This = heap_alloc( sizeof(*This) ); + HRESULT hr; + + if (!This) return E_OUTOFMEMORY; + This->IUIAnimationTransitionLibrary_iface.lpVtbl = &tr_library_vtbl; + This->ref = 1; + + hr = IUIAnimationTransitionLibrary_QueryInterface( &This->IUIAnimationTransitionLibrary_iface, iid, obj ); + + IUIAnimationTransitionLibrary_Release( &This->IUIAnimationTransitionLibrary_iface ); + return hr; +} + BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) { TRACE("(%p %d %p)\n", dll, reason, reserved);
On 04/03/2019 12:15 PM, Vijay Kiran Kamuju wrote:
+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;
+}
Is there a reason you're not tracing parameter values?
+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;
+}
This isn't used anywhere, so you're effectively introducing a bunch of dead code.
Tests would also be nice.
I will add traces in next version.
This dead code is used in another patch which is not yet sent, for classfactory implementation.
I will remove this in next version.
On Wed, Apr 3, 2019 at 8:57 PM Zebediah Figura z.figura12@gmail.com wrote:
On 04/03/2019 12:15 PM, Vijay Kiran Kamuju wrote:
+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;
+}
Is there a reason you're not tracing parameter values?
+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;
+}
This isn't used anywhere, so you're effectively introducing a bunch of dead code.
Tests would also be nice.
On 04/03/2019 02:01 PM, Vijay Kiran Kamuju wrote:
I will add traces in next version.
This dead code is used in another patch which is not yet sent, for classfactory implementation.
In general we prefer to add e.g. class factories first, then add the objects that they create. Adding dead code means that it can't be tested.
(P.S. It would be appreciated if you would respond inline or at the bottom of the mail instead of at the top.)