comparison src/ui3/mfw/mfw_kbd.h @ 420:e8ddbb0837ed

src/ui3: initial import of TCS3/LoCosto BMI & MFW code
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Jan 2018 03:09:00 +0000
parents
children
comparison
equal deleted inserted replaced
419:59143cd42ec7 420:e8ddbb0837ed
1 /*
2 +--------------------------------------------------------------------+
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_kbd.h $|
4 | $Author:: Le $ CONDAT GmbH $Revision:: 7 $|
5 | CREATED: 21.09.98 $Modtime:: 21.12.99 16:30 $|
6 | STATE : code |
7 +--------------------------------------------------------------------+
8
9 MODULE : MFW_KBD
10
11 PURPOSE : Keyboard types & constants
12
13 EXPORT :
14
15 TO DO :
16
17 $History:: mfw_kbd.h $
18 *
19 * ***************** Version 7 *****************
20 * User: Le Date: 6.01.00 Time: 9:23
21 * Updated in $/GSM/Condat/MS/SRC/MFW
22 * Alignment of MFW versions
23 *
24 * ***************** Version 2 *****************
25 * User: Es Date: 22.11.99 Time: 10:29
26 * Updated in $/GSM/Condat/SND-MMI/MFW
27 *
28 * ***************** Version 1 *****************
29 * User: Es Date: 18.11.99 Time: 16:35
30 * Created in $/GSM/Condat/SND-MMI/MFW
31 * Initial
32 *
33 * ***************** Version 6 *****************
34 * User: Es Date: 17.02.99 Time: 20:00
35 * Updated in $/GSM/DEV/MS/SRC/MFW
36 *
37 * ***************** Version 5 *****************
38 * User: Es Date: 23.12.98 Time: 16:19
39 * Updated in $/GSM/DEV/MS/SRC/MFW
40 */
41
42 #ifndef _DEF_MFW_KBD_H_
43 #define _DEF_MFW_KBD_H_
44
45 #include "mfw_mfw.h"
46
47
48 /* KEYMAP DEFINITION */
49 #define KEY_0 0x00000001
50 #define KEY_1 0x00000002
51 #define KEY_2 0x00000004
52 #define KEY_3 0x00000008
53 #define KEY_4 0x00000010
54 #define KEY_5 0x00000020
55 #define KEY_6 0x00000040
56 #define KEY_7 0x00000080
57 #define KEY_8 0x00000100
58 #define KEY_9 0x00000200
59 #define KEY_STAR 0x00000400
60 #define KEY_HASH 0x00000800
61 #define KEY_VOLUP 0x00001000
62 #define KEY_VOLDOWN 0x00002000
63 #define KEY_MNUUP 0x00004000
64 #define KEY_MNUDOWN 0x00008000
65 #define KEY_LEFT 0x00010000
66 #define KEY_RIGHT 0x00020000
67 #define KEY_CALL 0x00040000
68 #define KEY_HUP 0x00080000
69 #define KEY_OK 0x00100000
70 #define KEY_CLEAR 0x00200000
71 #define KEY_ABC 0x00400000
72 #define KEY_POWER 0x00800000
73
74 #define KEY_MNULEFT 0x01000000
75 #define KEY_MNURIGHT 0x02000000
76 //xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
77 //Wrong hex code was defined earlier. Changed from 0x08000000
78 //to 0x04000000 since KCD_MNUSELECT is 26
79 #define KEY_MNUSELECT 0x04000000
80
81
82 #define KEY_MAX 0x10000000
83 #define KEY_AUTO 0x20000000
84 #define KEY_LONG 0x40000000
85 #define KEY_MAKE 0x80000000
86 /* KEYGROUP DEFINITIONS */
87 #define KEY_DIGITS 0x000003ff
88 #define KEY_ALL 0x0fffffff
89 #define KEY_FLAGS 0xe0000000
90
91 /* KEYCODE DEFINITION */
92 #define KCD_0 0
93 #define KCD_1 1
94 #define KCD_2 2
95 #define KCD_3 3
96 #define KCD_4 4
97 #define KCD_5 5
98 #define KCD_6 6
99 #define KCD_7 7
100 #define KCD_8 8
101 #define KCD_9 9
102 #define KCD_STAR 10
103 #define KCD_HASH 11
104 #define KCD_VOLUP 12
105 #define KCD_VOLDOWN 13
106 #define KCD_MNUUP 14
107 #define KCD_MNUDOWN 15
108 #define KCD_LEFT 16
109 #define KCD_RIGHT 17
110 #define KCD_CALL 18
111 #define KCD_HUP 19
112 #define KCD_OK 20
113 #define KCD_CLEAR 21
114 #define KCD_ABC 22
115 #define KCD_POWER 23
116 #define KCD_MNULEFT 24
117 #define KCD_MNURIGHT 25
118 #define KCD_MNUSELECT 26
119 #define KCD_MAX 28
120 #define KCD_AUTO 29
121 #define KCD_LONG 30
122 #define KCD_MAKE 31
123
124 #ifdef MMI_EM_ENABLED
125 #ifndef NEPTUNE_BOARD
126 /* This is not valid for Neptune Engineering Mode, hence*/
127
128 //xrashmic 14 Dec, 2005 OMAPS00050986
129 //when no match is found in drvGetKeyIndex, it returns -1,
130 //Some of the keys have the value set to 0xFE. Hence defining KCD_NONE as 0xFD
131 #define KCD_NONE 253 //xrashmic 22 Aug, 2004 MMI-SPR-32798
132 #endif /* ifndef NEPTUNE_BOARD*/
133 #endif
134
135
136 #define KEY_CONSUMED 1
137 #define KEY_PASSED 0
138
139 typedef struct MfwKbdTag /* KEYBOARD CONTROL BLOCK */
140 {
141 MfwEvt map; /* selection of keys */
142 MfwEvt key; /* current key */
143 U8 code; /* current key code */
144 MfwCb handler; /* event handler */
145 } MfwKbd;
146
147 /* PROTOTYPES */
148 MfwRes kbdInit (void);
149 MfwRes kbdExit (void);
150 MfwCb kbdAlways (MfwCb f);
151 void kbdTime (long tLong, long tAuto, long tRepeat);
152 MfwHnd kbdCreate (MfwHnd w, MfwEvt e, MfwCb f);
153 MfwRes kbdDelete (MfwHnd h);
154 void kbdSignal (char make, char key);
155
156 //Functions to access key presses in the queue
157 int kbd_getMakeAndKey( char* make, char* key);
158 int kbd_putMakeAndKey( char make, char key);
159 int kbd_getNumElements(void);
160 int kbd_processKeyInput(void);
161 int kbd_displayUpdateNeeded(void);
162 void kbd_setDisplayUpdateNeeded(int set);
163 int kbd_stillProcessingKeys(void);
164
165 int mfwKey_skipDisplay( void );
166
167 #define PROCESS_EVERY_KEY 1
168 #define QUEUE_EVERY_KEY 2
169 #define QUEUE_N_KEYS 3
170 //The define below also defines the number of keys to be queued
171 //NB Should be an odd number (above 1) so when swapping between screens,
172 //the displayed screen changes. (e.g. every third screen is shown)
173 #define NUM_QUEUE_KEYS 3
174
175 /* Added to remove warning */
176 EXTERN UBYTE dspl_Enable (UBYTE in_Enable);
177
178 #endif
179
180