WebRadioApp  0.1
_CoreKeyEvent.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 _CoreKeyEvent_H
28 #define _CoreKeyEvent_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::KeyEvent */
48 #ifndef _CoreKeyEvent_
49  EW_DECLARE_CLASS( CoreKeyEvent )
50 #define _CoreKeyEvent_
51 #endif
52 
53 
54 /* The class Core::KeyEvent provides a specialized event object able to deliver
55  key pressure and release events. Each time a key event occurs, the code of the
56  pressed or released key will be passed in the Core::KeyEvent object to the application.
57  On its part the application dispatches the event to the GUI components along
58  the focus path. See the method DispatchEvent() of the class Core::Group.
59  The Mosaic framework defines a fixed set of the most important key codes (Menu,
60  Left, Up, Ok, Exit, Play, Record, etc.). The usage of these predefined key codes
61  increases the platform independence of your GUI application. For special key
62  codes, which are not included in this set, a range of UserXX key codes is provided.
63  The codes are defined in the enum Core::KeyCode.
64  Beside the predefined fixed set of key codes the Core::KeyEvent object can also
65  deliver a UNICODE character codes. This is very useful if your target device
66  supports an alpha numerical keyboard.
67  Usually the key codes and the character codes are used exclusively in the Core::KeyEvent
68  object. If an event contains a valid key code (Menu, Left, Ok, etc.), the character
69  code is set to '\x0000'. In the case, a character code is passed in the event,
70  the key code is set to NoKey. Digits, alpha signs 'A' .. 'Z' and some few special
71  signs like '+', '-', '*' are handled in a special manner, they are passed as
72  well as key codes Key0 .. Key9, KeyA .. KeyZ, KeyPlus, KeyMinus, KeyMultiply
73  and as character codes '0' .. '9', 'A' .. 'Z', '+', '-', '*'. */
74 EW_DEFINE_FIELDS( CoreKeyEvent, CoreEvent )
75  EW_VARIABLE( Code, XEnum )
76  EW_VARIABLE( CharCode, XChar )
77  EW_VARIABLE( Down, XBool )
78 EW_END_OF_FIELDS( CoreKeyEvent )
79 
80 /* Virtual Method Table (VMT) for the class : 'Core::KeyEvent' */
81 EW_DEFINE_METHODS( CoreKeyEvent, CoreEvent )
82 EW_END_OF_METHODS( CoreKeyEvent )
83 
84 /* The method Initialize2() initializes this Core::KeyEvent object with the given
85  parameters. This method stores the UNICODE character code aCode in the variable
86  @CharCode and returns this event object to the caller. The @Code variable will
87  be initialized with the Core::KeyCode.NoKey value unless a '0' .. '9', 'A' ..
88  'Z' character code is passed to this method. In this case the variable @Code
89  is initialized with the corresponding key code Key0 .. Key9 or KeyA .. KeyZ. */
90 CoreKeyEvent CoreKeyEvent_Initialize2( CoreKeyEvent _this, XChar aCode, XBool aDown );
91 
92 /* Wrapper function for the non virtual method : 'Core::KeyEvent.Initialize2()' */
93 CoreKeyEvent CoreKeyEvent__Initialize2( void* _this, XChar aCode, XBool aDown );
94 
95 /* The following define announces the presence of the method Core::KeyEvent.Initialize2(). */
96 #define _CoreKeyEvent__Initialize2_
97 
98 /* The method Initialize() initializes this Core::KeyEvent object with the given
99  parameters. This method stores the key code aCode in the variable @Code and returns
100  this event object to the caller. The @CharCode variable will be initialized with
101  the zero character '\x0000' unless a Key0 .. Key9; KeyA .. KeyZ code is passed
102  to this method. In this case the variable @CharCode is initialized with the corresponding
103  UNICODE character code '0' .. '9' or 'A' .. 'Z'. */
104 CoreKeyEvent CoreKeyEvent_Initialize( CoreKeyEvent _this, XEnum aCode, XBool aDown );
105 
106 /* Wrapper function for the non virtual method : 'Core::KeyEvent.Initialize()' */
107 CoreKeyEvent CoreKeyEvent__Initialize( void* _this, XEnum aCode, XBool aDown );
108 
109 /* The following define announces the presence of the method Core::KeyEvent.Initialize(). */
110 #define _CoreKeyEvent__Initialize_
111 
112 /* The method IsCode() compares the key code stored within the event with the code
113  passed in the parameter aCodeOrCategory and returns 'true' or 'false' depending
114  on the result of this operation.
115  The method is able to test whether a code does belong to a code category. Categories
116  are special codes defined in the Core::KeyCode enumeration, like AlphaKeys, DigitKeys
117  or CursorKeys. They stand for an entire range of key codes. */
118 XBool CoreKeyEvent_IsCode( CoreKeyEvent _this, XEnum aCodeOrCategory );
119 
120 #ifdef __cplusplus
121  }
122 #endif
123 
124 #endif /* _CoreKeyEvent_H */
125 
126 /* Embedded Wizard */
_CoreEvent.h
ewrte.h
CoreKeyEvent_Initialize
CoreKeyEvent CoreKeyEvent_Initialize(CoreKeyEvent _this, XEnum aCode, XBool aDown)
Definition: Core.c:5144
EW_END_OF_FIELDS
#define EW_END_OF_FIELDS(aClass)
Definition: ewrte.h:460
CoreKeyEvent_Initialize2
CoreKeyEvent CoreKeyEvent_Initialize2(CoreKeyEvent _this, XChar aCode, XBool aDown)
Definition: Core.c:5068
EW_DECLARE_CLASS
#define EW_DECLARE_CLASS(aClass)
Definition: ewrte.h:393
CoreKeyEvent__Initialize
CoreKeyEvent CoreKeyEvent__Initialize(void *_this, XEnum aCode, XBool aDown)
Definition: Core.c:5211
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
XChar
unsigned short XChar
Definition: ewrte.h:1596
XBool
char XBool
Definition: ewrte.h:1592
XEnum
unsigned long XEnum
Definition: ewrte.h:1593
EW_DEFINE_METHODS
#define EW_DEFINE_METHODS(aClass, aSuperClass)
Definition: ewrte.h:524
CoreKeyEvent_IsCode
XBool CoreKeyEvent_IsCode(CoreKeyEvent _this, XEnum aCodeOrCategory)
Definition: Core.c:5222
CoreKeyEvent__Initialize2
CoreKeyEvent CoreKeyEvent__Initialize2(void *_this, XChar aCode, XBool aDown)
Definition: Core.c:5133
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451