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_PROCESS_ATTACH
:
49 DisableThreadLibraryCalls( dll
);
57 IClassFactory IClassFactory_iface
;
58 HRESULT (*create_instance
)(IUnknown
*, REFIID
, void **);
61 static inline struct class_factory
*impl_from_IClassFactory( IClassFactory
*iface
)
63 return CONTAINING_RECORD( iface
, struct class_factory
, IClassFactory_iface
);
66 static HRESULT WINAPI
class_factory_QueryInterface( IClassFactory
*iface
, REFIID iid
, void **obj
)
68 if (IsEqualIID( iid
, &IID_IUnknown
) ||
69 IsEqualIID( iid
, &IID_IClassFactory
))
71 IClassFactory_AddRef( iface
);
76 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
81 static ULONG WINAPI
class_factory_AddRef( IClassFactory
*iface
)
86 static ULONG WINAPI
class_factory_Release( IClassFactory
*iface
)
91 static HRESULT WINAPI
class_factory_CreateInstance( IClassFactory
*iface
,
92 IUnknown
*outer
, REFIID iid
,
95 struct class_factory
*This
= impl_from_IClassFactory( iface
);
97 TRACE( "%p %s %p\n", outer
, debugstr_guid( iid
), obj
);
100 return This
->create_instance( outer
, iid
, obj
);
103 static HRESULT WINAPI
class_factory_LockServer( IClassFactory
*iface
,
106 FIXME( "%d: stub!\n", lock
);
110 static const struct IClassFactoryVtbl class_factory_vtbl
=
112 class_factory_QueryInterface
,
113 class_factory_AddRef
,
114 class_factory_Release
,
115 class_factory_CreateInstance
,
116 class_factory_LockServer
119 /***********************************************************************
120 * IUIAnimationStoryboard
122 struct animation_storyboard
124 IUIAnimationStoryboard IUIAnimationStoryboard_iface
;
128 struct animation_storyboard
*impl_from_IUIAnimationStoryboard( IUIAnimationStoryboard
*iface
)
130 return CONTAINING_RECORD( iface
, struct animation_storyboard
, IUIAnimationStoryboard_iface
);
133 static HRESULT WINAPI
animation_storyboard_QueryInterface( IUIAnimationStoryboard
*iface
,
134 REFIID iid
, void **obj
)
136 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
138 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
140 if (IsEqualIID( iid
, &IID_IUnknown
) ||
141 IsEqualIID( iid
, &IID_IUIAnimationStoryboard
))
143 IUIAnimationStoryboard_AddRef( iface
);
148 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
150 return E_NOINTERFACE
;
153 static ULONG WINAPI
animation_storyboard_AddRef( IUIAnimationStoryboard
*iface
)
155 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
156 ULONG ref
= InterlockedIncrement( &This
->ref
);
158 TRACE( "(%p) ref = %u\n", This
, ref
);
162 static ULONG WINAPI
animation_storyboard_Release( IUIAnimationStoryboard
*iface
)
164 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
165 ULONG ref
= InterlockedDecrement(&This
->ref
);
167 TRACE( "(%p) ref = %u\n", This
, ref
);
175 static HRESULT WINAPI
animation_storyboard_AddTransition (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
,
176 IUIAnimationTransition
*transition
)
178 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
179 FIXME( "stub (%p)->( )\n", This
);
183 static HRESULT WINAPI
animation_storyboard_AddKeyframeAtOffset (IUIAnimationStoryboard
*iface
, UI_ANIMATION_KEYFRAME existingframe
,
184 UI_ANIMATION_SECONDS offset
, UI_ANIMATION_KEYFRAME
*keyframe
)
186 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
187 FIXME( "stub (%p)->( )\n", This
);
191 static HRESULT WINAPI
animation_storyboard_AddKeyframeAfterTransition (IUIAnimationStoryboard
*iface
,IUIAnimationTransition
*transition
,
192 UI_ANIMATION_KEYFRAME
*keyframe
)
194 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
195 FIXME( "stub (%p)->( )\n", This
);
199 static HRESULT WINAPI
animation_storyboard_AddTransitionAtKeyframe (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
,
200 IUIAnimationTransition
*transition
, UI_ANIMATION_KEYFRAME start_key
)
202 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
203 FIXME( "stub (%p)->( )\n", This
);
207 static HRESULT WINAPI
animation_storyboard_AddTransitionBetweenKeyframes (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
,
208 IUIAnimationTransition
*transition
, UI_ANIMATION_KEYFRAME start_key
, UI_ANIMATION_KEYFRAME end_key
)
210 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
211 FIXME( "stub (%p)->( )\n", This
);
215 static HRESULT WINAPI
animation_storyboard_RepeatBetweenKeyframes (IUIAnimationStoryboard
*iface
, UI_ANIMATION_KEYFRAME start_key
,
216 UI_ANIMATION_KEYFRAME end_key
, INT32 count
)
218 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
219 FIXME( "stub (%p)->( )\n", This
);
223 static HRESULT WINAPI
animation_storyboard_HoldVariable (IUIAnimationStoryboard
*iface
, IUIAnimationVariable
*variable
)
225 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
226 FIXME( "stub (%p)->( )\n", This
);
230 static HRESULT WINAPI
animation_storyboard_SetLongestAcceptableDelay (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS delay
)
232 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
233 FIXME( "stub (%p)->( )\n", This
);
237 static HRESULT WINAPI
animation_storyboard_Schedule (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS now
,
238 UI_ANIMATION_SCHEDULING_RESULT
*result
)
240 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
241 FIXME( "stub (%p)->( )\n", This
);
245 static HRESULT WINAPI
animation_storyboard_Conclude (IUIAnimationStoryboard
*iface
)
247 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
248 FIXME( "stub (%p)->( )\n", This
);
252 static HRESULT WINAPI
animation_storyboard_Finish (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS deadline
)
254 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
255 FIXME( "stub (%p)->( )\n", This
);
259 static HRESULT WINAPI
animation_storyboard_Abandon (IUIAnimationStoryboard
*iface
)
261 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
262 FIXME( "stub (%p)->( )\n", This
);
266 static HRESULT WINAPI
animation_storyboard_SetTag(IUIAnimationStoryboard
*iface
, IUnknown
*object
, UINT32 id
)
268 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
269 FIXME( "stub (%p)->( )\n", This
);
273 static HRESULT WINAPI
animation_storyboard_GetTag (IUIAnimationStoryboard
*iface
, IUnknown
**object
, UINT32
*id
)
275 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
276 FIXME( "stub (%p)->( )\n", This
);
280 static HRESULT WINAPI
animation_storyboard_GetStatus (IUIAnimationStoryboard
*iface
, UI_ANIMATION_STORYBOARD_STATUS
*status
)
282 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
283 FIXME( "stub (%p)->( )\n", This
);
287 static HRESULT WINAPI
animation_storyboard_GetElapsedTime (IUIAnimationStoryboard
*iface
, UI_ANIMATION_SECONDS
*elapsed
)
289 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
290 FIXME( "stub (%p)->( )\n", This
);
294 static HRESULT WINAPI
animation_storyboard_SetStoryboardEventHandler (IUIAnimationStoryboard
*iface
, IUIAnimationStoryboardEventHandler
*handler
)
296 struct animation_storyboard
*This
= impl_from_IUIAnimationStoryboard( iface
);
297 FIXME( "stub (%p)->( )\n", This
);
301 const struct IUIAnimationStoryboardVtbl animation_storyboard_vtbl
=
303 animation_storyboard_QueryInterface
,
304 animation_storyboard_AddRef
,
305 animation_storyboard_Release
,
306 animation_storyboard_AddTransition
,
307 animation_storyboard_AddKeyframeAtOffset
,
308 animation_storyboard_AddKeyframeAfterTransition
,
309 animation_storyboard_AddTransitionAtKeyframe
,
310 animation_storyboard_AddTransitionBetweenKeyframes
,
311 animation_storyboard_RepeatBetweenKeyframes
,
312 animation_storyboard_HoldVariable
,
313 animation_storyboard_SetLongestAcceptableDelay
,
314 animation_storyboard_Schedule
,
315 animation_storyboard_Conclude
,
316 animation_storyboard_Finish
,
317 animation_storyboard_Abandon
,
318 animation_storyboard_SetTag
,
319 animation_storyboard_GetTag
,
320 animation_storyboard_GetStatus
,
321 animation_storyboard_GetElapsedTime
,
322 animation_storyboard_SetStoryboardEventHandler
325 static HRESULT
animation_storyboard_create( IUIAnimationStoryboard
**obj
)
327 struct animation_storyboard
*This
= heap_alloc( sizeof(*This
) );
329 if (!This
) return E_OUTOFMEMORY
;
330 This
->IUIAnimationStoryboard_iface
.lpVtbl
= &animation_storyboard_vtbl
;
333 *obj
= &This
->IUIAnimationStoryboard_iface
;
338 /***********************************************************************
339 * IUIAnimationVariable
343 IUIAnimationVariable IUIAnimationVariable_iface
;
348 struct animation_var
*impl_from_IUIAnimationVariable( IUIAnimationVariable
*iface
)
350 return CONTAINING_RECORD( iface
, struct animation_var
, IUIAnimationVariable_iface
);
353 static HRESULT WINAPI
animation_var_QueryInterface( IUIAnimationVariable
*iface
,
354 REFIID iid
, void **obj
)
356 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
358 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
360 if (IsEqualIID( iid
, &IID_IUnknown
) ||
361 IsEqualIID( iid
, &IID_IUIAnimationVariable
))
363 IUIAnimationVariable_AddRef( iface
);
368 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
370 return E_NOINTERFACE
;
373 static ULONG WINAPI
animation_var_AddRef( IUIAnimationVariable
*iface
)
375 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
376 ULONG ref
= InterlockedIncrement( &This
->ref
);
378 TRACE( "(%p) ref = %u\n", This
, ref
);
382 static ULONG WINAPI
animation_var_Release( IUIAnimationVariable
*iface
)
384 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
385 ULONG ref
= InterlockedDecrement(&This
->ref
);
387 TRACE( "(%p) ref = %u\n", This
, ref
);
395 static HRESULT WINAPI
animation_var_GetValue ( IUIAnimationVariable
*iface
, DOUBLE
*value
)
397 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
398 FIXME( "stub (%p)->( )\n", This
);
402 static HRESULT WINAPI
animation_var_GetFinalValue ( IUIAnimationVariable
*iface
, DOUBLE
*value
)
404 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
405 FIXME( "stub (%p)->( )\n", This
);
409 static HRESULT WINAPI
animation_var_GetPreviousValue ( IUIAnimationVariable
*iface
, DOUBLE
*value
)
411 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
412 FIXME( "stub (%p)->( )\n", This
);
416 static HRESULT WINAPI
animation_var_GetIntegerValue ( IUIAnimationVariable
*iface
, INT32
*value
)
418 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
419 FIXME( "stub (%p)->( )\n", This
);
423 static HRESULT WINAPI
animation_var_GetFinalIntegerValue ( IUIAnimationVariable
*iface
, INT32
*value
)
425 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
426 FIXME( "stub (%p)->( )\n", This
);
430 static HRESULT WINAPI
animation_var_GetPreviousIntegerValue ( IUIAnimationVariable
*iface
, INT32
*value
)
432 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
433 FIXME( "stub (%p)->( )\n", This
);
437 static HRESULT WINAPI
animation_var_GetCurrentStoryboard ( IUIAnimationVariable
*iface
, IUIAnimationStoryboard
**storyboard
)
439 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
440 FIXME( "stub (%p)->( )\n", This
);
444 static HRESULT WINAPI
animation_var_SetLowerBound ( IUIAnimationVariable
*iface
, DOUBLE bound
)
446 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
447 FIXME( "stub (%p)->( )\n", This
);
451 static HRESULT WINAPI
animation_var_SetUpperBound ( IUIAnimationVariable
*iface
, DOUBLE bound
)
453 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
454 FIXME( "stub (%p)->( )\n", This
);
458 static HRESULT WINAPI
animation_var_SetRoundingMode ( IUIAnimationVariable
*iface
,UI_ANIMATION_ROUNDING_MODE mode
)
460 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
461 FIXME( "stub (%p)->( )\n", This
);
465 static HRESULT WINAPI
animation_var_SetTag ( IUIAnimationVariable
*iface
, IUnknown
*object
, UINT32 id
)
467 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
468 FIXME( "stub (%p)->( )\n", This
);
472 static HRESULT WINAPI
animation_var_GetTag ( IUIAnimationVariable
*iface
, IUnknown
**object
, UINT32
*id
)
474 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
475 FIXME( "stub (%p)->( )\n", This
);
479 static HRESULT WINAPI
animation_var_SetVariableChangeHandler ( IUIAnimationVariable
*iface
, IUIAnimationVariableChangeHandler
*handler
)
481 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
482 FIXME( "stub (%p)->( )\n", This
);
486 static HRESULT WINAPI
animation_var_SetVariableIntegerChangeHandler ( IUIAnimationVariable
*iface
,
487 IUIAnimationVariableIntegerChangeHandler
*handler
)
489 struct animation_var
*This
= impl_from_IUIAnimationVariable( iface
);
490 FIXME( "stub (%p)->( )\n", This
);
494 const struct IUIAnimationVariableVtbl animation_var_vtbl
=
496 animation_var_QueryInterface
,
497 animation_var_AddRef
,
498 animation_var_Release
,
499 animation_var_GetValue
,
500 animation_var_GetFinalValue
,
501 animation_var_GetPreviousValue
,
502 animation_var_GetIntegerValue
,
503 animation_var_GetFinalIntegerValue
,
504 animation_var_GetPreviousIntegerValue
,
505 animation_var_GetCurrentStoryboard
,
506 animation_var_SetLowerBound
,
507 animation_var_SetUpperBound
,
508 animation_var_SetRoundingMode
,
509 animation_var_SetTag
,
510 animation_var_GetTag
,
511 animation_var_SetVariableChangeHandler
,
512 animation_var_SetVariableIntegerChangeHandler
,
515 static HRESULT
animation_var_create(DOUBLE initial
, IUIAnimationVariable
**obj
)
517 struct animation_var
*This
= heap_alloc( sizeof(*This
) );
519 if (!This
) return E_OUTOFMEMORY
;
520 This
->IUIAnimationVariable_iface
.lpVtbl
= &animation_var_vtbl
;
522 This
->initial
= initial
;
524 *obj
= &This
->IUIAnimationVariable_iface
;
529 /***********************************************************************
530 * IUIAnimationManager
534 IUIAnimationManager IUIAnimationManager_iface
;
538 struct manager
*impl_from_IUIAnimationManager( IUIAnimationManager
*iface
)
540 return CONTAINING_RECORD( iface
, struct manager
, IUIAnimationManager_iface
);
543 static HRESULT WINAPI
manager_QueryInterface( IUIAnimationManager
*iface
, REFIID iid
, void **obj
)
545 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
547 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
549 if (IsEqualIID( iid
, &IID_IUnknown
) ||
550 IsEqualIID( iid
, &IID_IUIAnimationManager
))
552 IUIAnimationManager_AddRef( iface
);
557 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
559 return E_NOINTERFACE
;
562 static ULONG WINAPI
manager_AddRef( IUIAnimationManager
*iface
)
564 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
565 ULONG ref
= InterlockedIncrement( &This
->ref
);
567 TRACE( "(%p) ref = %u\n", This
, ref
);
571 static ULONG WINAPI
manager_Release( IUIAnimationManager
*iface
)
573 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
574 ULONG ref
= InterlockedDecrement(&This
->ref
);
576 TRACE( "(%p) ref = %u\n", This
, ref
);
586 static HRESULT WINAPI
manager_CreateAnimationVariable( IUIAnimationManager
*iface
, DOUBLE initial_value
, IUIAnimationVariable
**variable
)
588 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
589 TRACE( "(%p)->(%f, %p)\n", This
, initial_value
, variable
);
590 return animation_var_create(initial_value
, variable
);
593 static HRESULT WINAPI
manager_ScheduleTransition( IUIAnimationManager
*iface
, IUIAnimationVariable
*variable
, IUIAnimationTransition
*transition
, UI_ANIMATION_SECONDS current_time
)
595 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
596 FIXME( "stub (%p)->(%p, %p)\n", This
, variable
, transition
);
600 static HRESULT WINAPI
manager_CreateStoryboard( IUIAnimationManager
*iface
, IUIAnimationStoryboard
**storyboard
)
602 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
603 TRACE( "(%p)->(%p)\n", This
, storyboard
);
604 return animation_storyboard_create(storyboard
);
607 static HRESULT WINAPI
manager_FinishAllStoryboards( IUIAnimationManager
*iface
, UI_ANIMATION_SECONDS max_time
)
609 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
610 FIXME( "stub (%p)->(%f)\n", This
, max_time
);
614 static HRESULT WINAPI
manager_AbandonAllStoryboards( IUIAnimationManager
*iface
)
616 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
617 FIXME( "stub (%p)->()\n", This
);
621 static HRESULT WINAPI
manager_Update( IUIAnimationManager
*iface
, UI_ANIMATION_SECONDS cur_time
, UI_ANIMATION_UPDATE_RESULT
*update_result
)
623 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
624 FIXME( "stub (%p)->(%f, %p)\n", This
, cur_time
, update_result
);
626 *update_result
= UI_ANIMATION_UPDATE_VARIABLES_CHANGED
;
630 static HRESULT WINAPI
manager_GetVariableFromTag( IUIAnimationManager
*iface
, IUnknown
*object
, UINT32 id
, IUIAnimationVariable
**variable
)
632 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
633 FIXME( "stub (%p)->(%p, %p)\n", This
, object
, variable
);
637 static HRESULT WINAPI
manager_GetStoryboardFromTag( IUIAnimationManager
*iface
, IUnknown
*object
, UINT32 id
, IUIAnimationStoryboard
**storyboard
)
639 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
640 FIXME( "stub (%p)->(%p, %d, %p)\n", This
, object
, id
, storyboard
);
644 static HRESULT WINAPI
manager_GetStatus( IUIAnimationManager
*iface
, UI_ANIMATION_MANAGER_STATUS
*status
)
646 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
647 FIXME( "stub (%p)->(%p)\n", This
, status
);
651 static HRESULT WINAPI
manager_SetAnimationMode( IUIAnimationManager
*iface
, UI_ANIMATION_MODE mode
)
653 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
654 FIXME( "stub (%p)->(%d)\n", This
, mode
);
658 static HRESULT WINAPI
manager_Pause( IUIAnimationManager
*iface
)
660 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
661 FIXME( "stub (%p)->()\n", This
);
665 static HRESULT WINAPI
manager_Resume( IUIAnimationManager
*iface
)
667 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
668 FIXME( "stub (%p)->()\n", This
);
672 static HRESULT WINAPI
manager_SetManagerEventHandler( IUIAnimationManager
*iface
, IUIAnimationManagerEventHandler
*handler
)
674 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
675 FIXME( "stub (%p)->(%p)\n", This
, handler
);
679 static HRESULT WINAPI
manager_SetCancelPriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
681 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
682 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
686 static HRESULT WINAPI
manager_SetTrimPriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
688 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
689 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
693 static HRESULT WINAPI
manager_SetCompressPriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
695 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
696 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
700 static HRESULT WINAPI
manager_SetConcludePriorityComparison( IUIAnimationManager
*iface
, IUIAnimationPriorityComparison
*comparison
)
702 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
703 FIXME( "stub (%p)->(%p)\n", This
, comparison
);
707 static HRESULT WINAPI
manager_SetDefaultLongestAcceptableDelay( IUIAnimationManager
*iface
, UI_ANIMATION_SECONDS delay
)
709 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
710 FIXME( "stub (%p)->(%f)\n", This
, delay
);
714 static HRESULT WINAPI
manager_Shutdown( IUIAnimationManager
*iface
)
716 struct manager
*This
= impl_from_IUIAnimationManager( iface
);
717 FIXME( "stub (%p)->()\n", This
);
721 const struct IUIAnimationManagerVtbl manager_vtbl
=
723 manager_QueryInterface
,
726 manager_CreateAnimationVariable
,
727 manager_ScheduleTransition
,
728 manager_CreateStoryboard
,
729 manager_FinishAllStoryboards
,
730 manager_AbandonAllStoryboards
,
732 manager_GetVariableFromTag
,
733 manager_GetStoryboardFromTag
,
735 manager_SetAnimationMode
,
738 manager_SetManagerEventHandler
,
739 manager_SetCancelPriorityComparison
,
740 manager_SetTrimPriorityComparison
,
741 manager_SetCompressPriorityComparison
,
742 manager_SetConcludePriorityComparison
,
743 manager_SetDefaultLongestAcceptableDelay
,
747 static HRESULT
manager_create( IUnknown
*outer
, REFIID iid
, void **obj
)
749 struct manager
*This
= heap_alloc( sizeof(*This
) );
752 if (!This
) return E_OUTOFMEMORY
;
753 This
->IUIAnimationManager_iface
.lpVtbl
= &manager_vtbl
;
756 hr
= IUIAnimationManager_QueryInterface( &This
->IUIAnimationManager_iface
, iid
, obj
);
758 IUIAnimationManager_Release( &This
->IUIAnimationManager_iface
);
762 /***********************************************************************
767 IUIAnimationTimer IUIAnimationTimer_iface
;
771 struct timer
*impl_from_IUIAnimationTimer( IUIAnimationTimer
*iface
)
773 return CONTAINING_RECORD( iface
, struct timer
, IUIAnimationTimer_iface
);
776 static HRESULT WINAPI
timer_QueryInterface( IUIAnimationTimer
*iface
, REFIID iid
, void **obj
)
778 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
780 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
782 if (IsEqualIID( iid
, &IID_IUnknown
) ||
783 IsEqualIID( iid
, &IID_IUIAnimationTimer
))
785 IUIAnimationTimer_AddRef( iface
);
790 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
792 return E_NOINTERFACE
;
795 static ULONG WINAPI
timer_AddRef( IUIAnimationTimer
*iface
)
797 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
798 ULONG ref
= InterlockedIncrement( &This
->ref
);
800 TRACE( "(%p) ref = %u\n", This
, ref
);
804 static ULONG WINAPI
timer_Release( IUIAnimationTimer
*iface
)
806 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
807 ULONG ref
= InterlockedDecrement(&This
->ref
);
809 TRACE( "(%p) ref = %u\n", This
, ref
);
817 static HRESULT WINAPI
timer_SetTimerUpdateHandler (IUIAnimationTimer
*iface
,
818 IUIAnimationTimerUpdateHandler
*update_handler
,
819 UI_ANIMATION_IDLE_BEHAVIOR idle_behaviour
)
821 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
822 FIXME( "stub (%p)->(%p, %d)\n", This
, update_handler
, idle_behaviour
);
826 static HRESULT WINAPI
timer_SetTimerEventHandler (IUIAnimationTimer
*iface
,
827 IUIAnimationTimerEventHandler
*handler
)
829 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
830 FIXME( "stub (%p)->()\n", This
);
834 static HRESULT WINAPI
timer_Enable (IUIAnimationTimer
*iface
)
836 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
837 FIXME( "stub (%p)->()\n", This
);
841 static HRESULT WINAPI
timer_Disable (IUIAnimationTimer
*iface
)
843 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
844 FIXME( "stub (%p)->()\n", This
);
848 static HRESULT WINAPI
timer_IsEnabled (IUIAnimationTimer
*iface
)
850 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
851 FIXME( "stub (%p)->()\n", This
);
855 static HRESULT WINAPI
timer_GetTime (IUIAnimationTimer
*iface
, UI_ANIMATION_SECONDS
*seconds
)
857 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
858 FIXME( "stub (%p)->(%p)\n", This
, seconds
);
862 static HRESULT WINAPI
timer_SetFrameRateThreshold (IUIAnimationTimer
*iface
, UINT32 frames_per_sec
)
864 struct timer
*This
= impl_from_IUIAnimationTimer( iface
);
865 FIXME( "stub (%p)->(%d)\n", This
, frames_per_sec
);
869 const struct IUIAnimationTimerVtbl timer_vtbl
=
871 timer_QueryInterface
,
874 timer_SetTimerUpdateHandler
,
875 timer_SetTimerEventHandler
,
880 timer_SetFrameRateThreshold
,
883 static HRESULT
timer_create( IUnknown
*outer
, REFIID iid
, void **obj
)
885 struct timer
*This
= heap_alloc( sizeof(*This
) );
889 return E_OUTOFMEMORY
;
890 This
->IUIAnimationTimer_iface
.lpVtbl
= &timer_vtbl
;
893 hr
= IUIAnimationTimer_QueryInterface( &This
->IUIAnimationTimer_iface
, iid
, obj
);
895 IUIAnimationTimer_Release( &This
->IUIAnimationTimer_iface
);
899 /***********************************************************************
900 * IUIAnimationTransitionFactory
904 IUIAnimationTransitionFactory IUIAnimationTransitionFactory_iface
;
908 struct tr_factory
*impl_from_IUIAnimationTransitionFactory( IUIAnimationTransitionFactory
*iface
)
910 return CONTAINING_RECORD( iface
, struct tr_factory
, IUIAnimationTransitionFactory_iface
);
913 static HRESULT WINAPI
tr_factory_QueryInterface( IUIAnimationTransitionFactory
*iface
, REFIID iid
, void **obj
)
915 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
917 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
919 if (IsEqualIID( iid
, &IID_IUnknown
) ||
920 IsEqualIID( iid
, &IID_IUIAnimationTransitionFactory
))
922 IUIAnimationTransitionFactory_AddRef( iface
);
927 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
929 return E_NOINTERFACE
;
932 static ULONG WINAPI
tr_factory_AddRef( IUIAnimationTransitionFactory
*iface
)
934 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
935 ULONG ref
= InterlockedIncrement( &This
->ref
);
937 TRACE( "(%p) ref = %u\n", This
, ref
);
941 static ULONG WINAPI
tr_factory_Release( IUIAnimationTransitionFactory
*iface
)
943 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
944 ULONG ref
= InterlockedDecrement(&This
->ref
);
946 TRACE( "(%p) ref = %u\n", This
, ref
);
954 static HRESULT WINAPI
tr_factory_CreateTransition(IUIAnimationTransitionFactory
*iface
,
955 IUIAnimationInterpolator
*interpolator
, IUIAnimationTransition
**transition
)
957 struct tr_factory
*This
= impl_from_IUIAnimationTransitionFactory( iface
);
958 FIXME( "stub (%p)->(%p, %p)\n", This
, interpolator
, transition
);
962 const struct IUIAnimationTransitionFactoryVtbl tr_factory_vtbl
=
964 tr_factory_QueryInterface
,
967 tr_factory_CreateTransition
970 static HRESULT
transition_create( IUnknown
*outer
, REFIID iid
, void **obj
)
972 struct tr_factory
*This
= heap_alloc( sizeof(*This
) );
975 if (!This
) return E_OUTOFMEMORY
;
976 This
->IUIAnimationTransitionFactory_iface
.lpVtbl
= &tr_factory_vtbl
;
979 hr
= IUIAnimationTransitionFactory_QueryInterface( &This
->IUIAnimationTransitionFactory_iface
, iid
, obj
);
981 IUIAnimationTransitionFactory_Release( &This
->IUIAnimationTransitionFactory_iface
);
985 /***********************************************************************
986 * IUITransitionLibrary
990 IUIAnimationTransitionLibrary IUIAnimationTransitionLibrary_iface
;
994 struct tr_library
*impl_from_IUIAnimationTransitionLibrary( IUIAnimationTransitionLibrary
*iface
)
996 return CONTAINING_RECORD( iface
, struct tr_library
, IUIAnimationTransitionLibrary_iface
);
999 static HRESULT WINAPI
tr_library_QueryInterface( IUIAnimationTransitionLibrary
*iface
,
1000 REFIID iid
, void **obj
)
1002 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1004 TRACE( "(%p)->(%s %p)\n", This
, debugstr_guid( iid
), obj
);
1006 if (IsEqualIID( iid
, &IID_IUnknown
) ||
1007 IsEqualIID( iid
, &IID_IUIAnimationTransitionLibrary
))
1009 IUIAnimationTransitionLibrary_AddRef( iface
);
1014 FIXME( "interface %s not implemented\n", debugstr_guid( iid
) );
1016 return E_NOINTERFACE
;
1019 static ULONG WINAPI
tr_library_AddRef( IUIAnimationTransitionLibrary
*iface
)
1021 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1022 ULONG ref
= InterlockedIncrement( &This
->ref
);
1024 TRACE( "(%p) ref = %u\n", This
, ref
);
1028 static ULONG WINAPI
tr_library_Release( IUIAnimationTransitionLibrary
*iface
)
1030 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1031 ULONG ref
= InterlockedDecrement(&This
->ref
);
1033 TRACE( "(%p) ref = %u\n", This
, ref
);
1041 static HRESULT WINAPI
tr_library_CreateInstantaneousTransition(IUIAnimationTransitionLibrary
*iface
,
1042 double finalValue
, IUIAnimationTransition
**transition
)
1044 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1045 FIXME( "stub (%p)->(%f, %p)\n", This
, finalValue
, transition
);
1049 static HRESULT WINAPI
tr_library_CreateConstantTransition(IUIAnimationTransitionLibrary
*iface
,
1050 double duration
, IUIAnimationTransition
**transition
)
1052 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1053 FIXME( "stub (%p)->(%f, %p)\n", This
, duration
, transition
);
1057 static HRESULT WINAPI
tr_library_CreateDiscreteTransition(IUIAnimationTransitionLibrary
*iface
,
1058 double delay
, double finalValue
, double hold
, IUIAnimationTransition
**transition
)
1060 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1061 FIXME( "stub (%p)->( )\n", This
);
1065 static HRESULT WINAPI
tr_library_CreateLinearTransition(IUIAnimationTransitionLibrary
*iface
,
1066 double duration
, double finalValue
, IUIAnimationTransition
**transition
)
1068 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1069 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, duration
, finalValue
, transition
);
1073 static HRESULT WINAPI
tr_library_CreateLinearTransitionFromSpeed(IUIAnimationTransitionLibrary
*iface
,
1074 double speed
, double finalValue
, IUIAnimationTransition
**transition
)
1076 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1077 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, speed
, finalValue
, transition
);
1081 static HRESULT WINAPI
tr_library_CreateSinusoidalTransitionFromVelocity(IUIAnimationTransitionLibrary
*iface
,
1082 double duration
, double period
, IUIAnimationTransition
**transition
)
1084 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1085 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, duration
, period
, transition
);
1089 static HRESULT WINAPI
tr_library_CreateSinusoidalTransitionFromRange(IUIAnimationTransitionLibrary
*iface
,
1090 double duration
, double minimumValue
, double maximumValue
, double period
,
1091 UI_ANIMATION_SLOPE slope
, IUIAnimationTransition
**transition
)
1093 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1094 FIXME( "stub (%p)->(%f, %f, %f, %f, %d, %p)\n", This
, duration
, minimumValue
, maximumValue
, period
, slope
, transition
);
1098 static HRESULT WINAPI
tr_library_CreateAccelerateDecelerateTransition(IUIAnimationTransitionLibrary
*iface
,
1099 double duration
, double finalValue
, double accelerationRatio
, double decelerationRatio
,
1100 IUIAnimationTransition
**transition
)
1102 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1103 FIXME( "stub (%p)->(%f, %f, %f, %f, %p)\n", This
, duration
, finalValue
, accelerationRatio
, decelerationRatio
, transition
);
1107 static HRESULT WINAPI
tr_library_CreateReversalTransition(IUIAnimationTransitionLibrary
*iface
, double duration
,
1108 IUIAnimationTransition
**transition
)
1110 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1111 FIXME( "stub (%p)->(%f, %p)\n", This
, duration
, transition
);
1115 static HRESULT WINAPI
tr_library_CreateCubicTransition(IUIAnimationTransitionLibrary
*iface
, double duration
,
1116 double finalValue
, double finalVelocity
, IUIAnimationTransition
**transition
)
1118 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1119 FIXME( "stub (%p)->(%f, %f, %f, %p)\n", This
, duration
, finalValue
, finalVelocity
, transition
);
1123 static HRESULT WINAPI
tr_library_CreateSmoothStopTransition(IUIAnimationTransitionLibrary
*iface
,
1124 double maximumDuration
, double finalValue
, IUIAnimationTransition
**transition
)
1126 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1127 FIXME( "stub (%p)->(%f, %f, %p)\n", This
, maximumDuration
, finalValue
, transition
);
1131 static HRESULT WINAPI
tr_library_CreateParabolicTransitionFromAcceleration(IUIAnimationTransitionLibrary
*iface
,
1132 double finalValue
, double finalVelocity
, double acceleration
, IUIAnimationTransition
**transition
)
1134 struct tr_library
*This
= impl_from_IUIAnimationTransitionLibrary( iface
);
1135 FIXME( "stub (%p)->( )\n", This
);
1139 const struct IUIAnimationTransitionLibraryVtbl tr_library_vtbl
=
1141 tr_library_QueryInterface
,
1144 tr_library_CreateInstantaneousTransition
,
1145 tr_library_CreateConstantTransition
,
1146 tr_library_CreateDiscreteTransition
,
1147 tr_library_CreateLinearTransition
,
1148 tr_library_CreateLinearTransitionFromSpeed
,
1149 tr_library_CreateSinusoidalTransitionFromVelocity
,
1150 tr_library_CreateSinusoidalTransitionFromRange
,
1151 tr_library_CreateAccelerateDecelerateTransition
,
1152 tr_library_CreateReversalTransition
,
1153 tr_library_CreateCubicTransition
,
1154 tr_library_CreateSmoothStopTransition
,
1155 tr_library_CreateParabolicTransitionFromAcceleration
,
1158 static HRESULT
library_create( IUnknown
*outer
, REFIID iid
, void **obj
)
1160 struct tr_library
*This
= heap_alloc( sizeof(*This
) );
1163 if (!This
) return E_OUTOFMEMORY
;
1164 This
->IUIAnimationTransitionLibrary_iface
.lpVtbl
= &tr_library_vtbl
;
1167 hr
= IUIAnimationTransitionLibrary_QueryInterface( &This
->IUIAnimationTransitionLibrary_iface
, iid
, obj
);
1169 IUIAnimationTransitionLibrary_Release( &This
->IUIAnimationTransitionLibrary_iface
);
1173 static struct class_factory manager_cf
= { { &class_factory_vtbl
}, manager_create
};
1174 static struct class_factory timer_cf
= { { &class_factory_vtbl
}, timer_create
};
1175 static struct class_factory transition_cf
= { { &class_factory_vtbl
}, transition_create
};
1176 static struct class_factory library_cf
= { { &class_factory_vtbl
}, library_create
};
1178 /******************************************************************
1181 HRESULT WINAPI
DllGetClassObject( REFCLSID clsid
, REFIID iid
, void **obj
)
1183 IClassFactory
*cf
= NULL
;
1185 TRACE( "(%s %s %p)\n", debugstr_guid( clsid
), debugstr_guid( iid
), obj
);
1187 if (IsEqualCLSID( clsid
, &CLSID_UIAnimationManager
))
1188 cf
= &manager_cf
.IClassFactory_iface
;
1189 else if (IsEqualCLSID( clsid
, &CLSID_UIAnimationTimer
))
1190 cf
= &timer_cf
.IClassFactory_iface
;
1191 else if (IsEqualCLSID( clsid
, &CLSID_UIAnimationTransitionFactory
))
1192 cf
= &transition_cf
.IClassFactory_iface
;
1193 else if (IsEqualCLSID( clsid
, &CLSID_UIAnimationTransitionLibrary
))
1194 cf
= &library_cf
.IClassFactory_iface
;
1197 return CLASS_E_CLASSNOTAVAILABLE
;
1199 return IClassFactory_QueryInterface( cf
, iid
, obj
);
1202 /******************************************************************
1205 HRESULT WINAPI
DllCanUnloadNow( void )
1211 /***********************************************************************
1214 HRESULT WINAPI
DllRegisterServer( void )
1216 return __wine_register_resources( hinstance
);
1219 /***********************************************************************
1220 * DllUnregisterServer
1222 HRESULT WINAPI
DllUnregisterServer( void )
1224 return __wine_unregister_resources( hinstance
);