[PATCH 4/5] uianimation: Add IUIAnimationTransition stub

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


Based on patch from Louis Lenders <xerox.xerox2000x at gmail.com>

From: Vijay Kiran Kamuju <infyquest at gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest at 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);
-- 
2.21.0




More information about the wine-devel mailing list