WebRadioApp  0.1
_CoreKeyPressHandler.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 _CoreKeyPressHandler_H
28 #define _CoreKeyPressHandler_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::KeyEvent */
46 #ifndef _CoreKeyEvent_
47  EW_DECLARE_CLASS( CoreKeyEvent )
48 #define _CoreKeyEvent_
49 #endif
50 
51 /* Forward declaration of the class Core::KeyPressHandler */
52 #ifndef _CoreKeyPressHandler_
53  EW_DECLARE_CLASS( CoreKeyPressHandler )
54 #define _CoreKeyPressHandler_
55 #endif
56 
57 
58 /* The class Core::KeyPressHandler provides a universal keyboard event handler able
59  to process key press and release events. It compares the received key codes with
60  the value of the property @Filter and if the codes do match the filter condition,
61  sends signals to the slot methods stored in the @OnPress, @OnHold and @OnRelease
62  properties.
63  Keyboard handlers can be created at the design time only. You can simply drag-and-drop
64  them from the Embedded Wizard Gallery into the Composer window where you are
65  editing the GUI component. If necessary several keyboard handlers can be added
66  to the component. For example, one handler can react to the 'Enter' key and the
67  other to the 'Exit' key. The order in which the handlers will process the events
68  corresponds to their Z-order. You can verify and modify this Z-order in the Embedded
69  Wizard Inspector. Please note, keyboard handlers created at the runtime with
70  the Chora 'new' operator will not work!
71  The handler provides several variables with details of the received keyboard
72  event, like the key code (@Code or @CharCode), whether the user has pressed or
73  released the key (@Down), etc. These variables can be evaluated in the implementation
74  of the slot method.
75  The property @Enabled can be used to activate/deactivate the keyboard handler.
76  Disabled handler will not react to the events. */
77 EW_DEFINE_FIELDS( CoreKeyPressHandler, XObject )
78  EW_VARIABLE( next, CoreKeyPressHandler )
79  EW_PROPERTY( OnRelease, XSlot )
80  EW_PROPERTY( OnPress, XSlot )
81  EW_PROPERTY( OnHold, XSlot )
82  EW_VARIABLE( pressCounter, XInt32 )
83  EW_VARIABLE( Time, XUInt32 )
84  EW_VARIABLE( RepetitionCount, XInt32 )
85  EW_PROPERTY( Filter, XEnum )
86  EW_VARIABLE( Code, XEnum )
87  EW_VARIABLE( CharCode, XChar )
88  EW_PROPERTY( Enabled, XBool )
89  EW_VARIABLE( Down, XBool )
90  EW_VARIABLE( Repetition, XBool )
91  EW_VARIABLE( Continue, XBool )
92 EW_END_OF_FIELDS( CoreKeyPressHandler )
93 
94 /* Virtual Method Table (VMT) for the class : 'Core::KeyPressHandler' */
95 EW_DEFINE_METHODS( CoreKeyPressHandler, XObject )
96 EW_END_OF_METHODS( CoreKeyPressHandler )
97 
98 /* 'C' function for method : 'Core::KeyPressHandler.Init()' */
99 void CoreKeyPressHandler_Init( CoreKeyPressHandler _this, XHandle aArg );
100 
101 /* 'C' function for method : 'Core::KeyPressHandler.HandleEvent()' */
102 XBool CoreKeyPressHandler_HandleEvent( CoreKeyPressHandler _this, CoreKeyEvent aEvent );
103 
104 #ifdef __cplusplus
105  }
106 #endif
107 
108 #endif /* _CoreKeyPressHandler_H */
109 
110 /* Embedded Wizard */
ewrte.h
XHandle
unsigned long XHandle
Definition: ewrte.h:291
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
XSlot
Definition: ewrte.h:2114
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
aArg
XRect CoreOutline aOutline XHandle aArg
Definition: _ApplicationApplication.h:151
_obj_XObject
Definition: ewrte.h:281
XChar
unsigned short XChar
Definition: ewrte.h:1596
XInt32
signed long XInt32
Definition: ewrte.h:1586
CoreKeyPressHandler_HandleEvent
XBool CoreKeyPressHandler_HandleEvent(CoreKeyPressHandler _this, CoreKeyEvent aEvent)
Definition: Core.c:6338
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
CoreKeyPressHandler_Init
void CoreKeyPressHandler_Init(CoreKeyPressHandler _this, XHandle aArg)
Definition: Core.c:6318
EW_PROPERTY
#define EW_PROPERTY(aName, aType)
Definition: ewrte.h:466
XUInt32
unsigned long XUInt32
Definition: ewrte.h:1590
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