dsdmo: Add Flanger effect stub.
[wine.git] / dlls / uianimation / main.c
blob22bb58ddbe2172c82d32a9ca96074f22e4ce2663
1 /*
2 * Uianimation main file.
4 * Copyright (C) 2018 Louis Lenders
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #define COBJMACROS
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "objbase.h"
27 #include "rpcproxy.h"
28 #include "oaidl.h"
29 #include "ocidl.h"
31 #include "initguid.h"
32 #include "uianimation.h"
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(uianimation);
38 struct class_factory
40 IClassFactory IClassFactory_iface;
41 HRESULT (*create_instance)(IUnknown *, REFIID, void **);
44 static inline struct class_factory *impl_from_IClassFactory( IClassFactory *iface )
46 return CONTAINING_RECORD( iface, struct class_factory, IClassFactory_iface );
49 static HRESULT WINAPI class_factory_QueryInterface( IClassFactory *iface, REFIID iid, void **obj )
51 if (IsEqualIID( iid, &IID_IUnknown ) ||
52 IsEqualIID( iid, &IID_IClassFactory ))
54 IClassFactory_AddRef( iface );
55 *obj = iface;
56 return S_OK;
59 FIXME( "interface %s not implemented\n", debugstr_guid( iid ) );
60 *obj = NULL;
61 return E_NOINTERFACE;
64 static ULONG WINAPI class_factory_AddRef( IClassFactory *iface )
66 return 2;
69 static ULONG WINAPI class_factory_Release( IClassFactory *iface )
71 return 1;
74 static HRESULT WINAPI class_factory_CreateInstance( IClassFactory *iface,
75 IUnknown *outer, REFIID iid,
76 void **obj )
78 struct class_factory *This = impl_from_IClassFactory( iface );
80 TRACE( "%p %s %p\n", outer, debugstr_guid( iid ), obj );
82 *obj = NULL;
83 return This->create_instance( outer, iid, obj );
86 static HRESULT WINAPI class_factory_LockServer( IClassFactory *iface,
87 BOOL lock )
89 FIXME( "%d: stub!\n", lock );
90 return S_OK;
93 static const struct IClassFactoryVtbl class_factory_vtbl =
95 class_factory_QueryInterface,
96 class_factory_AddRef,
97 class_factory_Release,
98 class_factory_CreateInstance,
99 class_factory_LockServer
102 /***********************************************************************
103 * IUIAnimationStoryboard
105 struct animation_storyboard
107 IUIAnimationStoryboard IUIAnimationStoryboard_iface;
108 LONG ref;
111 struct animation_storyboard *impl_from_IUIAnimationStoryboard( IUIAnimationStoryboard *iface )
113 return CONTAINING_RECORD( iface, struct animation_storyboard, IUIAnimationStoryboard_iface );
116 static HRESULT WINAPI animation_storyboard_QueryInterface( IUIAnimationStoryboard *iface,
117 REFIID iid, void **obj )
119 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
121 TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj );
123 if (IsEqualIID( iid, &IID_IUnknown ) ||
124 IsEqualIID( iid, &IID_IUIAnimationStoryboard ))
126 IUIAnimationStoryboard_AddRef( iface );
127 *obj = iface;
128 return S_OK;
131 FIXME( "interface %s not implemented\n", debugstr_guid( iid ) );
132 *obj = NULL;
133 return E_NOINTERFACE;
136 static ULONG WINAPI animation_storyboard_AddRef( IUIAnimationStoryboard *iface )
138 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
139 ULONG ref = InterlockedIncrement( &This->ref );
141 TRACE( "(%p) ref = %lu\n", This, ref );
142 return ref;
145 static ULONG WINAPI animation_storyboard_Release( IUIAnimationStoryboard *iface )
147 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
148 ULONG ref = InterlockedDecrement(&This->ref);
150 TRACE( "(%p) ref = %lu\n", This, ref );
152 if (!ref)
153 free( This );
155 return ref;
158 static HRESULT WINAPI animation_storyboard_AddTransition (IUIAnimationStoryboard *iface, IUIAnimationVariable *variable,
159 IUIAnimationTransition *transition)
161 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
162 FIXME( "stub (%p)->( )\n", This );
163 return S_OK;
166 static HRESULT WINAPI animation_storyboard_AddKeyframeAtOffset (IUIAnimationStoryboard *iface, UI_ANIMATION_KEYFRAME existingframe,
167 UI_ANIMATION_SECONDS offset, UI_ANIMATION_KEYFRAME *keyframe)
169 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
170 FIXME( "stub (%p)->( )\n", This );
171 return E_NOTIMPL;
174 static HRESULT WINAPI animation_storyboard_AddKeyframeAfterTransition (IUIAnimationStoryboard *iface,IUIAnimationTransition *transition,
175 UI_ANIMATION_KEYFRAME *keyframe)
177 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
178 FIXME( "stub (%p)->( )\n", This );
179 return S_OK;
182 static HRESULT WINAPI animation_storyboard_AddTransitionAtKeyframe (IUIAnimationStoryboard *iface, IUIAnimationVariable *variable,
183 IUIAnimationTransition *transition, UI_ANIMATION_KEYFRAME start_key)
185 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
186 FIXME( "stub (%p)->( )\n", This );
187 return E_NOTIMPL;
190 static HRESULT WINAPI animation_storyboard_AddTransitionBetweenKeyframes (IUIAnimationStoryboard *iface, IUIAnimationVariable *variable,
191 IUIAnimationTransition *transition, UI_ANIMATION_KEYFRAME start_key, UI_ANIMATION_KEYFRAME end_key)
193 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
194 FIXME( "stub (%p)->( )\n", This );
195 return E_NOTIMPL;
198 static HRESULT WINAPI animation_storyboard_RepeatBetweenKeyframes (IUIAnimationStoryboard *iface, UI_ANIMATION_KEYFRAME start_key,
199 UI_ANIMATION_KEYFRAME end_key, INT32 count)
201 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
202 FIXME( "stub (%p)->( )\n", This );
203 return S_OK;
206 static HRESULT WINAPI animation_storyboard_HoldVariable (IUIAnimationStoryboard *iface, IUIAnimationVariable *variable)
208 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
209 FIXME( "stub (%p)->( )\n", This );
210 return E_NOTIMPL;
213 static HRESULT WINAPI animation_storyboard_SetLongestAcceptableDelay (IUIAnimationStoryboard *iface, UI_ANIMATION_SECONDS delay)
215 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
216 FIXME( "stub (%p)->( )\n", This );
217 return E_NOTIMPL;
220 static HRESULT WINAPI animation_storyboard_Schedule (IUIAnimationStoryboard *iface, UI_ANIMATION_SECONDS now,
221 UI_ANIMATION_SCHEDULING_RESULT *result)
223 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
224 FIXME( "stub (%p)->( )\n", This );
225 return 0;
228 static HRESULT WINAPI animation_storyboard_Conclude (IUIAnimationStoryboard *iface)
230 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
231 FIXME( "stub (%p)->( )\n", This );
232 return E_NOTIMPL;
235 static HRESULT WINAPI animation_storyboard_Finish (IUIAnimationStoryboard *iface, UI_ANIMATION_SECONDS deadline)
237 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
238 FIXME( "stub (%p)->( )\n", This );
239 return E_NOTIMPL;
242 static HRESULT WINAPI animation_storyboard_Abandon (IUIAnimationStoryboard *iface)
244 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
245 FIXME( "stub (%p)->( )\n", This );
246 return E_NOTIMPL;
249 static HRESULT WINAPI animation_storyboard_SetTag(IUIAnimationStoryboard *iface, IUnknown *object, UINT32 id)
251 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
252 FIXME( "stub (%p)->( )\n", This );
253 return E_NOTIMPL;
256 static HRESULT WINAPI animation_storyboard_GetTag (IUIAnimationStoryboard *iface, IUnknown **object, UINT32 *id)
258 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
259 FIXME( "stub (%p)->( )\n", This );
260 return E_NOTIMPL;
263 static HRESULT WINAPI animation_storyboard_GetStatus (IUIAnimationStoryboard *iface, UI_ANIMATION_STORYBOARD_STATUS *status)
265 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
266 FIXME( "stub (%p)->( )\n", This );
267 return E_NOTIMPL;
270 static HRESULT WINAPI animation_storyboard_GetElapsedTime (IUIAnimationStoryboard *iface, UI_ANIMATION_SECONDS *elapsed)
272 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
273 FIXME( "stub (%p)->( )\n", This );
274 return E_NOTIMPL;
277 static HRESULT WINAPI animation_storyboard_SetStoryboardEventHandler (IUIAnimationStoryboard *iface, IUIAnimationStoryboardEventHandler *handler)
279 struct animation_storyboard *This = impl_from_IUIAnimationStoryboard( iface );
280 FIXME( "stub (%p)->( )\n", This );
281 return S_OK;
284 const struct IUIAnimationStoryboardVtbl animation_storyboard_vtbl =
286 animation_storyboard_QueryInterface,
287 animation_storyboard_AddRef,
288 animation_storyboard_Release,
289 animation_storyboard_AddTransition,
290 animation_storyboard_AddKeyframeAtOffset,
291 animation_storyboard_AddKeyframeAfterTransition,
292 animation_storyboard_AddTransitionAtKeyframe,
293 animation_storyboard_AddTransitionBetweenKeyframes,
294 animation_storyboard_RepeatBetweenKeyframes,
295 animation_storyboard_HoldVariable,
296 animation_storyboard_SetLongestAcceptableDelay,
297 animation_storyboard_Schedule ,
298 animation_storyboard_Conclude ,
299 animation_storyboard_Finish ,
300 animation_storyboard_Abandon,
301 animation_storyboard_SetTag,
302 animation_storyboard_GetTag ,
303 animation_storyboard_GetStatus ,
304 animation_storyboard_GetElapsedTime,
305 animation_storyboard_SetStoryboardEventHandler
308 static HRESULT animation_storyboard_create( IUIAnimationStoryboard **obj )
310 struct animation_storyboard *This = malloc( sizeof(*This) );
312 if (!This) return E_OUTOFMEMORY;
313 This->IUIAnimationStoryboard_iface.lpVtbl = &animation_storyboard_vtbl;
314 This->ref = 1;
316 *obj = &This->IUIAnimationStoryboard_iface;
318 return S_OK;
321 /***********************************************************************
322 * IUIAnimationVariable
324 struct animation_var
326 IUIAnimationVariable IUIAnimationVariable_iface;
327 LONG ref;
328 DOUBLE initial;
331 struct animation_var *impl_from_IUIAnimationVariable( IUIAnimationVariable *iface )
333 return CONTAINING_RECORD( iface, struct animation_var, IUIAnimationVariable_iface );
336 static HRESULT WINAPI animation_var_QueryInterface( IUIAnimationVariable *iface,
337 REFIID iid, void **obj )
339 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
341 TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj );
343 if (IsEqualIID( iid, &IID_IUnknown ) ||
344 IsEqualIID( iid, &IID_IUIAnimationVariable ))
346 IUIAnimationVariable_AddRef( iface );
347 *obj = iface;
348 return S_OK;
351 FIXME( "interface %s not implemented\n", debugstr_guid( iid ) );
352 *obj = NULL;
353 return E_NOINTERFACE;
356 static ULONG WINAPI animation_var_AddRef( IUIAnimationVariable *iface )
358 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
359 ULONG ref = InterlockedIncrement( &This->ref );
361 TRACE( "(%p) ref = %lu\n", This, ref );
362 return ref;
365 static ULONG WINAPI animation_var_Release( IUIAnimationVariable *iface )
367 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
368 ULONG ref = InterlockedDecrement(&This->ref);
370 TRACE( "(%p) ref = %lu\n", This, ref );
372 if (!ref)
373 free( This );
375 return ref;
378 static HRESULT WINAPI animation_var_GetValue ( IUIAnimationVariable *iface, DOUBLE *value)
380 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
381 FIXME( "stub (%p)->( )\n", This);
382 return E_NOTIMPL;
385 static HRESULT WINAPI animation_var_GetFinalValue ( IUIAnimationVariable *iface, DOUBLE *value)
387 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
388 FIXME( "stub (%p)->( )\n", This );
389 return E_NOTIMPL;
392 static HRESULT WINAPI animation_var_GetPreviousValue ( IUIAnimationVariable *iface, DOUBLE *value)
394 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
395 FIXME( "stub (%p)->( )\n", This );
396 return E_NOTIMPL;
399 static HRESULT WINAPI animation_var_GetIntegerValue ( IUIAnimationVariable *iface, INT32 *value)
401 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
402 FIXME( "stub (%p)->( )\n", This );
403 return E_NOTIMPL;
406 static HRESULT WINAPI animation_var_GetFinalIntegerValue ( IUIAnimationVariable *iface, INT32 *value)
408 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
409 FIXME( "stub (%p)->( )\n", This );
410 return E_NOTIMPL;
413 static HRESULT WINAPI animation_var_GetPreviousIntegerValue ( IUIAnimationVariable *iface, INT32 *value)
415 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
416 FIXME( "stub (%p)->( )\n", This );
417 return E_NOTIMPL;
420 static HRESULT WINAPI animation_var_GetCurrentStoryboard ( IUIAnimationVariable *iface, IUIAnimationStoryboard **storyboard)
422 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
423 FIXME( "stub (%p)->( )\n", This );
424 return E_NOTIMPL;
427 static HRESULT WINAPI animation_var_SetLowerBound ( IUIAnimationVariable *iface, DOUBLE bound)
429 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
430 FIXME( "stub (%p)->( )\n", This );
431 return E_NOTIMPL;
434 static HRESULT WINAPI animation_var_SetUpperBound ( IUIAnimationVariable *iface, DOUBLE bound)
436 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
437 FIXME( "stub (%p)->( )\n", This );
438 return E_NOTIMPL;
441 static HRESULT WINAPI animation_var_SetRoundingMode ( IUIAnimationVariable *iface,UI_ANIMATION_ROUNDING_MODE mode)
443 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
444 FIXME( "stub (%p)->( )\n", This );
445 return S_OK;
448 static HRESULT WINAPI animation_var_SetTag ( IUIAnimationVariable *iface, IUnknown *object, UINT32 id)
450 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
451 FIXME( "stub (%p)->( )\n", This );
452 return E_NOTIMPL;
455 static HRESULT WINAPI animation_var_GetTag ( IUIAnimationVariable *iface, IUnknown **object, UINT32 *id)
457 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
458 FIXME( "stub (%p)->( )\n", This );
459 return E_NOTIMPL;
462 static HRESULT WINAPI animation_var_SetVariableChangeHandler ( IUIAnimationVariable *iface, IUIAnimationVariableChangeHandler *handler)
464 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
465 FIXME( "stub (%p)->( )\n", This );
466 return S_OK;
469 static HRESULT WINAPI animation_var_SetVariableIntegerChangeHandler ( IUIAnimationVariable *iface,
470 IUIAnimationVariableIntegerChangeHandler *handler)
472 struct animation_var *This = impl_from_IUIAnimationVariable( iface );
473 FIXME( "stub (%p)->( )\n", This );
474 return S_OK;
477 const struct IUIAnimationVariableVtbl animation_var_vtbl =
479 animation_var_QueryInterface,
480 animation_var_AddRef,
481 animation_var_Release,
482 animation_var_GetValue,
483 animation_var_GetFinalValue,
484 animation_var_GetPreviousValue,
485 animation_var_GetIntegerValue,
486 animation_var_GetFinalIntegerValue,
487 animation_var_GetPreviousIntegerValue,
488 animation_var_GetCurrentStoryboard,
489 animation_var_SetLowerBound,
490 animation_var_SetUpperBound,
491 animation_var_SetRoundingMode,
492 animation_var_SetTag,
493 animation_var_GetTag,
494 animation_var_SetVariableChangeHandler,
495 animation_var_SetVariableIntegerChangeHandler,
498 static HRESULT animation_var_create(DOUBLE initial, IUIAnimationVariable **obj )
500 struct animation_var *This = malloc( sizeof(*This) );
502 if (!This) return E_OUTOFMEMORY;
503 This->IUIAnimationVariable_iface.lpVtbl = &animation_var_vtbl;
504 This->ref = 1;
505 This->initial = initial;
507 *obj = &This->IUIAnimationVariable_iface;
509 return S_OK;
512 /***********************************************************************
513 * IUIAnimationManager
515 struct manager
517 IUIAnimationManager IUIAnimationManager_iface;
518 LONG ref;
521 struct manager *impl_from_IUIAnimationManager( IUIAnimationManager *iface )
523 return CONTAINING_RECORD( iface, struct manager, IUIAnimationManager_iface );
526 static HRESULT WINAPI manager_QueryInterface( IUIAnimationManager *iface, REFIID iid, void **obj )
528 struct manager *This = impl_from_IUIAnimationManager( iface );
530 TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj );
532 if (IsEqualIID( iid, &IID_IUnknown ) ||
533 IsEqualIID( iid, &IID_IUIAnimationManager ))
535 IUIAnimationManager_AddRef( iface );
536 *obj = iface;
537 return S_OK;
540 FIXME( "interface %s not implemented\n", debugstr_guid( iid ) );
541 *obj = NULL;
542 return E_NOINTERFACE;
545 static ULONG WINAPI manager_AddRef( IUIAnimationManager *iface )
547 struct manager *This = impl_from_IUIAnimationManager( iface );
548 ULONG ref = InterlockedIncrement( &This->ref );
550 TRACE( "(%p) ref = %lu\n", This, ref );
551 return ref;
554 static ULONG WINAPI manager_Release( IUIAnimationManager *iface )
556 struct manager *This = impl_from_IUIAnimationManager( iface );
557 ULONG ref = InterlockedDecrement(&This->ref);
559 TRACE( "(%p) ref = %lu\n", This, ref );
561 if (!ref)
563 free( This );
566 return ref;
569 static HRESULT WINAPI manager_CreateAnimationVariable( IUIAnimationManager *iface, DOUBLE initial_value, IUIAnimationVariable **variable )
571 struct manager *This = impl_from_IUIAnimationManager( iface );
572 TRACE( "(%p)->(%f, %p)\n", This, initial_value, variable );
573 return animation_var_create(initial_value, variable);
576 static HRESULT WINAPI manager_ScheduleTransition( IUIAnimationManager *iface, IUIAnimationVariable *variable, IUIAnimationTransition *transition, UI_ANIMATION_SECONDS current_time )
578 struct manager *This = impl_from_IUIAnimationManager( iface );
579 FIXME( "stub (%p)->(%p, %p)\n", This, variable, transition );
580 return E_NOTIMPL;
583 static HRESULT WINAPI manager_CreateStoryboard( IUIAnimationManager *iface, IUIAnimationStoryboard **storyboard )
585 struct manager *This = impl_from_IUIAnimationManager( iface );
586 TRACE( "(%p)->(%p)\n", This, storyboard );
587 return animation_storyboard_create(storyboard);
590 static HRESULT WINAPI manager_FinishAllStoryboards( IUIAnimationManager *iface, UI_ANIMATION_SECONDS max_time )
592 struct manager *This = impl_from_IUIAnimationManager( iface );
593 FIXME( "stub (%p)->(%f)\n", This, max_time );
594 return E_NOTIMPL;
597 static HRESULT WINAPI manager_AbandonAllStoryboards( IUIAnimationManager *iface )
599 struct manager *This = impl_from_IUIAnimationManager( iface );
600 FIXME( "stub (%p)->()\n", This );
601 return E_NOTIMPL;
604 static HRESULT WINAPI manager_Update( IUIAnimationManager *iface, UI_ANIMATION_SECONDS cur_time, UI_ANIMATION_UPDATE_RESULT *update_result )
606 struct manager *This = impl_from_IUIAnimationManager( iface );
607 FIXME( "stub (%p)->(%f, %p)\n", This, cur_time, update_result );
608 if (update_result)
609 *update_result = UI_ANIMATION_UPDATE_VARIABLES_CHANGED;
610 return S_OK;
613 static HRESULT WINAPI manager_GetVariableFromTag( IUIAnimationManager *iface, IUnknown *object, UINT32 id, IUIAnimationVariable **variable )
615 struct manager *This = impl_from_IUIAnimationManager( iface );
616 FIXME( "stub (%p)->(%p, %p)\n", This, object, variable );
617 return E_NOTIMPL;
620 static HRESULT WINAPI manager_GetStoryboardFromTag( IUIAnimationManager *iface, IUnknown *object, UINT32 id, IUIAnimationStoryboard **storyboard )
622 struct manager *This = impl_from_IUIAnimationManager( iface );
623 FIXME( "stub (%p)->(%p, %d, %p)\n", This, object, id, storyboard );
624 return E_NOTIMPL;
627 static HRESULT WINAPI manager_GetStatus( IUIAnimationManager *iface, UI_ANIMATION_MANAGER_STATUS *status )
629 struct manager *This = impl_from_IUIAnimationManager( iface );
630 FIXME( "stub (%p)->(%p)\n", This, status );
631 return E_NOTIMPL;
634 static HRESULT WINAPI manager_SetAnimationMode( IUIAnimationManager *iface, UI_ANIMATION_MODE mode )
636 struct manager *This = impl_from_IUIAnimationManager( iface );
637 FIXME( "stub (%p)->(%d)\n", This, mode );
638 return S_OK;
641 static HRESULT WINAPI manager_Pause( IUIAnimationManager *iface )
643 struct manager *This = impl_from_IUIAnimationManager( iface );
644 FIXME( "stub (%p)->()\n", This );
645 return E_NOTIMPL;
648 static HRESULT WINAPI manager_Resume( IUIAnimationManager *iface )
650 struct manager *This = impl_from_IUIAnimationManager( iface );
651 FIXME( "stub (%p)->()\n", This );
652 return E_NOTIMPL;
655 static HRESULT WINAPI manager_SetManagerEventHandler( IUIAnimationManager *iface, IUIAnimationManagerEventHandler *handler )
657 struct manager *This = impl_from_IUIAnimationManager( iface );
658 FIXME( "stub (%p)->(%p)\n", This, handler );
659 return S_OK;
662 static HRESULT WINAPI manager_SetCancelPriorityComparison( IUIAnimationManager *iface, IUIAnimationPriorityComparison *comparison )
664 struct manager *This = impl_from_IUIAnimationManager( iface );
665 FIXME( "stub (%p)->(%p)\n", This, comparison );
666 return E_NOTIMPL;
669 static HRESULT WINAPI manager_SetTrimPriorityComparison( IUIAnimationManager *iface, IUIAnimationPriorityComparison *comparison )
671 struct manager *This = impl_from_IUIAnimationManager( iface );
672 FIXME( "stub (%p)->(%p)\n", This, comparison );
673 return E_NOTIMPL;
676 static HRESULT WINAPI manager_SetCompressPriorityComparison( IUIAnimationManager *iface, IUIAnimationPriorityComparison *comparison)
678 struct manager *This = impl_from_IUIAnimationManager( iface );
679 FIXME( "stub (%p)->(%p)\n", This, comparison );
680 return E_NOTIMPL;
683 static HRESULT WINAPI manager_SetConcludePriorityComparison( IUIAnimationManager *iface, IUIAnimationPriorityComparison *comparison )
685 struct manager *This = impl_from_IUIAnimationManager( iface );
686 FIXME( "stub (%p)->(%p)\n", This, comparison );
687 return E_NOTIMPL;
690 static HRESULT WINAPI manager_SetDefaultLongestAcceptableDelay( IUIAnimationManager *iface, UI_ANIMATION_SECONDS delay )
692 struct manager *This = impl_from_IUIAnimationManager( iface );
693 FIXME( "stub (%p)->(%f)\n", This, delay );
694 return E_NOTIMPL;
697 static HRESULT WINAPI manager_Shutdown( IUIAnimationManager *iface )
699 struct manager *This = impl_from_IUIAnimationManager( iface );
700 FIXME( "stub (%p)->()\n", This );
701 return E_NOTIMPL;
704 const struct IUIAnimationManagerVtbl manager_vtbl =
706 manager_QueryInterface,
707 manager_AddRef,
708 manager_Release,
709 manager_CreateAnimationVariable,
710 manager_ScheduleTransition,
711 manager_CreateStoryboard,
712 manager_FinishAllStoryboards,
713 manager_AbandonAllStoryboards,
714 manager_Update,
715 manager_GetVariableFromTag,
716 manager_GetStoryboardFromTag,
717 manager_GetStatus,
718 manager_SetAnimationMode,
719 manager_Pause,
720 manager_Resume,
721 manager_SetManagerEventHandler,
722 manager_SetCancelPriorityComparison,
723 manager_SetTrimPriorityComparison,
724 manager_SetCompressPriorityComparison,
725 manager_SetConcludePriorityComparison,
726 manager_SetDefaultLongestAcceptableDelay,
727 manager_Shutdown
730 static HRESULT manager_create( IUnknown *outer, REFIID iid, void **obj )
732 struct manager *This = malloc( sizeof(*This) );
733 HRESULT hr;
735 if (!This) return E_OUTOFMEMORY;
736 This->IUIAnimationManager_iface.lpVtbl = &manager_vtbl;
737 This->ref = 1;
739 hr = IUIAnimationManager_QueryInterface( &This->IUIAnimationManager_iface, iid, obj );
741 IUIAnimationManager_Release( &This->IUIAnimationManager_iface );
742 return hr;
745 /***********************************************************************
746 * IUIAnimationTimer
748 struct timer
750 IUIAnimationTimer IUIAnimationTimer_iface;
751 LONG ref;
754 struct timer *impl_from_IUIAnimationTimer( IUIAnimationTimer *iface )
756 return CONTAINING_RECORD( iface, struct timer, IUIAnimationTimer_iface );
759 static HRESULT WINAPI timer_QueryInterface( IUIAnimationTimer *iface, REFIID iid, void **obj )
761 struct timer *This = impl_from_IUIAnimationTimer( iface );
763 TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj );
765 if (IsEqualIID( iid, &IID_IUnknown ) ||
766 IsEqualIID( iid, &IID_IUIAnimationTimer ))
768 IUIAnimationTimer_AddRef( iface );
769 *obj = iface;
770 return S_OK;
773 FIXME( "interface %s not implemented\n", debugstr_guid( iid ) );
774 *obj = NULL;
775 return E_NOINTERFACE;
778 static ULONG WINAPI timer_AddRef( IUIAnimationTimer *iface )
780 struct timer *This = impl_from_IUIAnimationTimer( iface );
781 ULONG ref = InterlockedIncrement( &This->ref );
783 TRACE( "(%p) ref = %lu\n", This, ref );
784 return ref;
787 static ULONG WINAPI timer_Release( IUIAnimationTimer *iface )
789 struct timer *This = impl_from_IUIAnimationTimer( iface );
790 ULONG ref = InterlockedDecrement(&This->ref);
792 TRACE( "(%p) ref = %lu\n", This, ref );
794 if (!ref)
795 free( This );
797 return ref;
800 static HRESULT WINAPI timer_SetTimerUpdateHandler (IUIAnimationTimer *iface,
801 IUIAnimationTimerUpdateHandler *update_handler,
802 UI_ANIMATION_IDLE_BEHAVIOR idle_behaviour)
804 struct timer *This = impl_from_IUIAnimationTimer( iface );
805 FIXME( "stub (%p)->(%p, %d)\n", This, update_handler, idle_behaviour );
806 return E_NOTIMPL;
809 static HRESULT WINAPI timer_SetTimerEventHandler (IUIAnimationTimer *iface,
810 IUIAnimationTimerEventHandler *handler)
812 struct timer *This = impl_from_IUIAnimationTimer( iface );
813 FIXME( "stub (%p)->()\n", This );
814 return S_OK;
817 static HRESULT WINAPI timer_Enable (IUIAnimationTimer *iface)
819 struct timer *This = impl_from_IUIAnimationTimer( iface );
820 FIXME( "stub (%p)->()\n", This );
821 return S_OK;
824 static HRESULT WINAPI timer_Disable (IUIAnimationTimer *iface)
826 struct timer *This = impl_from_IUIAnimationTimer( iface );
827 FIXME( "stub (%p)->()\n", This );
828 return E_NOTIMPL;
831 static HRESULT WINAPI timer_IsEnabled (IUIAnimationTimer *iface)
833 struct timer *This = impl_from_IUIAnimationTimer( iface );
834 FIXME( "stub (%p)->()\n", This );
835 return E_NOTIMPL;
838 static HRESULT WINAPI timer_GetTime (IUIAnimationTimer *iface, UI_ANIMATION_SECONDS *seconds)
840 struct timer *This = impl_from_IUIAnimationTimer( iface );
841 FIXME( "stub (%p)->(%p)\n", This, seconds );
842 return S_OK;
845 static HRESULT WINAPI timer_SetFrameRateThreshold (IUIAnimationTimer *iface, UINT32 frames_per_sec)
847 struct timer *This = impl_from_IUIAnimationTimer( iface );
848 FIXME( "stub (%p)->(%d)\n", This, frames_per_sec );
849 return E_NOTIMPL;
852 const struct IUIAnimationTimerVtbl timer_vtbl =
854 timer_QueryInterface,
855 timer_AddRef,
856 timer_Release,
857 timer_SetTimerUpdateHandler,
858 timer_SetTimerEventHandler,
859 timer_Enable,
860 timer_Disable,
861 timer_IsEnabled,
862 timer_GetTime,
863 timer_SetFrameRateThreshold,
866 static HRESULT timer_create( IUnknown *outer, REFIID iid, void **obj )
868 struct timer *This = malloc( sizeof(*This) );
869 HRESULT hr;
871 if (!This)
872 return E_OUTOFMEMORY;
873 This->IUIAnimationTimer_iface.lpVtbl = &timer_vtbl;
874 This->ref = 1;
876 hr = IUIAnimationTimer_QueryInterface( &This->IUIAnimationTimer_iface, iid, obj );
878 IUIAnimationTimer_Release( &This->IUIAnimationTimer_iface );
879 return hr;
882 /***********************************************************************
883 * IUIAnimationTransitionFactory
885 struct tr_factory
887 IUIAnimationTransitionFactory IUIAnimationTransitionFactory_iface;
888 LONG ref;
891 struct tr_factory *impl_from_IUIAnimationTransitionFactory( IUIAnimationTransitionFactory *iface )
893 return CONTAINING_RECORD( iface, struct tr_factory, IUIAnimationTransitionFactory_iface );
896 static HRESULT WINAPI tr_factory_QueryInterface( IUIAnimationTransitionFactory *iface, REFIID iid, void **obj )
898 struct tr_factory *This = impl_from_IUIAnimationTransitionFactory( iface );
900 TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj );
902 if (IsEqualIID( iid, &IID_IUnknown ) ||
903 IsEqualIID( iid, &IID_IUIAnimationTransitionFactory ))
905 IUIAnimationTransitionFactory_AddRef( iface );
906 *obj = iface;
907 return S_OK;
910 FIXME( "interface %s not implemented\n", debugstr_guid( iid ) );
911 *obj = NULL;
912 return E_NOINTERFACE;
915 static ULONG WINAPI tr_factory_AddRef( IUIAnimationTransitionFactory *iface )
917 struct tr_factory *This = impl_from_IUIAnimationTransitionFactory( iface );
918 ULONG ref = InterlockedIncrement( &This->ref );
920 TRACE( "(%p) ref = %lu\n", This, ref );
921 return ref;
924 static ULONG WINAPI tr_factory_Release( IUIAnimationTransitionFactory *iface )
926 struct tr_factory *This = impl_from_IUIAnimationTransitionFactory( iface );
927 ULONG ref = InterlockedDecrement(&This->ref);
929 TRACE( "(%p) ref = %lu\n", This, ref );
931 if (!ref)
932 free( This );
934 return ref;
937 static HRESULT WINAPI tr_factory_CreateTransition(IUIAnimationTransitionFactory *iface,
938 IUIAnimationInterpolator *interpolator, IUIAnimationTransition **transition)
940 struct tr_factory *This = impl_from_IUIAnimationTransitionFactory( iface );
941 FIXME( "stub (%p)->(%p, %p)\n", This, interpolator, transition );
942 return E_NOTIMPL;
945 const struct IUIAnimationTransitionFactoryVtbl tr_factory_vtbl =
947 tr_factory_QueryInterface,
948 tr_factory_AddRef,
949 tr_factory_Release,
950 tr_factory_CreateTransition
953 static HRESULT transition_create( IUnknown *outer, REFIID iid, void **obj )
955 struct tr_factory *This = malloc( sizeof(*This) );
956 HRESULT hr;
958 if (!This) return E_OUTOFMEMORY;
959 This->IUIAnimationTransitionFactory_iface.lpVtbl = &tr_factory_vtbl;
960 This->ref = 1;
962 hr = IUIAnimationTransitionFactory_QueryInterface( &This->IUIAnimationTransitionFactory_iface, iid, obj );
964 IUIAnimationTransitionFactory_Release( &This->IUIAnimationTransitionFactory_iface );
965 return hr;
968 /***********************************************************************
969 * IUITransitionLibrary
971 struct tr_library
973 IUIAnimationTransitionLibrary IUIAnimationTransitionLibrary_iface;
974 LONG ref;
977 struct tr_library *impl_from_IUIAnimationTransitionLibrary( IUIAnimationTransitionLibrary *iface )
979 return CONTAINING_RECORD( iface, struct tr_library, IUIAnimationTransitionLibrary_iface );
982 static HRESULT WINAPI tr_library_QueryInterface( IUIAnimationTransitionLibrary *iface,
983 REFIID iid, void **obj )
985 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
987 TRACE( "(%p)->(%s %p)\n", This, debugstr_guid( iid ), obj );
989 if (IsEqualIID( iid, &IID_IUnknown ) ||
990 IsEqualIID( iid, &IID_IUIAnimationTransitionLibrary ))
992 IUIAnimationTransitionLibrary_AddRef( iface );
993 *obj = iface;
994 return S_OK;
997 FIXME( "interface %s not implemented\n", debugstr_guid( iid ) );
998 *obj = NULL;
999 return E_NOINTERFACE;
1002 static ULONG WINAPI tr_library_AddRef( IUIAnimationTransitionLibrary *iface )
1004 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1005 ULONG ref = InterlockedIncrement( &This->ref );
1007 TRACE( "(%p) ref = %lu\n", This, ref );
1008 return ref;
1011 static ULONG WINAPI tr_library_Release( IUIAnimationTransitionLibrary *iface )
1013 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1014 ULONG ref = InterlockedDecrement(&This->ref);
1016 TRACE( "(%p) ref = %lu\n", This, ref );
1018 if (!ref)
1019 free( This );
1021 return ref;
1024 static HRESULT WINAPI tr_library_CreateInstantaneousTransition(IUIAnimationTransitionLibrary *iface,
1025 double finalValue, IUIAnimationTransition **transition)
1027 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1028 FIXME( "stub (%p)->(%f, %p)\n", This, finalValue, transition );
1029 return E_NOTIMPL;
1032 static HRESULT WINAPI tr_library_CreateConstantTransition(IUIAnimationTransitionLibrary *iface,
1033 double duration, IUIAnimationTransition **transition)
1035 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1036 FIXME( "stub (%p)->(%f, %p)\n", This, duration, transition );
1037 return E_NOTIMPL;
1040 static HRESULT WINAPI tr_library_CreateDiscreteTransition(IUIAnimationTransitionLibrary *iface,
1041 double delay, double finalValue, double hold, IUIAnimationTransition **transition)
1043 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1044 FIXME( "stub (%p)->( )\n", This );
1045 return E_NOTIMPL;
1048 static HRESULT WINAPI tr_library_CreateLinearTransition(IUIAnimationTransitionLibrary *iface,
1049 double duration, double finalValue, IUIAnimationTransition **transition)
1051 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1052 FIXME( "stub (%p)->(%f, %f, %p)\n", This, duration, finalValue, transition );
1053 return E_NOTIMPL;
1056 static HRESULT WINAPI tr_library_CreateLinearTransitionFromSpeed(IUIAnimationTransitionLibrary *iface,
1057 double speed, double finalValue, IUIAnimationTransition **transition)
1059 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1060 FIXME( "stub (%p)->(%f, %f, %p)\n", This, speed, finalValue, transition );
1061 return E_NOTIMPL;
1064 static HRESULT WINAPI tr_library_CreateSinusoidalTransitionFromVelocity(IUIAnimationTransitionLibrary *iface,
1065 double duration, double period, IUIAnimationTransition **transition)
1067 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1068 FIXME( "stub (%p)->(%f, %f, %p)\n", This, duration, period, transition );
1069 return E_NOTIMPL;
1072 static HRESULT WINAPI tr_library_CreateSinusoidalTransitionFromRange(IUIAnimationTransitionLibrary *iface,
1073 double duration, double minimumValue, double maximumValue, double period,
1074 UI_ANIMATION_SLOPE slope, IUIAnimationTransition **transition)
1076 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1077 FIXME( "stub (%p)->(%f, %f, %f, %f, %d, %p)\n", This, duration, minimumValue, maximumValue, period, slope, transition );
1078 return E_NOTIMPL;
1081 static HRESULT WINAPI tr_library_CreateAccelerateDecelerateTransition(IUIAnimationTransitionLibrary *iface,
1082 double duration, double finalValue, double accelerationRatio, double decelerationRatio,
1083 IUIAnimationTransition **transition)
1085 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1086 FIXME( "stub (%p)->(%f, %f, %f, %f, %p)\n", This, duration, finalValue, accelerationRatio, decelerationRatio, transition );
1087 return E_NOTIMPL;
1090 static HRESULT WINAPI tr_library_CreateReversalTransition(IUIAnimationTransitionLibrary *iface, double duration,
1091 IUIAnimationTransition **transition)
1093 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1094 FIXME( "stub (%p)->(%f, %p)\n", This, duration, transition );
1095 return E_NOTIMPL;
1098 static HRESULT WINAPI tr_library_CreateCubicTransition(IUIAnimationTransitionLibrary *iface, double duration,
1099 double finalValue, double finalVelocity, IUIAnimationTransition **transition)
1101 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1102 FIXME( "stub (%p)->(%f, %f, %f, %p)\n", This, duration, finalValue, finalVelocity, transition );
1103 return E_NOTIMPL;
1106 static HRESULT WINAPI tr_library_CreateSmoothStopTransition(IUIAnimationTransitionLibrary *iface,
1107 double maximumDuration, double finalValue, IUIAnimationTransition **transition)
1109 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1110 FIXME( "stub (%p)->(%f, %f, %p)\n", This, maximumDuration, finalValue, transition );
1111 return E_NOTIMPL;
1114 static HRESULT WINAPI tr_library_CreateParabolicTransitionFromAcceleration(IUIAnimationTransitionLibrary *iface,
1115 double finalValue, double finalVelocity, double acceleration, IUIAnimationTransition **transition)
1117 struct tr_library *This = impl_from_IUIAnimationTransitionLibrary( iface );
1118 FIXME( "stub (%p)->( )\n", This );
1119 return E_NOTIMPL;
1122 const struct IUIAnimationTransitionLibraryVtbl tr_library_vtbl =
1124 tr_library_QueryInterface,
1125 tr_library_AddRef,
1126 tr_library_Release,
1127 tr_library_CreateInstantaneousTransition,
1128 tr_library_CreateConstantTransition,
1129 tr_library_CreateDiscreteTransition,
1130 tr_library_CreateLinearTransition,
1131 tr_library_CreateLinearTransitionFromSpeed,
1132 tr_library_CreateSinusoidalTransitionFromVelocity,
1133 tr_library_CreateSinusoidalTransitionFromRange,
1134 tr_library_CreateAccelerateDecelerateTransition,
1135 tr_library_CreateReversalTransition,
1136 tr_library_CreateCubicTransition,
1137 tr_library_CreateSmoothStopTransition,
1138 tr_library_CreateParabolicTransitionFromAcceleration,
1141 static HRESULT library_create( IUnknown *outer, REFIID iid, void **obj )
1143 struct tr_library *This = malloc( sizeof(*This) );
1144 HRESULT hr;
1146 if (!This) return E_OUTOFMEMORY;
1147 This->IUIAnimationTransitionLibrary_iface.lpVtbl = &tr_library_vtbl;
1148 This->ref = 1;
1150 hr = IUIAnimationTransitionLibrary_QueryInterface( &This->IUIAnimationTransitionLibrary_iface, iid, obj );
1152 IUIAnimationTransitionLibrary_Release( &This->IUIAnimationTransitionLibrary_iface );
1153 return hr;
1156 static struct class_factory manager_cf = { { &class_factory_vtbl }, manager_create };
1157 static struct class_factory timer_cf = { { &class_factory_vtbl }, timer_create };
1158 static struct class_factory transition_cf = { { &class_factory_vtbl }, transition_create };
1159 static struct class_factory library_cf = { { &class_factory_vtbl }, library_create };
1161 /******************************************************************
1162 * DllGetClassObject
1164 HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj )
1166 IClassFactory *cf = NULL;
1168 TRACE( "(%s %s %p)\n", debugstr_guid( clsid ), debugstr_guid( iid ), obj );
1170 if (IsEqualCLSID( clsid, &CLSID_UIAnimationManager ))
1171 cf = &manager_cf.IClassFactory_iface;
1172 else if (IsEqualCLSID( clsid, &CLSID_UIAnimationTimer ))
1173 cf = &timer_cf.IClassFactory_iface;
1174 else if (IsEqualCLSID( clsid, &CLSID_UIAnimationTransitionFactory ))
1175 cf = &transition_cf.IClassFactory_iface;
1176 else if (IsEqualCLSID( clsid, &CLSID_UIAnimationTransitionLibrary ))
1177 cf = &library_cf.IClassFactory_iface;
1179 if (!cf)
1180 return CLASS_E_CLASSNOTAVAILABLE;
1182 return IClassFactory_QueryInterface( cf, iid, obj );