msvcp: Remove typos in mangled names.
[wine.git] / include / uianimation.idl
blob70c710cdf898e004e7fda9313184ac046cbeb1ab
1 /*
2 * Copyright 2017 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 import "wtypes.idl";
19 import "unknwn.idl";
21 interface IUIAnimationStoryboard;
22 interface IUIAnimationVariable;
23 interface IUIAnimationManager;
24 interface IUIAnimationPriorityComparison;
25 interface IUIAnimationTransitionFactory;
26 interface IUIAnimationInterpolator;
27 interface IUIAnimationManagerEventHandler;
28 interface IUIAnimationTransition;
29 interface IUIAnimationTransitionLibrary;
31 typedef DOUBLE UI_ANIMATION_SECONDS;
32 typedef struct { int _; } *UI_ANIMATION_KEYFRAME;
33 const UI_ANIMATION_KEYFRAME UI_ANIMATION_KEYFRAME_STORYBOARD_START = (UI_ANIMATION_KEYFRAME)(-1);
35 const UI_ANIMATION_SECONDS UI_ANIMATION_SECONDS_EVENTUALLY = -1.0;
37 typedef enum
39 UI_ANIMATION_MANAGER_IDLE,
40 UI_ANIMATION_MANAGER_BUSY
41 } UI_ANIMATION_MANAGER_STATUS;
43 typedef enum
45 UI_ANIMATION_ROUNDING_NEAREST,
46 UI_ANIMATION_ROUNDING_FLOOR,
47 UI_ANIMATION_ROUNDING_CEILING
48 } UI_ANIMATION_ROUNDING_MODE;
50 typedef enum
52 UI_ANIMATION_SCHEDULING_UNEXPECTED_FAILURE,
53 UI_ANIMATION_SCHEDULING_INSUFFICIENT_PRIORITY,
54 UI_ANIMATION_SCHEDULING_ALREADY_SCHEDULED,
55 UI_ANIMATION_SCHEDULING_SUCCEEDED,
56 UI_ANIMATION_SCHEDULING_DEFERRED
57 } UI_ANIMATION_SCHEDULING_RESULT;
59 typedef enum
61 UI_ANIMATION_STORYBOARD_BUILDING,
62 UI_ANIMATION_STORYBOARD_SCHEDULED,
63 UI_ANIMATION_STORYBOARD_CANCELLED,
64 UI_ANIMATION_STORYBOARD_PLAYING,
65 UI_ANIMATION_STORYBOARD_TRUNCATED,
66 UI_ANIMATION_STORYBOARD_FINISHED,
67 UI_ANIMATION_STORYBOARD_READY,
68 UI_ANIMATION_STORYBOARD_INSUFFICIENT_PRIORITY
69 } UI_ANIMATION_STORYBOARD_STATUS;
71 typedef enum
73 UI_ANIMATION_UPDATE_NO_CHANGE,
74 UI_ANIMATION_UPDATE_VARIABLES_CHANGED,
75 } UI_ANIMATION_UPDATE_RESULT;
77 typedef enum
79 UI_ANIMATION_TIMER_CLIENT_IDLE,
80 UI_ANIMATION_TIMER_CLIENT_BUSY,
81 } UI_ANIMATION_TIMER_CLIENT_STATUS;
83 typedef enum
85 UI_ANIMATION_IDLE_BEHAVIOR_CONTINUE,
86 UI_ANIMATION_IDLE_BEHAVIOR_DISABLE,
87 } UI_ANIMATION_IDLE_BEHAVIOR;
89 typedef [v1_enum] enum
91 UI_ANIMATION_MODE_DISABLED,
92 UI_ANIMATION_MODE_SYSTEM_DEFAULT,
93 UI_ANIMATION_MODE_ENABLED
94 } UI_ANIMATION_MODE;
96 typedef [v1_enum] enum
98 UI_ANIMATION_PRIORITY_EFFECT_FAILURE,
99 UI_ANIMATION_PRIORITY_EFFECT_DELAY
100 } UI_ANIMATION_PRIORITY_EFFECT;
102 typedef [v1_enum] enum
104 UI_ANIMATION_DEPENDENCY_NONE = 0,
105 UI_ANIMATION_DEPENDENCY_INTERMEDIATE_VALUES = 0x1,
106 UI_ANIMATION_DEPENDENCY_FINAL_VALUE = 0x2,
107 UI_ANIMATION_DEPENDENCY_FINAL_VELOCITY = 0x4,
108 UI_ANIMATION_DEPENDENCY_DURATION = 0x8
109 } UI_ANIMATION_DEPENDENCIES;
111 typedef [v1_enum] enum
113 UI_ANIMATION_SLOPE_INCREASING,
114 UI_ANIMATION_SLOPE_DECREASING
115 } UI_ANIMATION_SLOPE;
118 local,
119 object,
120 uuid(783321ed-78a3-4366-b574-6af607a64788),
121 pointer_default(unique)
123 interface IUIAnimationManagerEventHandler : IUnknown
125 HRESULT OnManagerStatusChanged (
126 [in] UI_ANIMATION_MANAGER_STATUS status,
127 [in] UI_ANIMATION_MANAGER_STATUS prev_status);
131 local,
132 object,
133 uuid(6358b7ba-87d2-42d5-bf71-82e919dd5862),
134 pointer_default(unique)
136 interface IUIAnimationVariableChangeHandler : IUnknown
138 HRESULT OnValueChanged (
139 [in] IUIAnimationStoryboard *storyboard,
140 [in] IUIAnimationVariable *variable,
141 [in] DOUBLE value,
142 [in] DOUBLE prev_value);
146 local,
147 object,
148 uuid(bb3e1550-356e-44b0-99da-85ac6017865e),
149 pointer_default(unique)
151 interface IUIAnimationVariableIntegerChangeHandler : IUnknown
153 HRESULT OnIntegerValueChanged (
154 [in] IUIAnimationStoryboard *storyboard,
155 [in] IUIAnimationVariable *variable,
156 [in] INT32 value,
157 [in] INT32 prev_value);
161 local,
162 object,
163 uuid(3d5c9008-ec7c-4364-9f8a-9af3c58cbae6),
164 pointer_default(unique)
166 interface IUIAnimationStoryboardEventHandler : IUnknown
168 HRESULT OnStoryboardStatusChanged (
169 [in] IUIAnimationStoryboard *storyboard,
170 [in] UI_ANIMATION_STORYBOARD_STATUS status,
171 [in] UI_ANIMATION_STORYBOARD_STATUS prev_status);
173 HRESULT OnStoryboardUpdated ([in] IUIAnimationStoryboard *storyboard);
177 local,
178 object,
179 uuid(dc6ce252-f731-41cf-b610-614b6ca049ad),
180 pointer_default(unique)
182 interface IUIAnimationTransition : IUnknown
184 HRESULT SetInitialValue ([in] DOUBLE value);
186 HRESULT SetInitialVelocity ([in] DOUBLE velocity);
188 HRESULT IsDurationKnown ();
190 HRESULT GetDuration ([out, retval] UI_ANIMATION_SECONDS *duration);
194 local,
195 object,
196 uuid(8ceeb155-2849-4ce5-9448-91ff70e1e4d9),
197 pointer_default(unique)
199 interface IUIAnimationVariable : IUnknown
201 HRESULT GetValue ([out, retval] DOUBLE *value);
203 HRESULT GetFinalValue ([out, retval] DOUBLE *value);
205 HRESULT GetPreviousValue ([out, retval] DOUBLE *value);
207 HRESULT GetIntegerValue ([out, retval] INT32 *value);
209 HRESULT GetFinalIntegerValue ([out, retval] INT32 *value);
211 HRESULT GetPreviousIntegerValue ([out, retval] INT32 *value);
213 HRESULT GetCurrentStoryboard ([out, retval] IUIAnimationStoryboard **storyboard);
215 HRESULT SetLowerBound ([in] DOUBLE bound);
217 HRESULT SetUpperBound ([in] DOUBLE bound);
219 HRESULT SetRoundingMode ([in] UI_ANIMATION_ROUNDING_MODE mode);
221 HRESULT SetTag (
222 [in] IUnknown *object,
223 [in] UINT32 id);
225 HRESULT GetTag (
226 [out] IUnknown **object,
227 [out] UINT32 *id);
229 HRESULT SetVariableChangeHandler ([in, unique] IUIAnimationVariableChangeHandler *handler);
231 HRESULT SetVariableIntegerChangeHandler ([in, unique] IUIAnimationVariableIntegerChangeHandler *handler);
235 local,
236 object,
237 uuid(a8ff128f-9bf9-4af1-9e67-e5e410defb84),
238 pointer_default(unique)
240 interface IUIAnimationStoryboard : IUnknown
242 HRESULT AddTransition (
243 [in] IUIAnimationVariable *variable,
244 [in] IUIAnimationTransition *transition);
246 HRESULT AddKeyframeAtOffset (
247 [in] UI_ANIMATION_KEYFRAME existingframe,
248 [in] UI_ANIMATION_SECONDS offset,
249 [out, retval] UI_ANIMATION_KEYFRAME *keyframe);
251 HRESULT AddKeyframeAfterTransition (
252 [in] IUIAnimationTransition *transition,
253 [out, retval] UI_ANIMATION_KEYFRAME *keyframe);
255 HRESULT AddTransitionAtKeyframe (
256 [in] IUIAnimationVariable *variable,
257 [in] IUIAnimationTransition *transition,
258 [in] UI_ANIMATION_KEYFRAME start_key);
260 HRESULT AddTransitionBetweenKeyframes (
261 [in] IUIAnimationVariable *variable,
262 [in] IUIAnimationTransition *transition,
263 [in] UI_ANIMATION_KEYFRAME start_key,
264 [in] UI_ANIMATION_KEYFRAME end_key);
266 HRESULT RepeatBetweenKeyframes (
267 [in] UI_ANIMATION_KEYFRAME start_key,
268 [in] UI_ANIMATION_KEYFRAME end_key,
269 [in] INT32 count);
271 HRESULT HoldVariable ([in] IUIAnimationVariable *variable);
273 HRESULT SetLongestAcceptableDelay ([in] UI_ANIMATION_SECONDS delay);
275 HRESULT Schedule (
276 [in] UI_ANIMATION_SECONDS now,
277 [out, defaultvalue(0)] UI_ANIMATION_SCHEDULING_RESULT *result);
279 HRESULT Conclude ();
281 HRESULT Finish ([in] UI_ANIMATION_SECONDS deadline);
283 HRESULT Abandon ();
285 HRESULT SetTag(
286 [in, unique] IUnknown *object,
287 [in] UINT32 id);
289 HRESULT GetTag (
290 [out] IUnknown **object,
291 [out] UINT32 *id);
293 HRESULT GetStatus ([out, retval] UI_ANIMATION_STORYBOARD_STATUS *status);
295 HRESULT GetElapsedTime ([out] UI_ANIMATION_SECONDS *elapsed);
297 HRESULT SetStoryboardEventHandler ([in, unique] IUIAnimationStoryboardEventHandler *handler);
301 local,
302 object,
303 uuid(bedb4db6-94fa-4bfb-a47f-ef2d9e408c25),
304 pointer_default(unique)
306 interface IUIAnimationTimerClientEventHandler : IUnknown
308 HRESULT OnTimerClientStatusChanged (
309 [in] UI_ANIMATION_TIMER_CLIENT_STATUS new_status,
310 [in] UI_ANIMATION_TIMER_CLIENT_STATUS previous_status);
314 local,
315 object,
316 uuid(195509b7-5d5e-4e3e-b278-ee3759b367ad),
317 pointer_default(unique)
319 interface IUIAnimationTimerUpdateHandler : IUnknown
321 HRESULT OnUpdate (
322 [in] UI_ANIMATION_SECONDS now,
323 [out, retval] UI_ANIMATION_UPDATE_RESULT *result);
325 HRESULT SetTimerClientEventHandler (
326 [in] IUIAnimationTimerClientEventHandler *handler);
328 HRESULT ClearTimerClientEventHandler ();
332 local,
333 object,
334 uuid(274a7dea-d771-4095-abbd-8df7abd23ce3),
335 pointer_default(unique)
337 interface IUIAnimationTimerEventHandler : IUnknown
339 HRESULT OnPreUpdate ();
341 HRESULT OnPostUpdate ();
343 HRESULT OnRenderingTooSlow (
344 [in] UINT32 fps);
348 local,
349 object,
350 uuid(6b0efad1-a053-41d6-9085-33a689144665),
351 pointer_default(unique)
353 interface IUIAnimationTimer : IUnknown
355 HRESULT SetTimerUpdateHandler (
356 [in, unique] IUIAnimationTimerUpdateHandler *handler,
357 [in] UI_ANIMATION_IDLE_BEHAVIOR idlebehavior);
359 HRESULT SetTimerEventHandler (
360 [in, unique] IUIAnimationTimerEventHandler *handler);
362 HRESULT Enable ();
364 HRESULT Disable ();
366 HRESULT IsEnabled ();
368 HRESULT GetTime (
369 [out] UI_ANIMATION_SECONDS *time);
371 HRESULT SetFrameRateThreshold (
372 [in] UINT32 fps);
376 local,
377 object,
378 uuid(9169896c-ac8d-4e7d-94e5-67fa4dc2f2e8),
379 pointer_default(unique)
381 interface IUIAnimationManager : IUnknown
383 HRESULT CreateAnimationVariable(
384 [in] UI_ANIMATION_SECONDS initialvalue,
385 [out, retval] IUIAnimationVariable **variable);
387 HRESULT ScheduleTransition(
388 [in] IUIAnimationVariable *variable,
389 [in] IUIAnimationTransition *transition,
390 [in] UI_ANIMATION_SECONDS timenow);
392 HRESULT CreateStoryboard(
393 [out, retval] IUIAnimationStoryboard **storyboard);
395 HRESULT FinishAllStoryboards(
396 [in] UI_ANIMATION_SECONDS deadline);
398 HRESULT AbandonAllStoryboards();
400 HRESULT Update(
401 [in] UI_ANIMATION_SECONDS timenow,
402 [out, defaultvalue(0)] UI_ANIMATION_UPDATE_RESULT *updateresult);
404 HRESULT GetVariableFromTag(
405 [in] IUnknown * object,
406 [in] UINT32 id,
407 [out, retval] IUIAnimationVariable **variable);
409 HRESULT GetStoryboardFromTag(
410 [in] IUnknown * object,
411 [in] UINT32 id,
412 [out, retval] IUIAnimationStoryboard **storyboard);
414 HRESULT GetStatus(
415 [out, retval] UI_ANIMATION_MANAGER_STATUS *status);
417 HRESULT SetAnimationMode(
418 [in] UI_ANIMATION_MODE mode);
420 HRESULT Pause();
422 HRESULT Resume();
424 HRESULT SetManagerEventHandler(
425 [in] IUIAnimationManagerEventHandler *handler);
427 HRESULT SetCancelPriorityComparison(
428 [in] IUIAnimationPriorityComparison *comparison);
430 HRESULT SetTrimPriorityComparison(
431 [in] IUIAnimationPriorityComparison *comparison);
433 HRESULT SetCompressPriorityComparison(
434 [in] IUIAnimationPriorityComparison *comparison);
436 HRESULT SetConcludePriorityComparison(
437 [in] IUIAnimationPriorityComparison *comparison);
439 HRESULT SetDefaultLongestAcceptableDelay(
440 [in] UI_ANIMATION_SECONDS delay);
442 HRESULT Shutdown();
446 local,
447 object,
448 uuid(83fa9b74-5f86-4618-bc6a-a2fac19b3f44),
449 pointer_default(unique)
451 interface IUIAnimationPriorityComparison : IUnknown
453 HRESULT HasPriority(
454 [in] IUIAnimationStoryboard *scheduledboard,
455 [in] IUIAnimationStoryboard *newboard,
456 [in] UI_ANIMATION_PRIORITY_EFFECT effect);
460 local,
461 object,
462 uuid(fcd91e03-3e3b-45ad-bbb1-6dfc8153743d),
463 pointer_default(unique)
465 interface IUIAnimationTransitionFactory : IUnknown
467 HRESULT CreateTransition(
468 [in] IUIAnimationInterpolator *interpolator,
469 [out, retval] IUIAnimationTransition **transition);
473 local,
474 object,
475 uuid(7815cbba-ddf7-478c-a46c-7b6c738b7978),
476 pointer_default(unique)
478 interface IUIAnimationInterpolator : IUnknown
480 HRESULT SetInitialValueAndVelocity(
481 [in] double initialvalue,
482 [in] double initialvelocity);
484 HRESULT SetDuration(
485 [in] UI_ANIMATION_SECONDS duration);
487 HRESULT GetDuration(
488 [out, retval] UI_ANIMATION_SECONDS *duration);
490 HRESULT GetFinalValue(
491 [out, retval] double *value);
493 HRESULT InterpolateValue(
494 [in] UI_ANIMATION_SECONDS offset,
495 [out, retval] double *value);
497 HRESULT InterpolateVelocity(
498 [in] UI_ANIMATION_SECONDS offset,
499 [out, retval] double *velocity);
501 HRESULT GetDependencies(
502 [out] UI_ANIMATION_DEPENDENCIES *initialvaluedependencies,
503 [out] UI_ANIMATION_DEPENDENCIES *initialvelocitydependencies,
504 [out] UI_ANIMATION_DEPENDENCIES *durationdependencies);
508 local,
509 object,
510 uuid(ca5a14b1-d24f-48b8-8fe4-c78169ba954e),
511 pointer_default(unique)
513 interface IUIAnimationTransitionLibrary : IUnknown
515 HRESULT CreateInstantaneousTransition(
516 [in] double finalvalue,
517 [out, retval] IUIAnimationTransition **transition);
519 HRESULT CreateConstantTransition(
520 [in] UI_ANIMATION_SECONDS duration,
521 [out, retval] IUIAnimationTransition **transition);
523 HRESULT CreateDiscreteTransition(
524 [in] UI_ANIMATION_SECONDS delay,
525 [in] double finalvalue,
526 [in] UI_ANIMATION_SECONDS hold,
527 [out, retval] IUIAnimationTransition **transition);
529 HRESULT CreateLinearTransition(
530 [in] UI_ANIMATION_SECONDS duration,
531 [in] double finalvalue,
532 [out, retval] IUIAnimationTransition **transition);
534 HRESULT CreateLinearTransitionFromSpeed(
535 [in] double speed,
536 [in] double finalvalue,
537 [out, retval] IUIAnimationTransition **transition);
539 HRESULT CreateSinusoidalTransitionFromVelocity(
540 [in] UI_ANIMATION_SECONDS duration,
541 [in] UI_ANIMATION_SECONDS period,
542 [out, retval] IUIAnimationTransition **transition);
544 HRESULT CreateSinusoidalTransitionFromRange(
545 [in] UI_ANIMATION_SECONDS duration,
546 [in] double minimumvalue,
547 [in] double maximumvalue,
548 [in] UI_ANIMATION_SECONDS period,
549 [in] UI_ANIMATION_SLOPE slope,
550 [out, retval] IUIAnimationTransition **transition);
552 HRESULT CreateAccelerateDecelerateTransition(
553 [in] UI_ANIMATION_SECONDS duration,
554 [in] double finalvalue,
555 [in] double accelerationratio,
556 [in] double decelerationratio,
557 [out, retval] IUIAnimationTransition **transition);
559 HRESULT CreateReversalTransition(
560 [in] UI_ANIMATION_SECONDS duration,
561 [out, retval] IUIAnimationTransition **transition);
563 HRESULT CreateCubicTransition(
564 [in] UI_ANIMATION_SECONDS duration,
565 [in] double finalvalue,
566 [in] double finalvelocity,
567 [out, retval] IUIAnimationTransition **transition);
569 HRESULT CreateSmoothStopTransition(
570 [in] UI_ANIMATION_SECONDS maximumduration,
571 [in] double finalvalue,
572 [out, retval] IUIAnimationTransition **transition);
574 HRESULT CreateParabolicTransitionFromAcceleration(
575 [in] UI_ANIMATION_SECONDS finalvalue,
576 [in] double finalvelocity,
577 [in] double acceleration,
578 [out, retval] IUIAnimationTransition **transition);
582 uuid(44ca24db-1a92-4149-bab5-fb14d64b401e),
583 version(1.0)
585 library UIAnimation
588 uuid(bfcd4a0c-06b6-4384-b768-0daa792c380e),
589 threading(both)
591 coclass UIAnimationTimer
593 [default] interface IUIAnimationTimer;
597 uuid(4c1fc63a-695c-47e8-a339-1a194be3d0b8),
598 threading(both)
600 coclass UIAnimationManager
602 [default] interface IUIAnimationManager;
606 uuid(8a9b1cdd-fcd7-419c-8b44-42fd17db1887),
607 threading(both)
609 coclass UIAnimationTransitionFactory
611 [default] interface IUIAnimationTransitionFactory;
615 uuid(1d6322ad-aa85-4ef5-a828-86d71067d145),
616 threading(both)
618 coclass UIAnimationTransitionLibrary
620 [default] interface IUIAnimationTransitionLibrary;