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
);
39 static HINSTANCE hinstance
;
41 BOOL WINAPI
DllMain( HINSTANCE dll
, DWORD reason
, LPVOID reserved
)
43 TRACE("(%p %d %p)\n", dll
, reason
, reserved
);
47 case DLL_WINE_PREATTACH
:
48 return FALSE
; /* prefer native version */
49 case DLL_PROCESS_ATTACH
:
51 DisableThreadLibraryCalls( dll
);
59 IClassFactory IClassFactory_iface
;
60 HRESULT (*create_instance
)(IUnknown
*, REFIID
, void **);
63 static inline struct class_factory
*impl_from_IClassFactory( IClassFactory
*iface
)
65 return CONTAINING_RECORD( iface
, struct class_factory
, IClassFactory_iface
);
68 static HRESULT WINAPI
class_factory_QueryInterface( IClassFactory
*iface
, REFIID iid
, void **obj
)
70 if (IsEqualIID( iid
, &IID_IUnknown
) ||
71 IsEqualIID( iid
, &IID_IClassFactory
))
73 IClassFactory_AddRef( iface
);
78 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
83 static ULONG WINAPI
class_factory_AddRef( IClassFactory
*iface
)
88 static ULONG WINAPI
class_factory_Release( IClassFactory
*iface
)
93 static HRESULT WINAPI
class_factory_CreateInstance( IClassFactory
*iface
,
94 IUnknown
*outer
, REFIID iid
,
97 struct class_factory
*This
= impl_from_IClassFactory( iface
);
99 TRACE( "%p %s %p\n", outer
, debugstr_guid( iid
), obj
);
102 return This
->create_instance( outer
, iid
, obj
);
105 static HRESULT WINAPI
class_factory_LockServer( IClassFactory
*iface
,
108 FIXME( "%d: stub!\n", lock
);
112 static const struct IClassFactoryVtbl class_factory_vtbl
=
114 class_factory_QueryInterface
,
115 class_factory_AddRef
,
116 class_factory_Release
,
117 class_factory_CreateInstance
,
118 class_factory_LockServer
121 /***********************************************************************
122 * IUIAnimationStoryboard
124 struct animation_storyboard
126 IUIAnimationStoryboard IUIAnimationStoryboard_iface
;
130 struct animation_storyboard
*impl_from_IUIAnimationStoryboard( IUIAnimationStoryboard
*iface
)
132 return CONTAINING_RECORD( iface
, struct animation_storyboard
, IUIAnimationStoryboard_iface
);
135 static HRESULT WINAPI
animation_storyboard_QueryInterface( IUIAnimationStoryboard
*iface
,
136 REFIID iid
, void **obj
)
138 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
140 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
142 if (IsEqualIID( iid
, &IID_IUnknown
) ||
143 IsEqualIID( iid
, &IID_IUIAnimationStoryboard
))
145 IUIAnimationStoryboard_AddRef( iface
);
150 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
152 return E_NOINTERFACE
;
155 static ULONG WINAPI
animation_storyboard_AddRef( IUIAnimationStoryboard
*iface
)
157 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
158 ULONG ref
= InterlockedIncrement( &This
->ref
);
160 TRACE( "(%p) ref = %u\n", This
, ref
);
164 static ULONG WINAPI
animation_storyboard_Release( IUIAnimationStoryboard
*iface
)
166 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
167 ULONG ref
= InterlockedDecrement(&This
->ref
);
169 TRACE( "(%p) ref = %u\n", This
, ref
);
177 static HRESULT WINAPI
animation_storyboard_AddTransition (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
,
178 IUIAnimationTransition
*transition
)
180 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
181 FIXME( "stub (%p)->( )\n", This
);
185 static HRESULT WINAPI
animation_storyboard_AddKeyframeAtOffset (IUIAnimationStoryboard
*iface
, UI_ANIMATION_KEYFRAME existingframe
,
186 UI_ANIMATION_SECONDS offset
, UI_ANIMATION_KEYFRAME
*keyframe
)
188 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
189 FIXME( "stub (%p)->( )\n", This
);
193 static HRESULT WINAPI
animation_storyboard_AddKeyframeAfterTransition (IUIAnimationStoryboard
*iface
,IUIAnimationTransition
*transition
,
194 UI_ANIMATION_KEYFRAME
*keyframe
)
196 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
197 FIXME( "stub (%p)->( )\n", This
);
201 static HRESULT WINAPI
animation_storyboard_AddTransitionAtKeyframe (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
,
202 IUIAnimationTransition
*transition
, UI_ANIMATION_KEYFRAME start_key
)
204 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
205 FIXME( "stub (%p)->( )\n", This
);
209 static HRESULT WINAPI
animation_storyboard_AddTransitionBetweenKeyframes (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
,
210 IUIAnimationTransition
*transition
, UI_ANIMATION_KEYFRAME start_key
, UI_ANIMATION_KEYFRAME end_key
)
212 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
213 FIXME( "stub (%p)->( )\n", This
);
217 static HRESULT WINAPI
animation_storyboard_RepeatBetweenKeyframes (IUIAnimationStoryboard
*iface
, UI_ANIMATION_KEYFRAME start_key
,
218 UI_ANIMATION_KEYFRAME end_key
, INT32 count
)
220 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
221 FIXME( "stub (%p)->( )\n", This
);
225 static HRESULT WINAPI
animation_storyboard_HoldVariable (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
)
227 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
228 FIXME( "stub (%p)->( )\n", This
);
232 static HRESULT WINAPI
animation_storyboard_SetLongestAcceptableDelay (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS delay
)
234 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
235 FIXME( "stub (%p)->( )\n", This
);
239 static HRESULT WINAPI
animation_storyboard_Schedule (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS now
,
240 UI_ANIMATION_SCHEDULING_RESULT
*result
)
242 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
243 FIXME( "stub (%p)->( )\n", This
);
247 static HRESULT WINAPI
animation_storyboard_Conclude (IUIAnimationStoryboard
*iface
)
249 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
250 FIXME( "stub (%p)->( )\n", This
);
254 static HRESULT WINAPI
animation_storyboard_Finish (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS deadline
)
256 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
257 FIXME( "stub (%p)->( )\n", This
);
261 static HRESULT WINAPI
animation_storyboard_Abandon (IUIAnimationStoryboard
*iface
)
263 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
264 FIXME( "stub (%p)->( )\n", This
);
268 static HRESULT WINAPI
animation_storyboard_SetTag(IUIAnimationStoryboard
*iface
, IUnknown
*object
, UINT32 id
)
270 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
271 FIXME( "stub (%p)->( )\n", This
);
275 static HRESULT WINAPI
animation_storyboard_GetTag (IUIAnimationStoryboard
*iface
, IUnknown
**object
, UINT32
*id
)
277 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
278 FIXME( "stub (%p)->( )\n", This
);
282 static HRESULT WINAPI
animation_storyboard_GetStatus (IUIAnimationStoryboard
*iface
, UI_ANIMATION_STORYBOARD_STATUS
*status
)
284 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
285 FIXME( "stub (%p)->( )\n", This
);
289 static HRESULT WINAPI
animation_storyboard_GetElapsedTime (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS
*elapsed
)
291 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
292 FIXME( "stub (%p)->( )\n", This
);
296 static HRESULT WINAPI
animation_storyboard_SetStoryboardEventHandler (IUIAnimationStoryboard
*iface
, IUIAnimationStoryboardEventHandler
*handler
)
298 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
299 FIXME( "stub (%p)->( )\n", This
);
303 const struct IUIAnimationStoryboardVtbl animation_storyboard_vtbl
=
305 animation_storyboard_QueryInterface
,
306 animation_storyboard_AddRef
,
307 animation_storyboard_Release
,
308 animation_storyboard_AddTransition
,
309 animation_storyboard_AddKeyframeAtOffset
,
310 animation_storyboard_AddKeyframeAfterTransition
,
311 animation_storyboard_AddTransitionAtKeyframe
,
312 animation_storyboard_AddTransitionBetweenKeyframes
,
313 animation_storyboard_RepeatBetweenKeyframes
,
314 animation_storyboard_HoldVariable
,
315 animation_storyboard_SetLongestAcceptableDelay
,
316 animation_storyboard_Schedule
,
317 animation_storyboard_Conclude
,
318 animation_storyboard_Finish
,
319 animation_storyboard_Abandon
,
320 animation_storyboard_SetTag
,
321 animation_storyboard_GetTag
,
322 animation_storyboard_GetStatus
,
323 animation_storyboard_GetElapsedTime
,
324 animation_storyboard_SetStoryboardEventHandler
327 static HRESULT
animation_storyboard_create( IUIAnimationStoryboard
**obj
)
329 struct animation_storyboard
*This
= heap_alloc( sizeof(*This
) );
331 if (!This
) return E_OUTOFMEMORY
;
332 This
->IUIAnimationStoryboard_iface
.lpVtbl
= &animation_storyboard_vtbl
;
335 *obj
= &This
->IUIAnimationStoryboard_iface
;
340 /***********************************************************************
341 * IUIAnimationVariable
345 IUIAnimationVariable IUIAnimationVariable_iface
;
350 struct animation_var
*impl_from_IUIAnimationVariable( IUIAnimationVariable
*iface
)
352 return CONTAINING_RECORD( iface
, struct animation_var
, IUIAnimationVariable_iface
);
355 static HRESULT WINAPI
animation_var_QueryInterface( IUIAnimationVariable
*iface
,
356 REFIID iid
, void **obj
)
358 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
360 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
362 if (IsEqualIID( iid
, &IID_IUnknown
) ||
363 IsEqualIID( iid
, &IID_IUIAnimationVariable
))
365 IUIAnimationVariable_AddRef( iface
);
370 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
372 return E_NOINTERFACE
;
375 static ULONG WINAPI
animation_var_AddRef( IUIAnimationVariable
*iface
)
377 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
378 ULONG ref
= InterlockedIncrement( &This
->ref
);
380 TRACE( "(%p) ref = %u\n", This
, ref
);
384 static ULONG WINAPI
animation_var_Release( IUIAnimationVariable
*iface
)
386 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
387 ULONG ref
= InterlockedDecrement(&This
->ref
);
389 TRACE( "(%p) ref = %u\n", This
, ref
);
397 static HRESULT WINAPI
animation_var_GetValue ( IUIAnimationVariable
*iface
, DOUBLE
*value
)
399 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
400 FIXME( "stub (%p)->( )\n", This
);
404 static HRESULT WINAPI
animation_var_GetFinalValue ( IUIAnimationVariable
*iface
, DOUBLE
*value
)
406 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
407 FIXME( "stub (%p)->( )\n", This
);
411 static HRESULT WINAPI
animation_var_GetPreviousValue ( IUIAnimationVariable
*iface
, DOUBLE
*value
)
413 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
414 FIXME( "stub (%p)->( )\n", This
);
418 static HRESULT WINAPI
animation_var_GetIntegerValue ( IUIAnimationVariable
*iface
, INT32
*value
)
420 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
421 FIXME( "stub (%p)->( )\n", This
);
425 static HRESULT WINAPI
animation_var_GetFinalIntegerValue ( IUIAnimationVariable
*iface
, INT32
*value
)
427 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
428 FIXME( "stub (%p)->( )\n", This
);
432 static HRESULT WINAPI
animation_var_GetPreviousIntegerValue ( IUIAnimationVariable
*iface
, INT32
*value
)
434 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
435 FIXME( "stub (%p)->( )\n", This
);
439 static HRESULT WINAPI
animation_var_GetCurrentStoryboard ( IUIAnimationVariable
*iface
, IUIAnimationStoryboard
**storyboard
)
441 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
442 FIXME( "stub (%p)->( )\n", This
);
446 static HRESULT WINAPI
animation_var_SetLowerBound ( IUIAnimationVariable
*iface
, DOUBLE bound
)
448 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
449 FIXME( "stub (%p)->( )\n", This
);
453 static HRESULT WINAPI
animation_var_SetUpperBound ( IUIAnimationVariable
*iface
, DOUBLE bound
)
455 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
456 FIXME( "stub (%p)->( )\n", This
);
460 static HRESULT WINAPI
animation_var_SetRoundingMode ( IUIAnimationVariable
*iface
,UI_ANIMATION_ROUNDING_MODE mode
)
462 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
463 FIXME( "stub (%p)->( )\n", This
);
467 static HRESULT WINAPI
animation_var_SetTag ( IUIAnimationVariable
*iface
, IUnknown
*object
, UINT32 id
)
469 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
470 FIXME( "stub (%p)->( )\n", This
);
474 static HRESULT WINAPI
animation_var_GetTag ( IUIAnimationVariable
*iface
, IUnknown
**object
, UINT32
*id
)
476 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
477 FIXME( "stub (%p)->( )\n", This
);
481 static HRESULT WINAPI
animation_var_SetVariableChangeHandler ( IUIAnimationVariable
*iface
, IUIAnimationVariableChangeHandler
*handler
)
483 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
484 FIXME( "stub (%p)->( )\n", This
);
488 static HRESULT WINAPI
animation_var_SetVariableIntegerChangeHandler ( IUIAnimationVariable
*iface
,
489 IUIAnimationVariableIntegerChangeHandler
*handler
)
491 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
492 FIXME( "stub (%p)->( )\n", This
);
496 const struct IUIAnimationVariableVtbl animation_var_vtbl
=
498 animation_var_QueryInterface
,
499 animation_var_AddRef
,
500 animation_var_Release
,
501 animation_var_GetValue
,
502 animation_var_GetFinalValue
,
503 animation_var_GetPreviousValue
,
504 animation_var_GetIntegerValue
,
505 animation_var_GetFinalIntegerValue
,
506 animation_var_GetPreviousIntegerValue
,
507 animation_var_GetCurrentStoryboard
,
508 animation_var_SetLowerBound
,
509 animation_var_SetUpperBound
,
510 animation_var_SetRoundingMode
,
511 animation_var_SetTag
,
512 animation_var_GetTag
,
513 animation_var_SetVariableChangeHandler
,
514 animation_var_SetVariableIntegerChangeHandler
,
517 static HRESULT
animation_var_create(DOUBLE initial
, IUIAnimationVariable
**obj
)
519 struct animation_var
*This
= heap_alloc( sizeof(*This
) );
521 if (!This
) return E_OUTOFMEMORY
;
522 This
->IUIAnimationVariable_iface
.lpVtbl
= &animation_var_vtbl
;
524 This
->initial
= initial
;
526 *obj
= &This
->IUIAnimationVariable_iface
;
531 /***********************************************************************
532 * IUIAnimationManager
536 IUIAnimationManager IUIAnimationManager_iface
;
540 struct manager
*impl_from_IUIAnimationManager( IUIAnimationManager
*iface
)
542 return CONTAINING_RECORD( iface
, struct manager
, IUIAnimationManager_iface
);
545 static HRESULT WINAPI
manager_QueryInterface( IUIAnimationManager
*iface
, REFIID iid
, void **obj
)
547 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
549 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
551 if (IsEqualIID( iid
, &IID_IUnknown
) ||
552 IsEqualIID( iid
, &IID_IUIAnimationManager
))
554 IUIAnimationManager_AddRef( iface
);
559 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
561 return E_NOINTERFACE
;
564 static ULONG WINAPI
manager_AddRef( IUIAnimationManager
*iface
)
566 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
567 ULONG ref
= InterlockedIncrement( &This
->ref
);
569 TRACE( "(%p) ref = %u\n", This
, ref
);
573 static ULONG WINAPI
manager_Release( IUIAnimationManager
*iface
)
575 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
576 ULONG ref
= InterlockedDecrement(&This
->ref
);
578 TRACE( "(%p) ref = %u\n", This
, ref
);
588 static HRESULT WINAPI
manager_CreateAnimationVariable( IUIAnimationManager
*iface
, DOUBLE initial_value
, IUIAnimationVariable
**variable
)
590 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
591 TRACE( "(%p)->(%f, %p)\n", This
, initial_value
, variable
);
592 return animation_var_create(initial_value
, variable
);
595 static HRESULT WINAPI
manager_ScheduleTransition( IUIAnimationManager
*iface
, IUIAnimationVariable
*variable
, IUIAnimationTransition
*transition
, UI_ANIMATION_SECONDS current_time
)
597 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
598 FIXME( "stub (%p)->(%p, %p)\n", This
, variable
, transition
);
602 static HRESULT WINAPI
manager_CreateStoryboard( IUIAnimationManager
*iface
, IUIAnimationStoryboard
**storyboard
)
604 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
605 TRACE( "(%p)->(%p)\n", This
, storyboard
);
606 return animation_storyboard_create(storyboard
);
609 static HRESULT WINAPI
manager_FinishAllStoryboards( IUIAnimationManager
*iface
, UI_ANIMATION_SECONDS max_time
)
611 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
612 FIXME( "stub (%p)->(%f)\n", This
, max_time
);
616 static HRESULT WINAPI
manager_AbandonAllStoryboards( IUIAnimationManager
*iface
)
618 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
619 FIXME( "stub (%p)->()\n", This
);
623 static HRESULT WINAPI
manager_Update( IUIAnimationManager
*iface
, UI_ANIMATION_SECONDS cur_time
, UI_ANIMATION_UPDATE_RESULT
*update_result
)
625 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
626 FIXME( "stub (%p)->(%f, %p)\n", This
, cur_time
, update_result
);
628 *update_result
= UI_ANIMATION_UPDATE_VARIABLES_CHANGED
;
632 static HRESULT WINAPI
manager_GetVariableFromTag( IUIAnimationManager
*iface
, IUnknown
*object
, UINT32 id
, IUIAnimationVariable
**variable
)
634 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
635 FIXME( "stub (%p)->(%p, %p)\n", This
, object
, variable
);
639 static HRESULT WINAPI
manager_GetStoryboardFromTag( IUIAnimationManager
*iface
, IUnknown
*object
, UINT32 id
, IUIAnimationStoryboard
**storyboard
)
641 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
642 FIXME( "stub (%p)->(%p, %d, %p)\n", This
, object
, id
, storyboard
);
646 static HRESULT WINAPI
manager_GetStatus( IUIAnimationManager
*iface
, UI_ANIMATION_MANAGER_STATUS
*status
)
648 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
649 FIXME( "stub (%p)->(%p)\n", This
, status
);
653 static HRESULT WINAPI
manager_SetAnimationMode( IUIAnimationManager
*iface
, UI_ANIMATION_MODE mode
)
655 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
656 FIXME( "stub (%p)->(%d)\n", This
, mode
);
660 static HRESULT WINAPI
manager_Pause( IUIAnimationManager
*iface
)
662 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
663 FIXME( "stub (%p)->()\n", This
);
667 static HRESULT WINAPI
manager_Resume( IUIAnimationManager
*iface
)
669 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
670 FIXME( "stub (%p)->()\n", This
);
674 static HRESULT WINAPI
manager_SetManagerEventHandler( IUIAnimationManager
*iface
, IUIAnimationManagerEventHandler
*handler
)
676 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
677 FIXME( "stub (%p)->(%p)\n", This
, handler
);
681 static HRESULT WINAPI
manager_SetCancelPriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
683 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
684 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
688 static HRESULT WINAPI
manager_SetTrimPriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
690 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
691 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
695 static HRESULT WINAPI
manager_SetCompressPriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
697 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
698 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
702 static HRESULT WINAPI
manager_SetConcludePriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
704 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
705 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
709 static HRESULT WINAPI
manager_SetDefaultLongestAcceptableDelay( IUIAnimationManager
*iface
, UI_ANIMATION_SECONDS delay
)
711 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
712 FIXME( "stub (%p)->(%f)\n", This
, delay
);
716 static HRESULT WINAPI
manager_Shutdown( IUIAnimationManager
*iface
)
718 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
719 FIXME( "stub (%p)->()\n", This
);
723 const struct IUIAnimationManagerVtbl manager_vtbl
=
725 manager_QueryInterface
,
728 manager_CreateAnimationVariable
,
729 manager_ScheduleTransition
,
730 manager_CreateStoryboard
,
731 manager_FinishAllStoryboards
,
732 manager_AbandonAllStoryboards
,
734 manager_GetVariableFromTag
,
735 manager_GetStoryboardFromTag
,
737 manager_SetAnimationMode
,
740 manager_SetManagerEventHandler
,
741 manager_SetCancelPriorityComparison
,
742 manager_SetTrimPriorityComparison
,
743 manager_SetCompressPriorityComparison
,
744 manager_SetConcludePriorityComparison
,
745 manager_SetDefaultLongestAcceptableDelay
,
749 static HRESULT
manager_create( IUnknown
*outer
, REFIID iid
, void **obj
)
751 struct manager
*This
= heap_alloc( sizeof(*This
) );
754 if (!This
) return E_OUTOFMEMORY
;
755 This
->IUIAnimationManager_iface
.lpVtbl
= &manager_vtbl
;
758 hr
= IUIAnimationManager_QueryInterface( &This
->IUIAnimationManager_iface
, iid
, obj
);
760 IUIAnimationManager_Release( &This
->IUIAnimationManager_iface
);
764 /***********************************************************************
769 IUIAnimationTimer IUIAnimationTimer_iface
;
773 struct timer
*impl_from_IUIAnimationTimer( IUIAnimationTimer
*iface
)
775 return CONTAINING_RECORD( iface
, struct timer
, IUIAnimationTimer_iface
);
778 static HRESULT WINAPI
timer_QueryInterface( IUIAnimationTimer
*iface
, REFIID iid
, void **obj
)
780 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
782 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
784 if (IsEqualIID( iid
, &IID_IUnknown
) ||
785 IsEqualIID( iid
, &IID_IUIAnimationTimer
))
787 IUIAnimationTimer_AddRef( iface
);
792 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
794 return E_NOINTERFACE
;
797 static ULONG WINAPI
timer_AddRef( IUIAnimationTimer
*iface
)
799 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
800 ULONG ref
= InterlockedIncrement( &This
->ref
);
802 TRACE( "(%p) ref = %u\n", This
, ref
);
806 static ULONG WINAPI
timer_Release( IUIAnimationTimer
*iface
)
808 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
809 ULONG ref
= InterlockedDecrement(&This
->ref
);
811 TRACE( "(%p) ref = %u\n", This
, ref
);
819 static HRESULT WINAPI
timer_SetTimerUpdateHandler (IUIAnimationTimer
*iface
,
820 IUIAnimationTimerUpdateHandler
*update_handler
,
821 UI_ANIMATION_IDLE_BEHAVIOR idle_behaviour
)
823 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
824 FIXME( "stub (%p)->(%p, %d)\n", This
, update_handler
, idle_behaviour
);
828 static HRESULT WINAPI
timer_SetTimerEventHandler (IUIAnimationTimer
*iface
,
829 IUIAnimationTimerEventHandler
*handler
)
831 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
832 FIXME( "stub (%p)->()\n", This
);
836 static HRESULT WINAPI
timer_Enable (IUIAnimationTimer
*iface
)
838 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
839 FIXME( "stub (%p)->()\n", This
);
843 static HRESULT WINAPI
timer_Disable (IUIAnimationTimer
*iface
)
845 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
846 FIXME( "stub (%p)->()\n", This
);
850 static HRESULT WINAPI
timer_IsEnabled (IUIAnimationTimer
*iface
)
852 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
853 FIXME( "stub (%p)->()\n", This
);
857 static HRESULT WINAPI
timer_GetTime (IUIAnimationTimer
*iface
, UI_ANIMATION_SECONDS
*seconds
)
859 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
860 FIXME( "stub (%p)->(%p)\n", This
, seconds
);
864 static HRESULT WINAPI
timer_SetFrameRateThreshold (IUIAnimationTimer
*iface
, UINT32 frames_per_sec
)
866 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
867 FIXME( "stub (%p)->(%d)\n", This
, frames_per_sec
);
871 const struct IUIAnimationTimerVtbl timer_vtbl
=
873 timer_QueryInterface
,
876 timer_SetTimerUpdateHandler
,
877 timer_SetTimerEventHandler
,
882 timer_SetFrameRateThreshold
,
885 static HRESULT
timer_create( IUnknown
*outer
, REFIID iid
, void **obj
)
887 struct timer
*This
= heap_alloc( sizeof(*This
) );
891 return E_OUTOFMEMORY
;
892 This
->IUIAnimationTimer_iface
.lpVtbl
= &timer_vtbl
;
895 hr
= IUIAnimationTimer_QueryInterface( &This
->IUIAnimationTimer_iface
, iid
, obj
);
897 IUIAnimationTimer_Release( &This
->IUIAnimationTimer_iface
);
901 /***********************************************************************
902 * IUIAnimationTransitionFactory
906 IUIAnimationTransitionFactory IUIAnimationTransitionFactory_iface
;
910 struct tr_factory
*impl_from_IUIAnimationTransitionFactory( IUIAnimationTransitionFactory
*iface
)
912 return CONTAINING_RECORD( iface
, struct tr_factory
, IUIAnimationTransitionFactory_iface
);
915 static HRESULT WINAPI
tr_factory_QueryInterface( IUIAnimationTransitionFactory
*iface
, REFIID iid
, void **obj
)
917 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
919 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
921 if (IsEqualIID( iid
, &IID_IUnknown
) ||
922 IsEqualIID( iid
, &IID_IUIAnimationTransitionFactory
))
924 IUIAnimationTransitionFactory_AddRef( iface
);
929 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
931 return E_NOINTERFACE
;
934 static ULONG WINAPI
tr_factory_AddRef( IUIAnimationTransitionFactory
*iface
)
936 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
937 ULONG ref
= InterlockedIncrement( &This
->ref
);
939 TRACE( "(%p) ref = %u\n", This
, ref
);
943 static ULONG WINAPI
tr_factory_Release( IUIAnimationTransitionFactory
*iface
)
945 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
946 ULONG ref
= InterlockedDecrement(&This
->ref
);
948 TRACE( "(%p) ref = %u\n", This
, ref
);
956 static HRESULT WINAPI
tr_factory_CreateTransition(IUIAnimationTransitionFactory
*iface
,
957 IUIAnimationInterpolator
*interpolator
, IUIAnimationTransition
**transition
)
959 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
960 FIXME( "stub (%p)->(%p, %p)\n", This
, interpolator
, transition
);
964 const struct IUIAnimationTransitionFactoryVtbl tr_factory_vtbl
=
966 tr_factory_QueryInterface
,
969 tr_factory_CreateTransition
972 static HRESULT
transition_create( IUnknown
*outer
, REFIID iid
, void **obj
)
974 struct tr_factory
*This
= heap_alloc( sizeof(*This
) );
977 if (!This
) return E_OUTOFMEMORY
;
978 This
->IUIAnimationTransitionFactory_iface
.lpVtbl
= &tr_factory_vtbl
;
981 hr
= IUIAnimationTransitionFactory_QueryInterface( &This
->IUIAnimationTransitionFactory_iface
, iid
, obj
);
983 IUIAnimationTransitionFactory_Release( &This
->IUIAnimationTransitionFactory_iface
);
987 /***********************************************************************
988 * IUITransitionLibrary
992 IUIAnimationTransitionLibrary IUIAnimationTransitionLibrary_iface
;
996 struct tr_library
*impl_from_IUIAnimationTransitionLibrary( IUIAnimationTransitionLibrary
*iface
)
998 return CONTAINING_RECORD( iface
, struct tr_library
, IUIAnimationTransitionLibrary_iface
);
1001 static HRESULT WINAPI
tr_library_QueryInterface( IUIAnimationTransitionLibrary
*iface
,
1002 REFIID iid
, void **obj
)
1004 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1006 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
1008 if (IsEqualIID( iid
, &IID_IUnknown
) ||
1009 IsEqualIID( iid
, &IID_IUIAnimationTransitionLibrary
))
1011 IUIAnimationTransitionLibrary_AddRef( iface
);
1016 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
1018 return E_NOINTERFACE
;
1021 static ULONG WINAPI
tr_library_AddRef( IUIAnimationTransitionLibrary
*iface
)
1023 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1024 ULONG ref
= InterlockedIncrement( &This
->ref
);
1026 TRACE( "(%p) ref = %u\n", This
, ref
);
1030 static ULONG WINAPI
tr_library_Release( IUIAnimationTransitionLibrary
*iface
)
1032 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1033 ULONG ref
= InterlockedDecrement(&This
->ref
);
1035 TRACE( "(%p) ref = %u\n", This
, ref
);
1043 static HRESULT WINAPI
tr_library_CreateInstantaneousTransition(IUIAnimationTransitionLibrary
*iface
,
1044 double finalValue
, IUIAnimationTransition
**transition
)
1046 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1047 FIXME( "stub (%p)->(%f, %p)\n", This
, finalValue
, transition
);
1051 static HRESULT WINAPI
tr_library_CreateConstantTransition(IUIAnimationTransitionLibrary
*iface
,
1052 double duration
, IUIAnimationTransition
**transition
)
1054 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1055 FIXME( "stub (%p)->(%f, %p)\n", This
, duration
, transition
);
1059 static HRESULT WINAPI
tr_library_CreateDiscreteTransition(IUIAnimationTransitionLibrary
*iface
,
1060 double delay
, double finalValue
, double hold
, IUIAnimationTransition
**transition
)
1062 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1063 FIXME( "stub (%p)->( )\n", This
);
1067 static HRESULT WINAPI
tr_library_CreateLinearTransition(IUIAnimationTransitionLibrary
*iface
,
1068 double duration
, double finalValue
, IUIAnimationTransition
**transition
)
1070 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1071 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, duration
, finalValue
, transition
);
1075 static HRESULT WINAPI
tr_library_CreateLinearTransitionFromSpeed(IUIAnimationTransitionLibrary
*iface
,
1076 double speed
, double finalValue
, IUIAnimationTransition
**transition
)
1078 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1079 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, speed
, finalValue
, transition
);
1083 static HRESULT WINAPI
tr_library_CreateSinusoidalTransitionFromVelocity(IUIAnimationTransitionLibrary
*iface
,
1084 double duration
, double period
, IUIAnimationTransition
**transition
)
1086 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1087 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, duration
, period
, transition
);
1091 static HRESULT WINAPI
tr_library_CreateSinusoidalTransitionFromRange(IUIAnimationTransitionLibrary
*iface
,
1092 double duration
, double minimumValue
, double maximumValue
, double period
,
1093 UI_ANIMATION_SLOPE slope
, IUIAnimationTransition
**transition
)
1095 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1096 FIXME( "stub (%p)->(%f, %f, %f, %f, %d, %p)\n", This
, duration
, minimumValue
, maximumValue
, period
, slope
, transition
);
1100 static HRESULT WINAPI
tr_library_CreateAccelerateDecelerateTransition(IUIAnimationTransitionLibrary
*iface
,
1101 double duration
, double finalValue
, double accelerationRatio
, double decelerationRatio
,
1102 IUIAnimationTransition
**transition
)
1104 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1105 FIXME( "stub (%p)->(%f, %f, %f, %f, %p)\n", This
, duration
, finalValue
, accelerationRatio
, decelerationRatio
, transition
);
1109 static HRESULT WINAPI
tr_library_CreateReversalTransition(IUIAnimationTransitionLibrary
*iface
, double duration
,
1110 IUIAnimationTransition
**transition
)
1112 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1113 FIXME( "stub (%p)->(%f, %p)\n", This
, duration
, transition
);
1117 static HRESULT WINAPI
tr_library_CreateCubicTransition(IUIAnimationTransitionLibrary
*iface
, double duration
,
1118 double finalValue
, double finalVelocity
, IUIAnimationTransition
**transition
)
1120 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1121 FIXME( "stub (%p)->(%f, %f, %f, %p)\n", This
, duration
, finalValue
, finalVelocity
, transition
);
1125 static HRESULT WINAPI
tr_library_CreateSmoothStopTransition(IUIAnimationTransitionLibrary
*iface
,
1126 double maximumDuration
, double finalValue
, IUIAnimationTransition
**transition
)
1128 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1129 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, maximumDuration
, finalValue
, transition
);
1133 static HRESULT WINAPI
tr_library_CreateParabolicTransitionFromAcceleration(IUIAnimationTransitionLibrary
*iface
,
1134 double finalValue
, double finalVelocity
, double acceleration
, IUIAnimationTransition
**transition
)
1136 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1137 FIXME( "stub (%p)->( )\n", This
);
1141 const struct IUIAnimationTransitionLibraryVtbl tr_library_vtbl
=
1143 tr_library_QueryInterface
,
1146 tr_library_CreateInstantaneousTransition
,
1147 tr_library_CreateConstantTransition
,
1148 tr_library_CreateDiscreteTransition
,
1149 tr_library_CreateLinearTransition
,
1150 tr_library_CreateLinearTransitionFromSpeed
,
1151 tr_library_CreateSinusoidalTransitionFromVelocity
,
1152 tr_library_CreateSinusoidalTransitionFromRange
,
1153 tr_library_CreateAccelerateDecelerateTransition
,
1154 tr_library_CreateReversalTransition
,
1155 tr_library_CreateCubicTransition
,
1156 tr_library_CreateSmoothStopTransition
,
1157 tr_library_CreateParabolicTransitionFromAcceleration
,
1160 static HRESULT
library_create( IUnknown
*outer
, REFIID iid
, void **obj
)
1162 struct tr_library
*This
= heap_alloc( sizeof(*This
) );
1165 if (!This
) return E_OUTOFMEMORY
;
1166 This
->IUIAnimationTransitionLibrary_iface
.lpVtbl
= &tr_library_vtbl
;
1169 hr
= IUIAnimationTransitionLibrary_QueryInterface( &This
->IUIAnimationTransitionLibrary_iface
, iid
, obj
);
1171 IUIAnimationTransitionLibrary_Release( &This
->IUIAnimationTransitionLibrary_iface
);
1175 static struct class_factory manager_cf
= { { &class_factory_vtbl
}, manager_create
};
1176 static struct class_factory timer_cf
= { { &class_factory_vtbl
}, timer_create
};
1177 static struct class_factory transition_cf
= { { &class_factory_vtbl
}, transition_create
};
1178 static struct class_factory library_cf
= { { &class_factory_vtbl
}, library_create
};
1180 /******************************************************************
1183 HRESULT WINAPI
DllGetClassObject( REFCLSID clsid
, REFIID iid
, void **obj
)
1185 IClassFactory
*cf
= NULL
;
1187 TRACE( "(%s %s %p)\n", debugstr_guid( clsid
), debugstr_guid( iid
), obj
);
1189 if (IsEqualCLSID( clsid
, &CLSID_UIAnimationManager
))
1190 cf
= &manager_cf
.IClassFactory_iface
;
1191 else if (IsEqualCLSID( clsid
, &CLSID_UIAnimationTimer
))
1192 cf
= &timer_cf
.IClassFactory_iface
;
1193 else if (IsEqualCLSID( clsid
, &CLSID_UIAnimationTransitionFactory
))
1194 cf
= &transition_cf
.IClassFactory_iface
;
1195 else if (IsEqualCLSID( clsid
, &CLSID_UIAnimationTransitionLibrary
))
1196 cf
= &library_cf
.IClassFactory_iface
;
1199 return CLASS_E_CLASSNOTAVAILABLE
;
1201 return IClassFactory_QueryInterface( cf
, iid
, obj
);
1204 /******************************************************************
1207 HRESULT WINAPI
DllCanUnloadNow( void )
1213 /***********************************************************************
1216 HRESULT WINAPI
DllRegisterServer( void )
1218 return __wine_register_resources( hinstance
);
1221 /***********************************************************************
1222 * DllUnregisterServer
1224 HRESULT WINAPI
DllUnregisterServer( void )
1226 return __wine_unregister_resources( hinstance
);