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
32 #include "uianimation.h"
34 #include "wine/heap.h"
35 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(uianimation
);
41 IClassFactory IClassFactory_iface
;
42 HRESULT (*create_instance
)(IUnknown
*, REFIID
, void **);
45 static inline struct class_factory
*impl_from_IClassFactory( IClassFactory
*iface
)
47 return CONTAINING_RECORD( iface
, struct class_factory
, IClassFactory_iface
);
50 static HRESULT WINAPI
class_factory_QueryInterface( IClassFactory
*iface
, REFIID iid
, void **obj
)
52 if (IsEqualIID( iid
, &IID_IUnknown
) ||
53 IsEqualIID( iid
, &IID_IClassFactory
))
55 IClassFactory_AddRef( iface
);
60 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
65 static ULONG WINAPI
class_factory_AddRef( IClassFactory
*iface
)
70 static ULONG WINAPI
class_factory_Release( IClassFactory
*iface
)
75 static HRESULT WINAPI
class_factory_CreateInstance( IClassFactory
*iface
,
76 IUnknown
*outer
, REFIID iid
,
79 struct class_factory
*This
= impl_from_IClassFactory( iface
);
81 TRACE( "%p %s %p\n", outer
, debugstr_guid( iid
), obj
);
84 return This
->create_instance( outer
, iid
, obj
);
87 static HRESULT WINAPI
class_factory_LockServer( IClassFactory
*iface
,
90 FIXME( "%d: stub!\n", lock
);
94 static const struct IClassFactoryVtbl class_factory_vtbl
=
96 class_factory_QueryInterface
,
98 class_factory_Release
,
99 class_factory_CreateInstance
,
100 class_factory_LockServer
103 /***********************************************************************
104 * IUIAnimationStoryboard
106 struct animation_storyboard
108 IUIAnimationStoryboard IUIAnimationStoryboard_iface
;
112 struct animation_storyboard
*impl_from_IUIAnimationStoryboard( IUIAnimationStoryboard
*iface
)
114 return CONTAINING_RECORD( iface
, struct animation_storyboard
, IUIAnimationStoryboard_iface
);
117 static HRESULT WINAPI
animation_storyboard_QueryInterface( IUIAnimationStoryboard
*iface
,
118 REFIID iid
, void **obj
)
120 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
122 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
124 if (IsEqualIID( iid
, &IID_IUnknown
) ||
125 IsEqualIID( iid
, &IID_IUIAnimationStoryboard
))
127 IUIAnimationStoryboard_AddRef( iface
);
132 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
134 return E_NOINTERFACE
;
137 static ULONG WINAPI
animation_storyboard_AddRef( IUIAnimationStoryboard
*iface
)
139 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
140 ULONG ref
= InterlockedIncrement( &This
->ref
);
142 TRACE( "(%p) ref = %lu\n", This
, ref
);
146 static ULONG WINAPI
animation_storyboard_Release( IUIAnimationStoryboard
*iface
)
148 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
149 ULONG ref
= InterlockedDecrement(&This
->ref
);
151 TRACE( "(%p) ref = %lu\n", This
, ref
);
159 static HRESULT WINAPI
animation_storyboard_AddTransition (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
,
160 IUIAnimationTransition
*transition
)
162 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
163 FIXME( "stub (%p)->( )\n", This
);
167 static HRESULT WINAPI
animation_storyboard_AddKeyframeAtOffset (IUIAnimationStoryboard
*iface
, UI_ANIMATION_KEYFRAME existingframe
,
168 UI_ANIMATION_SECONDS offset
, UI_ANIMATION_KEYFRAME
*keyframe
)
170 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
171 FIXME( "stub (%p)->( )\n", This
);
175 static HRESULT WINAPI
animation_storyboard_AddKeyframeAfterTransition (IUIAnimationStoryboard
*iface
,IUIAnimationTransition
*transition
,
176 UI_ANIMATION_KEYFRAME
*keyframe
)
178 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
179 FIXME( "stub (%p)->( )\n", This
);
183 static HRESULT WINAPI
animation_storyboard_AddTransitionAtKeyframe (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
,
184 IUIAnimationTransition
*transition
, UI_ANIMATION_KEYFRAME start_key
)
186 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
187 FIXME( "stub (%p)->( )\n", This
);
191 static HRESULT WINAPI
animation_storyboard_AddTransitionBetweenKeyframes (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
,
192 IUIAnimationTransition
*transition
, UI_ANIMATION_KEYFRAME start_key
, UI_ANIMATION_KEYFRAME end_key
)
194 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
195 FIXME( "stub (%p)->( )\n", This
);
199 static HRESULT WINAPI
animation_storyboard_RepeatBetweenKeyframes (IUIAnimationStoryboard
*iface
, UI_ANIMATION_KEYFRAME start_key
,
200 UI_ANIMATION_KEYFRAME end_key
, INT32 count
)
202 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
203 FIXME( "stub (%p)->( )\n", This
);
207 static HRESULT WINAPI
animation_storyboard_HoldVariable (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
)
209 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
210 FIXME( "stub (%p)->( )\n", This
);
214 static HRESULT WINAPI
animation_storyboard_SetLongestAcceptableDelay (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS delay
)
216 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
217 FIXME( "stub (%p)->( )\n", This
);
221 static HRESULT WINAPI
animation_storyboard_Schedule (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS now
,
222 UI_ANIMATION_SCHEDULING_RESULT
*result
)
224 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
225 FIXME( "stub (%p)->( )\n", This
);
229 static HRESULT WINAPI
animation_storyboard_Conclude (IUIAnimationStoryboard
*iface
)
231 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
232 FIXME( "stub (%p)->( )\n", This
);
236 static HRESULT WINAPI
animation_storyboard_Finish (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS deadline
)
238 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
239 FIXME( "stub (%p)->( )\n", This
);
243 static HRESULT WINAPI
animation_storyboard_Abandon (IUIAnimationStoryboard
*iface
)
245 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
246 FIXME( "stub (%p)->( )\n", This
);
250 static HRESULT WINAPI
animation_storyboard_SetTag(IUIAnimationStoryboard
*iface
, IUnknown
*object
, UINT32 id
)
252 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
253 FIXME( "stub (%p)->( )\n", This
);
257 static HRESULT WINAPI
animation_storyboard_GetTag (IUIAnimationStoryboard
*iface
, IUnknown
**object
, UINT32
*id
)
259 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
260 FIXME( "stub (%p)->( )\n", This
);
264 static HRESULT WINAPI
animation_storyboard_GetStatus (IUIAnimationStoryboard
*iface
, UI_ANIMATION_STORYBOARD_STATUS
*status
)
266 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
267 FIXME( "stub (%p)->( )\n", This
);
271 static HRESULT WINAPI
animation_storyboard_GetElapsedTime (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS
*elapsed
)
273 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
274 FIXME( "stub (%p)->( )\n", This
);
278 static HRESULT WINAPI
animation_storyboard_SetStoryboardEventHandler (IUIAnimationStoryboard
*iface
, IUIAnimationStoryboardEventHandler
*handler
)
280 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
281 FIXME( "stub (%p)->( )\n", This
);
285 const struct IUIAnimationStoryboardVtbl animation_storyboard_vtbl
=
287 animation_storyboard_QueryInterface
,
288 animation_storyboard_AddRef
,
289 animation_storyboard_Release
,
290 animation_storyboard_AddTransition
,
291 animation_storyboard_AddKeyframeAtOffset
,
292 animation_storyboard_AddKeyframeAfterTransition
,
293 animation_storyboard_AddTransitionAtKeyframe
,
294 animation_storyboard_AddTransitionBetweenKeyframes
,
295 animation_storyboard_RepeatBetweenKeyframes
,
296 animation_storyboard_HoldVariable
,
297 animation_storyboard_SetLongestAcceptableDelay
,
298 animation_storyboard_Schedule
,
299 animation_storyboard_Conclude
,
300 animation_storyboard_Finish
,
301 animation_storyboard_Abandon
,
302 animation_storyboard_SetTag
,
303 animation_storyboard_GetTag
,
304 animation_storyboard_GetStatus
,
305 animation_storyboard_GetElapsedTime
,
306 animation_storyboard_SetStoryboardEventHandler
309 static HRESULT
animation_storyboard_create( IUIAnimationStoryboard
**obj
)
311 struct animation_storyboard
*This
= heap_alloc( sizeof(*This
) );
313 if (!This
) return E_OUTOFMEMORY
;
314 This
->IUIAnimationStoryboard_iface
.lpVtbl
= &animation_storyboard_vtbl
;
317 *obj
= &This
->IUIAnimationStoryboard_iface
;
322 /***********************************************************************
323 * IUIAnimationVariable
327 IUIAnimationVariable IUIAnimationVariable_iface
;
332 struct animation_var
*impl_from_IUIAnimationVariable( IUIAnimationVariable
*iface
)
334 return CONTAINING_RECORD( iface
, struct animation_var
, IUIAnimationVariable_iface
);
337 static HRESULT WINAPI
animation_var_QueryInterface( IUIAnimationVariable
*iface
,
338 REFIID iid
, void **obj
)
340 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
342 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
344 if (IsEqualIID( iid
, &IID_IUnknown
) ||
345 IsEqualIID( iid
, &IID_IUIAnimationVariable
))
347 IUIAnimationVariable_AddRef( iface
);
352 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
354 return E_NOINTERFACE
;
357 static ULONG WINAPI
animation_var_AddRef( IUIAnimationVariable
*iface
)
359 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
360 ULONG ref
= InterlockedIncrement( &This
->ref
);
362 TRACE( "(%p) ref = %lu\n", This
, ref
);
366 static ULONG WINAPI
animation_var_Release( IUIAnimationVariable
*iface
)
368 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
369 ULONG ref
= InterlockedDecrement(&This
->ref
);
371 TRACE( "(%p) ref = %lu\n", This
, ref
);
379 static HRESULT WINAPI
animation_var_GetValue ( IUIAnimationVariable
*iface
, DOUBLE
*value
)
381 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
382 FIXME( "stub (%p)->( )\n", This
);
386 static HRESULT WINAPI
animation_var_GetFinalValue ( IUIAnimationVariable
*iface
, DOUBLE
*value
)
388 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
389 FIXME( "stub (%p)->( )\n", This
);
393 static HRESULT WINAPI
animation_var_GetPreviousValue ( IUIAnimationVariable
*iface
, DOUBLE
*value
)
395 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
396 FIXME( "stub (%p)->( )\n", This
);
400 static HRESULT WINAPI
animation_var_GetIntegerValue ( IUIAnimationVariable
*iface
, INT32
*value
)
402 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
403 FIXME( "stub (%p)->( )\n", This
);
407 static HRESULT WINAPI
animation_var_GetFinalIntegerValue ( IUIAnimationVariable
*iface
, INT32
*value
)
409 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
410 FIXME( "stub (%p)->( )\n", This
);
414 static HRESULT WINAPI
animation_var_GetPreviousIntegerValue ( IUIAnimationVariable
*iface
, INT32
*value
)
416 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
417 FIXME( "stub (%p)->( )\n", This
);
421 static HRESULT WINAPI
animation_var_GetCurrentStoryboard ( IUIAnimationVariable
*iface
, IUIAnimationStoryboard
**storyboard
)
423 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
424 FIXME( "stub (%p)->( )\n", This
);
428 static HRESULT WINAPI
animation_var_SetLowerBound ( IUIAnimationVariable
*iface
, DOUBLE bound
)
430 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
431 FIXME( "stub (%p)->( )\n", This
);
435 static HRESULT WINAPI
animation_var_SetUpperBound ( IUIAnimationVariable
*iface
, DOUBLE bound
)
437 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
438 FIXME( "stub (%p)->( )\n", This
);
442 static HRESULT WINAPI
animation_var_SetRoundingMode ( IUIAnimationVariable
*iface
,UI_ANIMATION_ROUNDING_MODE mode
)
444 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
445 FIXME( "stub (%p)->( )\n", This
);
449 static HRESULT WINAPI
animation_var_SetTag ( IUIAnimationVariable
*iface
, IUnknown
*object
, UINT32 id
)
451 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
452 FIXME( "stub (%p)->( )\n", This
);
456 static HRESULT WINAPI
animation_var_GetTag ( IUIAnimationVariable
*iface
, IUnknown
**object
, UINT32
*id
)
458 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
459 FIXME( "stub (%p)->( )\n", This
);
463 static HRESULT WINAPI
animation_var_SetVariableChangeHandler ( IUIAnimationVariable
*iface
, IUIAnimationVariableChangeHandler
*handler
)
465 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
466 FIXME( "stub (%p)->( )\n", This
);
470 static HRESULT WINAPI
animation_var_SetVariableIntegerChangeHandler ( IUIAnimationVariable
*iface
,
471 IUIAnimationVariableIntegerChangeHandler
*handler
)
473 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
474 FIXME( "stub (%p)->( )\n", This
);
478 const struct IUIAnimationVariableVtbl animation_var_vtbl
=
480 animation_var_QueryInterface
,
481 animation_var_AddRef
,
482 animation_var_Release
,
483 animation_var_GetValue
,
484 animation_var_GetFinalValue
,
485 animation_var_GetPreviousValue
,
486 animation_var_GetIntegerValue
,
487 animation_var_GetFinalIntegerValue
,
488 animation_var_GetPreviousIntegerValue
,
489 animation_var_GetCurrentStoryboard
,
490 animation_var_SetLowerBound
,
491 animation_var_SetUpperBound
,
492 animation_var_SetRoundingMode
,
493 animation_var_SetTag
,
494 animation_var_GetTag
,
495 animation_var_SetVariableChangeHandler
,
496 animation_var_SetVariableIntegerChangeHandler
,
499 static HRESULT
animation_var_create(DOUBLE initial
, IUIAnimationVariable
**obj
)
501 struct animation_var
*This
= heap_alloc( sizeof(*This
) );
503 if (!This
) return E_OUTOFMEMORY
;
504 This
->IUIAnimationVariable_iface
.lpVtbl
= &animation_var_vtbl
;
506 This
->initial
= initial
;
508 *obj
= &This
->IUIAnimationVariable_iface
;
513 /***********************************************************************
514 * IUIAnimationManager
518 IUIAnimationManager IUIAnimationManager_iface
;
522 struct manager
*impl_from_IUIAnimationManager( IUIAnimationManager
*iface
)
524 return CONTAINING_RECORD( iface
, struct manager
, IUIAnimationManager_iface
);
527 static HRESULT WINAPI
manager_QueryInterface( IUIAnimationManager
*iface
, REFIID iid
, void **obj
)
529 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
531 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
533 if (IsEqualIID( iid
, &IID_IUnknown
) ||
534 IsEqualIID( iid
, &IID_IUIAnimationManager
))
536 IUIAnimationManager_AddRef( iface
);
541 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
543 return E_NOINTERFACE
;
546 static ULONG WINAPI
manager_AddRef( IUIAnimationManager
*iface
)
548 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
549 ULONG ref
= InterlockedIncrement( &This
->ref
);
551 TRACE( "(%p) ref = %lu\n", This
, ref
);
555 static ULONG WINAPI
manager_Release( IUIAnimationManager
*iface
)
557 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
558 ULONG ref
= InterlockedDecrement(&This
->ref
);
560 TRACE( "(%p) ref = %lu\n", This
, ref
);
570 static HRESULT WINAPI
manager_CreateAnimationVariable( IUIAnimationManager
*iface
, DOUBLE initial_value
, IUIAnimationVariable
**variable
)
572 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
573 TRACE( "(%p)->(%f, %p)\n", This
, initial_value
, variable
);
574 return animation_var_create(initial_value
, variable
);
577 static HRESULT WINAPI
manager_ScheduleTransition( IUIAnimationManager
*iface
, IUIAnimationVariable
*variable
, IUIAnimationTransition
*transition
, UI_ANIMATION_SECONDS current_time
)
579 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
580 FIXME( "stub (%p)->(%p, %p)\n", This
, variable
, transition
);
584 static HRESULT WINAPI
manager_CreateStoryboard( IUIAnimationManager
*iface
, IUIAnimationStoryboard
**storyboard
)
586 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
587 TRACE( "(%p)->(%p)\n", This
, storyboard
);
588 return animation_storyboard_create(storyboard
);
591 static HRESULT WINAPI
manager_FinishAllStoryboards( IUIAnimationManager
*iface
, UI_ANIMATION_SECONDS max_time
)
593 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
594 FIXME( "stub (%p)->(%f)\n", This
, max_time
);
598 static HRESULT WINAPI
manager_AbandonAllStoryboards( IUIAnimationManager
*iface
)
600 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
601 FIXME( "stub (%p)->()\n", This
);
605 static HRESULT WINAPI
manager_Update( IUIAnimationManager
*iface
, UI_ANIMATION_SECONDS cur_time
, UI_ANIMATION_UPDATE_RESULT
*update_result
)
607 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
608 FIXME( "stub (%p)->(%f, %p)\n", This
, cur_time
, update_result
);
610 *update_result
= UI_ANIMATION_UPDATE_VARIABLES_CHANGED
;
614 static HRESULT WINAPI
manager_GetVariableFromTag( IUIAnimationManager
*iface
, IUnknown
*object
, UINT32 id
, IUIAnimationVariable
**variable
)
616 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
617 FIXME( "stub (%p)->(%p, %p)\n", This
, object
, variable
);
621 static HRESULT WINAPI
manager_GetStoryboardFromTag( IUIAnimationManager
*iface
, IUnknown
*object
, UINT32 id
, IUIAnimationStoryboard
**storyboard
)
623 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
624 FIXME( "stub (%p)->(%p, %d, %p)\n", This
, object
, id
, storyboard
);
628 static HRESULT WINAPI
manager_GetStatus( IUIAnimationManager
*iface
, UI_ANIMATION_MANAGER_STATUS
*status
)
630 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
631 FIXME( "stub (%p)->(%p)\n", This
, status
);
635 static HRESULT WINAPI
manager_SetAnimationMode( IUIAnimationManager
*iface
, UI_ANIMATION_MODE mode
)
637 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
638 FIXME( "stub (%p)->(%d)\n", This
, mode
);
642 static HRESULT WINAPI
manager_Pause( IUIAnimationManager
*iface
)
644 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
645 FIXME( "stub (%p)->()\n", This
);
649 static HRESULT WINAPI
manager_Resume( IUIAnimationManager
*iface
)
651 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
652 FIXME( "stub (%p)->()\n", This
);
656 static HRESULT WINAPI
manager_SetManagerEventHandler( IUIAnimationManager
*iface
, IUIAnimationManagerEventHandler
*handler
)
658 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
659 FIXME( "stub (%p)->(%p)\n", This
, handler
);
663 static HRESULT WINAPI
manager_SetCancelPriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
665 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
666 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
670 static HRESULT WINAPI
manager_SetTrimPriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
672 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
673 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
677 static HRESULT WINAPI
manager_SetCompressPriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
679 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
680 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
684 static HRESULT WINAPI
manager_SetConcludePriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
686 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
687 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
691 static HRESULT WINAPI
manager_SetDefaultLongestAcceptableDelay( IUIAnimationManager
*iface
, UI_ANIMATION_SECONDS delay
)
693 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
694 FIXME( "stub (%p)->(%f)\n", This
, delay
);
698 static HRESULT WINAPI
manager_Shutdown( IUIAnimationManager
*iface
)
700 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
701 FIXME( "stub (%p)->()\n", This
);
705 const struct IUIAnimationManagerVtbl manager_vtbl
=
707 manager_QueryInterface
,
710 manager_CreateAnimationVariable
,
711 manager_ScheduleTransition
,
712 manager_CreateStoryboard
,
713 manager_FinishAllStoryboards
,
714 manager_AbandonAllStoryboards
,
716 manager_GetVariableFromTag
,
717 manager_GetStoryboardFromTag
,
719 manager_SetAnimationMode
,
722 manager_SetManagerEventHandler
,
723 manager_SetCancelPriorityComparison
,
724 manager_SetTrimPriorityComparison
,
725 manager_SetCompressPriorityComparison
,
726 manager_SetConcludePriorityComparison
,
727 manager_SetDefaultLongestAcceptableDelay
,
731 static HRESULT
manager_create( IUnknown
*outer
, REFIID iid
, void **obj
)
733 struct manager
*This
= heap_alloc( sizeof(*This
) );
736 if (!This
) return E_OUTOFMEMORY
;
737 This
->IUIAnimationManager_iface
.lpVtbl
= &manager_vtbl
;
740 hr
= IUIAnimationManager_QueryInterface( &This
->IUIAnimationManager_iface
, iid
, obj
);
742 IUIAnimationManager_Release( &This
->IUIAnimationManager_iface
);
746 /***********************************************************************
751 IUIAnimationTimer IUIAnimationTimer_iface
;
755 struct timer
*impl_from_IUIAnimationTimer( IUIAnimationTimer
*iface
)
757 return CONTAINING_RECORD( iface
, struct timer
, IUIAnimationTimer_iface
);
760 static HRESULT WINAPI
timer_QueryInterface( IUIAnimationTimer
*iface
, REFIID iid
, void **obj
)
762 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
764 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
766 if (IsEqualIID( iid
, &IID_IUnknown
) ||
767 IsEqualIID( iid
, &IID_IUIAnimationTimer
))
769 IUIAnimationTimer_AddRef( iface
);
774 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
776 return E_NOINTERFACE
;
779 static ULONG WINAPI
timer_AddRef( IUIAnimationTimer
*iface
)
781 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
782 ULONG ref
= InterlockedIncrement( &This
->ref
);
784 TRACE( "(%p) ref = %lu\n", This
, ref
);
788 static ULONG WINAPI
timer_Release( IUIAnimationTimer
*iface
)
790 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
791 ULONG ref
= InterlockedDecrement(&This
->ref
);
793 TRACE( "(%p) ref = %lu\n", This
, ref
);
801 static HRESULT WINAPI
timer_SetTimerUpdateHandler (IUIAnimationTimer
*iface
,
802 IUIAnimationTimerUpdateHandler
*update_handler
,
803 UI_ANIMATION_IDLE_BEHAVIOR idle_behaviour
)
805 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
806 FIXME( "stub (%p)->(%p, %d)\n", This
, update_handler
, idle_behaviour
);
810 static HRESULT WINAPI
timer_SetTimerEventHandler (IUIAnimationTimer
*iface
,
811 IUIAnimationTimerEventHandler
*handler
)
813 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
814 FIXME( "stub (%p)->()\n", This
);
818 static HRESULT WINAPI
timer_Enable (IUIAnimationTimer
*iface
)
820 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
821 FIXME( "stub (%p)->()\n", This
);
825 static HRESULT WINAPI
timer_Disable (IUIAnimationTimer
*iface
)
827 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
828 FIXME( "stub (%p)->()\n", This
);
832 static HRESULT WINAPI
timer_IsEnabled (IUIAnimationTimer
*iface
)
834 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
835 FIXME( "stub (%p)->()\n", This
);
839 static HRESULT WINAPI
timer_GetTime (IUIAnimationTimer
*iface
, UI_ANIMATION_SECONDS
*seconds
)
841 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
842 FIXME( "stub (%p)->(%p)\n", This
, seconds
);
846 static HRESULT WINAPI
timer_SetFrameRateThreshold (IUIAnimationTimer
*iface
, UINT32 frames_per_sec
)
848 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
849 FIXME( "stub (%p)->(%d)\n", This
, frames_per_sec
);
853 const struct IUIAnimationTimerVtbl timer_vtbl
=
855 timer_QueryInterface
,
858 timer_SetTimerUpdateHandler
,
859 timer_SetTimerEventHandler
,
864 timer_SetFrameRateThreshold
,
867 static HRESULT
timer_create( IUnknown
*outer
, REFIID iid
, void **obj
)
869 struct timer
*This
= heap_alloc( sizeof(*This
) );
873 return E_OUTOFMEMORY
;
874 This
->IUIAnimationTimer_iface
.lpVtbl
= &timer_vtbl
;
877 hr
= IUIAnimationTimer_QueryInterface( &This
->IUIAnimationTimer_iface
, iid
, obj
);
879 IUIAnimationTimer_Release( &This
->IUIAnimationTimer_iface
);
883 /***********************************************************************
884 * IUIAnimationTransitionFactory
888 IUIAnimationTransitionFactory IUIAnimationTransitionFactory_iface
;
892 struct tr_factory
*impl_from_IUIAnimationTransitionFactory( IUIAnimationTransitionFactory
*iface
)
894 return CONTAINING_RECORD( iface
, struct tr_factory
, IUIAnimationTransitionFactory_iface
);
897 static HRESULT WINAPI
tr_factory_QueryInterface( IUIAnimationTransitionFactory
*iface
, REFIID iid
, void **obj
)
899 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
901 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
903 if (IsEqualIID( iid
, &IID_IUnknown
) ||
904 IsEqualIID( iid
, &IID_IUIAnimationTransitionFactory
))
906 IUIAnimationTransitionFactory_AddRef( iface
);
911 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
913 return E_NOINTERFACE
;
916 static ULONG WINAPI
tr_factory_AddRef( IUIAnimationTransitionFactory
*iface
)
918 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
919 ULONG ref
= InterlockedIncrement( &This
->ref
);
921 TRACE( "(%p) ref = %lu\n", This
, ref
);
925 static ULONG WINAPI
tr_factory_Release( IUIAnimationTransitionFactory
*iface
)
927 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
928 ULONG ref
= InterlockedDecrement(&This
->ref
);
930 TRACE( "(%p) ref = %lu\n", This
, ref
);
938 static HRESULT WINAPI
tr_factory_CreateTransition(IUIAnimationTransitionFactory
*iface
,
939 IUIAnimationInterpolator
*interpolator
, IUIAnimationTransition
**transition
)
941 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
942 FIXME( "stub (%p)->(%p, %p)\n", This
, interpolator
, transition
);
946 const struct IUIAnimationTransitionFactoryVtbl tr_factory_vtbl
=
948 tr_factory_QueryInterface
,
951 tr_factory_CreateTransition
954 static HRESULT
transition_create( IUnknown
*outer
, REFIID iid
, void **obj
)
956 struct tr_factory
*This
= heap_alloc( sizeof(*This
) );
959 if (!This
) return E_OUTOFMEMORY
;
960 This
->IUIAnimationTransitionFactory_iface
.lpVtbl
= &tr_factory_vtbl
;
963 hr
= IUIAnimationTransitionFactory_QueryInterface( &This
->IUIAnimationTransitionFactory_iface
, iid
, obj
);
965 IUIAnimationTransitionFactory_Release( &This
->IUIAnimationTransitionFactory_iface
);
969 /***********************************************************************
970 * IUITransitionLibrary
974 IUIAnimationTransitionLibrary IUIAnimationTransitionLibrary_iface
;
978 struct tr_library
*impl_from_IUIAnimationTransitionLibrary( IUIAnimationTransitionLibrary
*iface
)
980 return CONTAINING_RECORD( iface
, struct tr_library
, IUIAnimationTransitionLibrary_iface
);
983 static HRESULT WINAPI
tr_library_QueryInterface( IUIAnimationTransitionLibrary
*iface
,
984 REFIID iid
, void **obj
)
986 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
988 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
990 if (IsEqualIID( iid
, &IID_IUnknown
) ||
991 IsEqualIID( iid
, &IID_IUIAnimationTransitionLibrary
))
993 IUIAnimationTransitionLibrary_AddRef( iface
);
998 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
1000 return E_NOINTERFACE
;
1003 static ULONG WINAPI
tr_library_AddRef( IUIAnimationTransitionLibrary
*iface
)
1005 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1006 ULONG ref
= InterlockedIncrement( &This
->ref
);
1008 TRACE( "(%p) ref = %lu\n", This
, ref
);
1012 static ULONG WINAPI
tr_library_Release( IUIAnimationTransitionLibrary
*iface
)
1014 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1015 ULONG ref
= InterlockedDecrement(&This
->ref
);
1017 TRACE( "(%p) ref = %lu\n", This
, ref
);
1025 static HRESULT WINAPI
tr_library_CreateInstantaneousTransition(IUIAnimationTransitionLibrary
*iface
,
1026 double finalValue
, IUIAnimationTransition
**transition
)
1028 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1029 FIXME( "stub (%p)->(%f, %p)\n", This
, finalValue
, transition
);
1033 static HRESULT WINAPI
tr_library_CreateConstantTransition(IUIAnimationTransitionLibrary
*iface
,
1034 double duration
, IUIAnimationTransition
**transition
)
1036 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1037 FIXME( "stub (%p)->(%f, %p)\n", This
, duration
, transition
);
1041 static HRESULT WINAPI
tr_library_CreateDiscreteTransition(IUIAnimationTransitionLibrary
*iface
,
1042 double delay
, double finalValue
, double hold
, IUIAnimationTransition
**transition
)
1044 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1045 FIXME( "stub (%p)->( )\n", This
);
1049 static HRESULT WINAPI
tr_library_CreateLinearTransition(IUIAnimationTransitionLibrary
*iface
,
1050 double duration
, double finalValue
, IUIAnimationTransition
**transition
)
1052 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1053 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, duration
, finalValue
, transition
);
1057 static HRESULT WINAPI
tr_library_CreateLinearTransitionFromSpeed(IUIAnimationTransitionLibrary
*iface
,
1058 double speed
, double finalValue
, IUIAnimationTransition
**transition
)
1060 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1061 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, speed
, finalValue
, transition
);
1065 static HRESULT WINAPI
tr_library_CreateSinusoidalTransitionFromVelocity(IUIAnimationTransitionLibrary
*iface
,
1066 double duration
, double period
, IUIAnimationTransition
**transition
)
1068 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1069 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, duration
, period
, transition
);
1073 static HRESULT WINAPI
tr_library_CreateSinusoidalTransitionFromRange(IUIAnimationTransitionLibrary
*iface
,
1074 double duration
, double minimumValue
, double maximumValue
, double period
,
1075 UI_ANIMATION_SLOPE slope
, IUIAnimationTransition
**transition
)
1077 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1078 FIXME( "stub (%p)->(%f, %f, %f, %f, %d, %p)\n", This
, duration
, minimumValue
, maximumValue
, period
, slope
, transition
);
1082 static HRESULT WINAPI
tr_library_CreateAccelerateDecelerateTransition(IUIAnimationTransitionLibrary
*iface
,
1083 double duration
, double finalValue
, double accelerationRatio
, double decelerationRatio
,
1084 IUIAnimationTransition
**transition
)
1086 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1087 FIXME( "stub (%p)->(%f, %f, %f, %f, %p)\n", This
, duration
, finalValue
, accelerationRatio
, decelerationRatio
, transition
);
1091 static HRESULT WINAPI
tr_library_CreateReversalTransition(IUIAnimationTransitionLibrary
*iface
, double duration
,
1092 IUIAnimationTransition
**transition
)
1094 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1095 FIXME( "stub (%p)->(%f, %p)\n", This
, duration
, transition
);
1099 static HRESULT WINAPI
tr_library_CreateCubicTransition(IUIAnimationTransitionLibrary
*iface
, double duration
,
1100 double finalValue
, double finalVelocity
, IUIAnimationTransition
**transition
)
1102 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1103 FIXME( "stub (%p)->(%f, %f, %f, %p)\n", This
, duration
, finalValue
, finalVelocity
, transition
);
1107 static HRESULT WINAPI
tr_library_CreateSmoothStopTransition(IUIAnimationTransitionLibrary
*iface
,
1108 double maximumDuration
, double finalValue
, IUIAnimationTransition
**transition
)
1110 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1111 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, maximumDuration
, finalValue
, transition
);
1115 static HRESULT WINAPI
tr_library_CreateParabolicTransitionFromAcceleration(IUIAnimationTransitionLibrary
*iface
,
1116 double finalValue
, double finalVelocity
, double acceleration
, IUIAnimationTransition
**transition
)
1118 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1119 FIXME( "stub (%p)->( )\n", This
);
1123 const struct IUIAnimationTransitionLibraryVtbl tr_library_vtbl
=
1125 tr_library_QueryInterface
,
1128 tr_library_CreateInstantaneousTransition
,
1129 tr_library_CreateConstantTransition
,
1130 tr_library_CreateDiscreteTransition
,
1131 tr_library_CreateLinearTransition
,
1132 tr_library_CreateLinearTransitionFromSpeed
,
1133 tr_library_CreateSinusoidalTransitionFromVelocity
,
1134 tr_library_CreateSinusoidalTransitionFromRange
,
1135 tr_library_CreateAccelerateDecelerateTransition
,
1136 tr_library_CreateReversalTransition
,
1137 tr_library_CreateCubicTransition
,
1138 tr_library_CreateSmoothStopTransition
,
1139 tr_library_CreateParabolicTransitionFromAcceleration
,
1142 static HRESULT
library_create( IUnknown
*outer
, REFIID iid
, void **obj
)
1144 struct tr_library
*This
= heap_alloc( sizeof(*This
) );
1147 if (!This
) return E_OUTOFMEMORY
;
1148 This
->IUIAnimationTransitionLibrary_iface
.lpVtbl
= &tr_library_vtbl
;
1151 hr
= IUIAnimationTransitionLibrary_QueryInterface( &This
->IUIAnimationTransitionLibrary_iface
, iid
, obj
);
1153 IUIAnimationTransitionLibrary_Release( &This
->IUIAnimationTransitionLibrary_iface
);
1157 static struct class_factory manager_cf
= { { &class_factory_vtbl
}, manager_create
};
1158 static struct class_factory timer_cf
= { { &class_factory_vtbl
}, timer_create
};
1159 static struct class_factory transition_cf
= { { &class_factory_vtbl
}, transition_create
};
1160 static struct class_factory library_cf
= { { &class_factory_vtbl
}, library_create
};
1162 /******************************************************************
1165 HRESULT WINAPI
DllGetClassObject( REFCLSID clsid
, REFIID iid
, void **obj
)
1167 IClassFactory
*cf
= NULL
;
1169 TRACE( "(%s %s %p)\n", debugstr_guid( clsid
), debugstr_guid( iid
), obj
);
1171 if (IsEqualCLSID( clsid
, &CLSID_UIAnimationManager
))
1172 cf
= &manager_cf
.IClassFactory_iface
;
1173 else if (IsEqualCLSID( clsid
, &CLSID_UIAnimationTimer
))
1174 cf
= &timer_cf
.IClassFactory_iface
;
1175 else if (IsEqualCLSID( clsid
, &CLSID_UIAnimationTransitionFactory
))
1176 cf
= &transition_cf
.IClassFactory_iface
;
1177 else if (IsEqualCLSID( clsid
, &CLSID_UIAnimationTransitionLibrary
))
1178 cf
= &library_cf
.IClassFactory_iface
;
1181 return CLASS_E_CLASSNOTAVAILABLE
;
1183 return IClassFactory_QueryInterface( cf
, iid
, obj
);