From: Vijay Kiran Kamuju Subject: [PATCH 4/5] uianimation: Add IUIAnimationTransition stub Message-Id: <20190403171538.9028-4-infyquest@gmail.com> Date: Wed, 3 Apr 2019 19:15:37 +0200 In-Reply-To: <20190403171538.9028-1-infyquest@gmail.com> References: <20190403171538.9028-1-infyquest@gmail.com> Based on patch from Louis Lenders From: Vijay Kiran Kamuju Signed-off-by: Vijay Kiran Kamuju --- 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); -- 2.21.0