[PATCH 3/5] uianimation: Add IUIAnimationTransitionFactory stub
Vijay Kiran Kamuju
infyquest at gmail.com
Wed Apr 3 12:15:36 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 | 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);
--
2.21.0
More information about the wine-devel
mailing list