WebRadioApp  0.1
_EffectsEffect.h
Go to the documentation of this file.
1 /*******************************************************************************
2 *
3 * E M B E D D E D W I Z A R D P R O J E C T
4 *
5 * Copyright (c) TARA Systems GmbH
6 * written by Paul Banach and Manfred Schweyer
7 *
8 ********************************************************************************
9 *
10 * This file was generated automatically by Embedded Wizard Studio.
11 *
12 * Please do not make any modifications of this file! The modifications are lost
13 * when the file is generated again by Embedded Wizard Studio!
14 *
15 * The template of this heading text can be found in the file 'head.ewt' in the
16 * directory 'Platforms' of your Embedded Wizard installation directory. If you
17 * wish to adapt this text, please copy the template file 'head.ewt' into your
18 * project directory and edit the copy only. Please avoid any modifications of
19 * the original template file!
20 *
21 * Version : 10.00
22 * Profile : STM32H747
23 * Platform : STM.STM32.RGB565
24 *
25 *******************************************************************************/
26 
27 #ifndef _EffectsEffect_H
28 #define _EffectsEffect_H
29 
30 #ifdef __cplusplus
31  extern "C"
32  {
33 #endif
34 
35 #include "ewrte.h"
36 #if EW_RTE_VERSION != 0x000A0000
37  #error Wrong version of Embedded Wizard Runtime Environment.
38 #endif
39 
40 #include "ewgfx.h"
41 #if EW_GFX_VERSION != 0x000A0000
42  #error Wrong version of Embedded Wizard Graphics Engine.
43 #endif
44 
45 /* Forward declaration of the class Core::Timer */
46 #ifndef _CoreTimer_
47  EW_DECLARE_CLASS( CoreTimer )
48 #define _CoreTimer_
49 #endif
50 
51 /* Forward declaration of the class Effects::Effect */
52 #ifndef _EffectsEffect_
53  EW_DECLARE_CLASS( EffectsEffect )
54 #define _EffectsEffect_
55 #endif
56 
57 /* Forward declaration of the class Effects::TimingList */
58 #ifndef _EffectsTimingList_
59  EW_DECLARE_CLASS( EffectsTimingList )
60 #define _EffectsTimingList_
61 #endif
62 
63 
64 /* The class Effects::Effect provides the base functionality for all kinds of animation
65  effects. Effects allow the designer to enrich the GUI application with additional
66  fancy and eye candy animations. For example, the effect Effects::ColorEffect
67  performs the color fade animation. Effects::RectEffect in contrast can animate
68  the position and the size of a GUI component, etc. Animation effects are determined
69  by their duration and by the timing function.
70  The duration is primarily controlled by the value of the property @CycleDuration.
71  This is the time the effect will take for a single animation run. Whether and
72  how often the animation is repeated is stored in the property @NoOfCycles. In
73  this case the property @InterCycleDelay can determine an optional interval to
74  wait between two consecutive animation runs. Finally the property @InitialDelay
75  determines the interval to wait at the very beginning of the effect still before
76  the first animation run began.
77  The timing function determines the curve to run the animation. The class implements
78  an extensive set of various timing functions. In its simplest case the animation
79  can follow a straight line, or it can start slow and get faster afterwards. More
80  complex timings perform realistic spring elastic and bounce animations. Besides
81  it the user can configure his/her own animation curve. In such case the timing
82  function is based on a cubic Bezier curve. It gives the designer a lot of possibilities
83  to specify very fancy timing functions. The timing is controlled by the property
84  @Timing. In the case the designer wants to specify a new curve, the properties
85  @TimingCustom1 and @TimingCustom2 are available. With the property @Noise an
86  additional random noise can be added to the effect.
87  During the runtime of the animation, the effect will send signals to the slot
88  method stored in the property @OnAnimate. When the effect is finished a signal
89  is send to the slot method stored in the @OnFinished property.
90  Whether the effect is running or not is controlled by its property @Enabled.
91  It can be used to start and stop the effect. The effect can also be controlled
92  by sending signals to its @StartEffect and @StopEffect slot methods. With the
93  property @Reversed the playback direction can be determined. This allows to simply
94  rewind running effects or to configure an effect to be played in the reverse
95  direction. The slot method @ReverseEffect can also be used to switch the playback
96  direction. */
97 EW_DEFINE_FIELDS( EffectsEffect, XObject )
98  EW_VARIABLE( timingList, EffectsTimingList )
99  EW_VARIABLE( timer, CoreTimer )
100  EW_VARIABLE( privateOnFinished, XSlot )
101  EW_PROPERTY( OnFinished, XSlot )
102  EW_PROPERTY( OnAnimate, XSlot )
103  EW_VARIABLE( direction, XInt32 )
104  EW_VARIABLE( startDirection, XInt32 )
105  EW_VARIABLE( curveFactor2, XFloat )
106  EW_VARIABLE( curveFactor1, XFloat )
107  EW_VARIABLE( invCycleDuration, XFloat )
108  EW_VARIABLE( lastFrame, XFloat )
109  EW_VARIABLE( cycleCounter, XInt32 )
110  EW_VARIABLE( startTime, XUInt32 )
111  EW_PROPERTY( Elasticity, XFloat )
112  EW_PROPERTY( Bounces, XInt32 )
113  EW_PROPERTY( Oscillations, XInt32 )
114  EW_PROPERTY( Amplitude, XFloat )
115  EW_PROPERTY( Exponent, XFloat )
116  EW_PROPERTY( Noise, XFloat )
117  EW_PROPERTY( TimingCustom2, XFloat )
118  EW_PROPERTY( TimingCustom1, XFloat )
119  EW_PROPERTY( NoOfCycles, XInt32 )
120  EW_PROPERTY( CycleDuration, XInt32 )
121  EW_PROPERTY( InterCycleDelay, XInt32 )
122  EW_PROPERTY( InitialDelay, XInt32 )
123  EW_PROPERTY( Timing, XEnum )
124  EW_PROPERTY( Enabled, XBool )
125  EW_PROPERTY( Symmetric, XBool )
126  EW_PROPERTY( Reversed, XBool )
127  EW_VARIABLE( useBezier2, XBool )
128  EW_VARIABLE( useBezier3, XBool )
129 EW_END_OF_FIELDS( EffectsEffect )
130 
131 /* Virtual Method Table (VMT) for the class : 'Effects::Effect' */
132 EW_DEFINE_METHODS( EffectsEffect, XObject )
133  EW_METHOD( Animate, void )( EffectsEffect _this, XFloat aProgress )
134 EW_END_OF_METHODS( EffectsEffect )
135 
136 /* 'C' function for method : 'Effects::Effect.timerSlot()' */
137 void EffectsEffect_timerSlot( EffectsEffect _this, XObject sender );
138 
139 /* 'C' function for method : 'Effects::Effect.run()' */
140 void EffectsEffect_run( EffectsEffect _this, XFloat aFrame );
141 
142 /* 'C' function for method : 'Effects::Effect.runRevRev()' */
143 XBool EffectsEffect_runRevRev( EffectsEffect _this );
144 
145 /* 'C' function for method : 'Effects::Effect.runRevFwd()' */
146 XBool EffectsEffect_runRevFwd( EffectsEffect _this );
147 
148 /* 'C' function for method : 'Effects::Effect.runFwdRev()' */
149 XBool EffectsEffect_runFwdRev( EffectsEffect _this );
150 
151 /* 'C' function for method : 'Effects::Effect.runFwdFwd()' */
152 XBool EffectsEffect_runFwdFwd( EffectsEffect _this );
153 
154 /* 'C' function for method : 'Effects::Effect.OnSetReversed()' */
155 void EffectsEffect_OnSetReversed( EffectsEffect _this, XBool value );
156 
157 /* 'C' function for method : 'Effects::Effect.OnSetElasticity()' */
158 void EffectsEffect_OnSetElasticity( EffectsEffect _this, XFloat value );
159 
160 /* 'C' function for method : 'Effects::Effect.OnSetBounces()' */
161 void EffectsEffect_OnSetBounces( EffectsEffect _this, XInt32 value );
162 
163 /* 'C' function for method : 'Effects::Effect.OnSetOscillations()' */
164 void EffectsEffect_OnSetOscillations( EffectsEffect _this, XInt32 value );
165 
166 /* 'C' function for method : 'Effects::Effect.OnSetAmplitude()' */
167 void EffectsEffect_OnSetAmplitude( EffectsEffect _this, XFloat value );
168 
169 /* 'C' function for method : 'Effects::Effect.OnSetExponent()' */
170 void EffectsEffect_OnSetExponent( EffectsEffect _this, XFloat value );
171 
172 /* 'C' function for method : 'Effects::Effect.OnSetTimingCustom2()' */
173 void EffectsEffect_OnSetTimingCustom2( EffectsEffect _this, XFloat value );
174 
175 /* 'C' function for method : 'Effects::Effect.OnSetTimingCustom1()' */
176 void EffectsEffect_OnSetTimingCustom1( EffectsEffect _this, XFloat value );
177 
178 /* 'C' function for method : 'Effects::Effect.OnSetTiming()' */
179 void EffectsEffect_OnSetTiming( EffectsEffect _this, XEnum value );
180 
181 /* 'C' function for method : 'Effects::Effect.OnSetNoOfCycles()' */
182 void EffectsEffect_OnSetNoOfCycles( EffectsEffect _this, XInt32 value );
183 
184 /* 'C' function for method : 'Effects::Effect.OnSetCycleDuration()' */
185 void EffectsEffect_OnSetCycleDuration( EffectsEffect _this, XInt32 value );
186 
187 /* 'C' function for method : 'Effects::Effect.OnSetInitialDelay()' */
188 void EffectsEffect_OnSetInitialDelay( EffectsEffect _this, XInt32 value );
189 
190 /* 'C' function for method : 'Effects::Effect.OnSetEnabled()' */
191 void EffectsEffect_OnSetEnabled( EffectsEffect _this, XBool value );
192 
193 /* 'C' function for method : 'Effects::Effect.Animate()' */
194 void EffectsEffect_Animate( EffectsEffect _this, XFloat aProgress );
195 
196 /* Wrapper function for the virtual method : 'Effects::Effect.Animate()' */
197 void EffectsEffect__Animate( void* _this, XFloat aProgress );
198 
199 /* The slot method 'StartEffect' re-starts the effect if a signal is sent to this
200  slot method. The effect will start from the beginning. */
201 void EffectsEffect_StartEffect( EffectsEffect _this, XObject sender );
202 
203 #ifdef __cplusplus
204  }
205 #endif
206 
207 #endif /* _EffectsEffect_H */
208 
209 /* Embedded Wizard */
EffectsEffect_OnSetCycleDuration
void EffectsEffect_OnSetCycleDuration(EffectsEffect _this, XInt32 value)
Definition: Effects.c:959
ewrte.h
EffectsEffect_StartEffect
void EffectsEffect_StartEffect(EffectsEffect _this, XObject sender)
Definition: Effects.c:1018
EffectsEffect__Animate
void EffectsEffect__Animate(void *_this, XFloat aProgress)
Definition: Effects.c:1011
EffectsEffect_OnSetOscillations
void EffectsEffect_OnSetOscillations(EffectsEffect _this, XInt32 value)
Definition: Effects.c:820
EW_END_OF_FIELDS
#define EW_END_OF_FIELDS(aClass)
Definition: ewrte.h:460
EW_METHOD
EW_METHOD(Animate, void)(EffectsEffect _this
EW_DECLARE_CLASS
#define EW_DECLARE_CLASS(aClass)
Definition: ewrte.h:393
EffectsEffect_OnSetInitialDelay
void EffectsEffect_OnSetInitialDelay(EffectsEffect _this, XInt32 value)
Definition: Effects.c:969
XSlot
Definition: ewrte.h:2114
EffectsEffect_OnSetReversed
void EffectsEffect_OnSetReversed(EffectsEffect _this, XBool value)
Definition: Effects.c:776
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
_obj_XObject
Definition: ewrte.h:281
EffectsEffect_OnSetTiming
void EffectsEffect_OnSetTiming(EffectsEffect _this, XEnum value)
Definition: Effects.c:892
XInt32
signed long XInt32
Definition: ewrte.h:1586
value
XRect CoreOutline aOutline XPoint value
Definition: _ViewsWarpView.h:137
XBool
char XBool
Definition: ewrte.h:1592
XEnum
unsigned long XEnum
Definition: ewrte.h:1593
EffectsEffect_OnSetTimingCustom1
void EffectsEffect_OnSetTimingCustom1(EffectsEffect _this, XFloat value)
Definition: Effects.c:874
EW_DEFINE_METHODS
#define EW_DEFINE_METHODS(aClass, aSuperClass)
Definition: ewrte.h:524
EffectsEffect_OnSetAmplitude
void EffectsEffect_OnSetAmplitude(EffectsEffect _this, XFloat value)
Definition: Effects.c:832
EffectsEffect_OnSetEnabled
void EffectsEffect_OnSetEnabled(EffectsEffect _this, XBool value)
Definition: Effects.c:978
EffectsEffect_Animate
void EffectsEffect_Animate(EffectsEffect _this, XFloat aProgress)
Definition: Effects.c:1003
EffectsEffect_runFwdRev
XBool EffectsEffect_runFwdRev(EffectsEffect _this)
Definition: Effects.c:655
EffectsEffect_timerSlot
XFloat aProgress void EffectsEffect_timerSlot(EffectsEffect _this, XObject sender)
Definition: Effects.c:131
EffectsEffect_OnSetElasticity
void EffectsEffect_OnSetElasticity(EffectsEffect _this, XFloat value)
Definition: Effects.c:795
XFloat
float XFloat
Definition: ewrte.h:1595
EffectsEffect_OnSetBounces
void EffectsEffect_OnSetBounces(EffectsEffect _this, XInt32 value)
Definition: Effects.c:807
EffectsEffect_OnSetExponent
void EffectsEffect_OnSetExponent(EffectsEffect _this, XFloat value)
Definition: Effects.c:844
EffectsEffect_runRevRev
XBool EffectsEffect_runRevRev(EffectsEffect _this)
Definition: Effects.c:534
sender
XRect CoreOutline aOutline XObject sender
Definition: _ApplicationRadioInterface.h:186
EW_PROPERTY
#define EW_PROPERTY(aName, aType)
Definition: ewrte.h:466
EffectsEffect_run
void EffectsEffect_run(EffectsEffect _this, XFloat aFrame)
Definition: Effects.c:174
EffectsEffect_runRevFwd
XBool EffectsEffect_runRevFwd(EffectsEffect _this)
Definition: Effects.c:595
XUInt32
unsigned long XUInt32
Definition: ewrte.h:1590
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
EffectsEffect_runFwdFwd
XBool EffectsEffect_runFwdFwd(EffectsEffect _this)
Definition: Effects.c:715
EffectsEffect_OnSetNoOfCycles
void EffectsEffect_OnSetNoOfCycles(EffectsEffect _this, XInt32 value)
Definition: Effects.c:950
EffectsEffect_OnSetTimingCustom2
void EffectsEffect_OnSetTimingCustom2(EffectsEffect _this, XFloat value)
Definition: Effects.c:856
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451