WebRadioApp  0.1
_CoreCursorEvent.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 _CoreCursorEvent_H
28 #define _CoreCursorEvent_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 #include "_CoreEvent.h"
46 
47 /* Forward declaration of the class Core::CursorEvent */
48 #ifndef _CoreCursorEvent_
49  EW_DECLARE_CLASS( CoreCursorEvent )
50 #define _CoreCursorEvent_
51 #endif
52 
53 
54 /* The class Core::CursorEvent provides a specialized event object able to deliver
55  touch screen pressure and release events. Each time the user clicks with the
56  mouse cursor on the screen, hits it with a pen or touches it with his finger,
57  a cursor event is prepared and dispatched to the view which is willing to handle
58  it. See the method DriveCursorHitting() of the class Core::Root.
59  The event contains information about the position where the user has tapped (@HittingPos
60  and @CurrentPos), whether the user has pressed or released the finger (@Down),
61  how often has the user tapped at the same position (@StrikeCount), etc.
62  The dispatching of cursor events will always take place in so called 'grab cycles'.
63  A grab cycle starts when the user touches the screen and exists until the user
64  has released it. At the beginning the framework determines the view which is
65  lying at the touched position and is willing to receive cursor events. This view
66  will become the target for all following events while this grab cycle -> the
67  view 'grabs' the cursor for this time.
68  Afterwards the target view will receive the first Core::CursorEvent with its
69  variable @Down == 'true'. At the end of the grab cycle, after the user has released
70  the finger, the target view will receive the last Core::CursorEvent with the
71  variable @Down == 'false'. In the meantime the framework will feed the target
72  view with more events: the hold and the drag events.
73  The hold events are generated periodically in constant intervals. They store
74  the current cursor position and the time since the grab cycle began @HoldPeriod.
75  Please note, these hold events are sent with the variable @Down == 'true'. In
76  order to distinguish between the first event and the following hold events, the
77  @HoldPeriod variable should be evaluated.
78  Beside the hold events, the target view will also receive drag events as soon
79  as the user strokes the screen. This is communicated by events of the class Core::DragEvent. */
80 EW_DEFINE_FIELDS( CoreCursorEvent, CoreEvent )
81  EW_VARIABLE( GlobalHittingPos, XPoint )
82  EW_VARIABLE( GlobalCurrentPos, XPoint )
83  EW_VARIABLE( StrikeCount, XInt32 )
84  EW_VARIABLE( HoldPeriod, XInt32 )
85  EW_VARIABLE( HittingPos, XPoint )
86  EW_VARIABLE( CurrentPos, XPoint )
87  EW_VARIABLE( Finger, XInt32 )
88  EW_VARIABLE( Down, XBool )
89  EW_VARIABLE( AutoDeflected, XBool )
90 EW_END_OF_FIELDS( CoreCursorEvent )
91 
92 /* Virtual Method Table (VMT) for the class : 'Core::CursorEvent' */
93 EW_DEFINE_METHODS( CoreCursorEvent, CoreEvent )
94 EW_END_OF_METHODS( CoreCursorEvent )
95 
96 /* The method InitializeHold() simplifies the initialization of this Core::CursorEvent
97  object. This method stores the given parameters in the variables of this event
98  object, sets its variable @Down 'true' and returns this event object to the caller. */
99 CoreCursorEvent CoreCursorEvent_InitializeHold( CoreCursorEvent _this, XInt32 aFinger,
100  XPoint aCurrentPos, XPoint aHittingPos, XInt32 aHoldPeriod, XInt32 aStrikeCount,
101  XPoint aHitOffset, XPoint aGlobalCurrentPos, XPoint aGlobalHittingPos );
102 
103 /* Wrapper function for the non virtual method : 'Core::CursorEvent.InitializeHold()' */
104 CoreCursorEvent CoreCursorEvent__InitializeHold( void* _this, XInt32 aFinger, XPoint
105  aCurrentPos, XPoint aHittingPos, XInt32 aHoldPeriod, XInt32 aStrikeCount, XPoint
106  aHitOffset, XPoint aGlobalCurrentPos, XPoint aGlobalHittingPos );
107 
108 /* The following define announces the presence of the method Core::CursorEvent.InitializeHold(). */
109 #define _CoreCursorEvent__InitializeHold_
110 
111 /* The method InitializeUp() simplifies the initialization of this Core::CursorEvent
112  object. This method stores the given parameters in the variables of this event
113  object, sets its variable @Down 'false' and returns this event object to the
114  caller. */
115 CoreCursorEvent CoreCursorEvent_InitializeUp( CoreCursorEvent _this, XInt32 aFinger,
116  XPoint aCurrentPos, XPoint aHittingPos, XInt32 aHoldPeriod, XInt32 aStrikeCount,
117  XPoint aHitOffset, XBool aAutoDeflected, XPoint aGlobalCurrentPos, XPoint aGlobalHittingPos );
118 
119 /* Wrapper function for the non virtual method : 'Core::CursorEvent.InitializeUp()' */
120 CoreCursorEvent CoreCursorEvent__InitializeUp( void* _this, XInt32 aFinger, XPoint
121  aCurrentPos, XPoint aHittingPos, XInt32 aHoldPeriod, XInt32 aStrikeCount, XPoint
122  aHitOffset, XBool aAutoDeflected, XPoint aGlobalCurrentPos, XPoint aGlobalHittingPos );
123 
124 /* The following define announces the presence of the method Core::CursorEvent.InitializeUp(). */
125 #define _CoreCursorEvent__InitializeUp_
126 
127 /* The method InitializeDown() simplifies the initialization of this Core::CursorEvent
128  object. This method stores the given parameters in the variables of this event
129  object, sets its variable @Down 'true' and returns this event object to the caller. */
130 CoreCursorEvent CoreCursorEvent_InitializeDown( CoreCursorEvent _this, XInt32 aFinger,
131  XPoint aCurrentPos, XInt32 aStrikeCount, XPoint aHitOffset, XBool aAutoDeflected,
132  XPoint aGlobalCurrentPos );
133 
134 /* Wrapper function for the non virtual method : 'Core::CursorEvent.InitializeDown()' */
135 CoreCursorEvent CoreCursorEvent__InitializeDown( void* _this, XInt32 aFinger, XPoint
136  aCurrentPos, XInt32 aStrikeCount, XPoint aHitOffset, XBool aAutoDeflected, XPoint
137  aGlobalCurrentPos );
138 
139 /* The following define announces the presence of the method Core::CursorEvent.InitializeDown(). */
140 #define _CoreCursorEvent__InitializeDown_
141 
142 #ifdef __cplusplus
143  }
144 #endif
145 
146 #endif /* _CoreCursorEvent_H */
147 
148 /* Embedded Wizard */
CoreCursorEvent_InitializeUp
CoreCursorEvent CoreCursorEvent_InitializeUp(CoreCursorEvent _this, XInt32 aFinger, XPoint aCurrentPos, XPoint aHittingPos, XInt32 aHoldPeriod, XInt32 aStrikeCount, XPoint aHitOffset, XBool aAutoDeflected, XPoint aGlobalCurrentPos, XPoint aGlobalHittingPos)
Definition: Core.c:5421
CoreCursorEvent__InitializeUp
CoreCursorEvent CoreCursorEvent__InitializeUp(void *_this, XInt32 aFinger, XPoint aCurrentPos, XPoint aHittingPos, XInt32 aHoldPeriod, XInt32 aStrikeCount, XPoint aHitOffset, XBool aAutoDeflected, XPoint aGlobalCurrentPos, XPoint aGlobalHittingPos)
Definition: Core.c:5438
_CoreEvent.h
ewrte.h
EW_END_OF_FIELDS
#define EW_END_OF_FIELDS(aClass)
Definition: ewrte.h:460
EW_DECLARE_CLASS
#define EW_DECLARE_CLASS(aClass)
Definition: ewrte.h:393
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
CoreCursorEvent__InitializeHold
CoreCursorEvent CoreCursorEvent__InitializeHold(void *_this, XInt32 aFinger, XPoint aCurrentPos, XPoint aHittingPos, XInt32 aHoldPeriod, XInt32 aStrikeCount, XPoint aHitOffset, XPoint aGlobalCurrentPos, XPoint aGlobalHittingPos)
Definition: Core.c:5409
XInt32
signed long XInt32
Definition: ewrte.h:1586
XBool
char XBool
Definition: ewrte.h:1592
EW_DEFINE_METHODS
#define EW_DEFINE_METHODS(aClass, aSuperClass)
Definition: ewrte.h:524
CoreCursorEvent__InitializeDown
CoreCursorEvent CoreCursorEvent__InitializeDown(void *_this, XInt32 aFinger, XPoint aCurrentPos, XInt32 aStrikeCount, XPoint aHitOffset, XBool aAutoDeflected, XPoint aGlobalCurrentPos)
Definition: Core.c:5467
XPoint
Definition: ewrte.h:1616
CoreCursorEvent_InitializeDown
CoreCursorEvent CoreCursorEvent_InitializeDown(CoreCursorEvent _this, XInt32 aFinger, XPoint aCurrentPos, XInt32 aStrikeCount, XPoint aHitOffset, XBool aAutoDeflected, XPoint aGlobalCurrentPos)
Definition: Core.c:5450
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
CoreCursorEvent_InitializeHold
CoreCursorEvent CoreCursorEvent_InitializeHold(CoreCursorEvent _this, XInt32 aFinger, XPoint aCurrentPos, XPoint aHittingPos, XInt32 aHoldPeriod, XInt32 aStrikeCount, XPoint aHitOffset, XPoint aGlobalCurrentPos, XPoint aGlobalHittingPos)
Definition: Core.c:5393
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451