regenerated
[moon.git] / src / easing.h
bloba8adc159f1752158445e1943dcc8b8021d6a422e
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 /*
4 * Contact:
5 * Moonlight List (moonlight-list@lists.ximian.com)
7 * Copyright 2007 Novell, Inc. (http://www.novell.com)
9 * See the LICENSE file included with the distribution for details.
12 #ifndef __MOON_EASING_H__
13 #define __MOON_EASING_H__
15 #include "dependencyobject.h"
16 #include "enums.h"
18 /* @CBindingRequisite */
19 typedef double (*EasingFunction) (double normalizedTime);
21 /* @Namespace=System.Windows.Media.Animation */
22 /* @CallInitialize */
23 class EasingFunctionBase : public DependencyObject {
24 public:
25 /* @GenerateCBinding,GeneratePInvoke */
26 EasingFunctionBase ();
28 /* @PropertyType=EasingMode,DefaultValue=EasingModeOut,GenerateAccessors */
29 const static int EasingModeProperty;
31 double Ease (double normalizedTime);
32 virtual double EaseInCore (double normalizedTime) { return normalizedTime; }
34 EasingMode GetEasingMode ();
35 void SetEasingMode (EasingMode easingMode);
37 /* @GenerateCBinding,GeneratePInvoke */
38 void SetEasingFunction (EasingFunction value);
40 protected:
41 virtual ~EasingFunctionBase ();
43 private:
44 EasingFunction easing_function_callback;
47 /* @Namespace=System.Windows.Media.Animation */
48 class BackEase : public EasingFunctionBase
50 public:
51 /* @GenerateCBinding,GeneratePInvoke */
52 BackEase ();
54 /* @PropertyType=double,DefaultValue=1.0,GenerateAccessors */
55 const static int AmplitudeProperty;
57 /* @GenerateCBinding,GeneratePInvoke */
58 virtual double EaseInCore (double normalizedTime);
60 double GetAmplitude ();
61 void SetAmplitude (double value);
63 protected:
64 virtual ~BackEase();
67 /* @Namespace=System.Windows.Media.Animation */
68 class BounceEase : public EasingFunctionBase
70 public:
71 /* @GenerateCBinding,GeneratePInvoke */
72 BounceEase ();
74 /* @PropertyType=gint32,DefaultValue=3,GenerateAccessors */
75 const static int BouncesProperty;
76 /* @PropertyType=double,DefaultValue=2.0,GenerateAccessors */
77 const static int BouncinessProperty;
79 /* @GenerateCBinding,GeneratePInvoke */
80 virtual double EaseInCore (double normalizedTime);
82 int GetBounces ();
83 void SetBounces (int value);
85 double GetBounciness ();
86 void SetBounciness (double value);
88 protected:
89 virtual ~BounceEase();
92 /* @Namespace=System.Windows.Media.Animation */
93 class CircleEase : public EasingFunctionBase
95 public:
96 /* @GenerateCBinding,GeneratePInvoke */
97 CircleEase ();
99 /* @GenerateCBinding,GeneratePInvoke */
100 virtual double EaseInCore (double normalizedTime);
102 protected:
103 virtual ~CircleEase ();
106 /* @Namespace=System.Windows.Media.Animation */
107 class CubicEase : public EasingFunctionBase
109 public:
110 /* @GenerateCBinding,GeneratePInvoke */
111 CubicEase ();
113 /* @GenerateCBinding,GeneratePInvoke */
114 virtual double EaseInCore (double normalizedTime);
116 protected:
117 virtual ~CubicEase ();
120 /* @Namespace=System.Windows.Media.Animation */
121 class ElasticEase : public EasingFunctionBase
123 public:
124 /* @GenerateCBinding,GeneratePInvoke */
125 ElasticEase ();
127 /* @PropertyType=gint32,DefaultValue=3,GenerateAccessors */
128 const static int OscillationsProperty;
129 /* @PropertyType=double,DefaultValue=3.0,GenerateAccessors */
130 const static int SpringinessProperty;
132 /* @GenerateCBinding,GeneratePInvoke */
133 virtual double EaseInCore (double normalizedTime);
135 int GetOscillations ();
136 void SetOscillations (int value);
138 double GetSpringiness ();
139 void SetSpringiness (double value);
141 protected:
142 virtual ~ElasticEase();
145 /* @Namespace=System.Windows.Media.Animation */
146 class ExponentialEase : public EasingFunctionBase
148 public:
149 /* @GenerateCBinding,GeneratePInvoke */
150 ExponentialEase ();
152 /* @PropertyType=double,DefaultValue=2.0,GenerateAccessors */
153 const static int ExponentProperty;
155 /* @GenerateCBinding,GeneratePInvoke */
156 virtual double EaseInCore (double normalizedTime);
158 double GetExponent ();
159 void SetExponent (double value);
161 protected:
162 virtual ~ExponentialEase();
165 /* @Namespace=System.Windows.Media.Animation */
166 class PowerEase : public EasingFunctionBase
168 public:
169 /* @GenerateCBinding,GeneratePInvoke */
170 PowerEase ();
172 /* @PropertyType=double,DefaultValue=2.0,GenerateAccessors */
173 const static int PowerProperty;
175 /* @GenerateCBinding,GeneratePInvoke */
176 virtual double EaseInCore (double normalizedTime);
178 double GetPower ();
179 void SetPower (double value);
181 protected:
182 virtual ~PowerEase();
185 /* @Namespace=System.Windows.Media.Animation */
186 class QuadraticEase : public EasingFunctionBase
188 public:
189 /* @GenerateCBinding,GeneratePInvoke */
190 QuadraticEase ();
192 /* @GenerateCBinding,GeneratePInvoke */
193 virtual double EaseInCore (double normalizedTime);
195 protected:
196 virtual ~QuadraticEase ();
199 /* @Namespace=System.Windows.Media.Animation */
200 class QuarticEase : public EasingFunctionBase
202 public:
203 /* @GenerateCBinding,GeneratePInvoke */
204 QuarticEase ();
206 /* @GenerateCBinding,GeneratePInvoke */
207 virtual double EaseInCore (double normalizedTime);
209 protected:
210 virtual ~QuarticEase ();
213 /* @Namespace=System.Windows.Media.Animation */
214 class QuinticEase : public EasingFunctionBase
216 public:
217 /* @GenerateCBinding,GeneratePInvoke */
218 QuinticEase ();
220 /* @GenerateCBinding,GeneratePInvoke */
221 virtual double EaseInCore (double normalizedTime);
223 protected:
224 virtual ~QuinticEase ();
227 /* @Namespace=System.Windows.Media.Animation */
228 class SineEase : public EasingFunctionBase
230 public:
231 /* @GenerateCBinding,GeneratePInvoke */
232 SineEase ();
234 /* @GenerateCBinding,GeneratePInvoke */
235 virtual double EaseInCore (double normalizedTime);
237 protected:
238 virtual ~SineEase ();
241 #endif /* __MOON_EASING_H__ */