FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/ms/src/mfw/mfw_kbd.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
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 #ifdef MMI_EM_ENABLED | |
124 //xrashmic 14 Dec, 2005 OMAPS00050986 | |
125 //when no match is found in drvGetKeyIndex, it returns -1, | |
126 //Some of the keys have the value set to 0xFE. Hence defining KCD_NONE as 0xFD | |
127 #define KCD_NONE 253 //xrashmic 22 Aug, 2004 MMI-SPR-32798 | |
128 #endif | |
129 | |
130 | |
131 #define KEY_CONSUMED 1 | |
132 #define KEY_PASSED 0 | |
133 | |
134 typedef struct MfwKbdTag /* KEYBOARD CONTROL BLOCK */ | |
135 { | |
136 MfwEvt map; /* selection of keys */ | |
137 MfwEvt key; /* current key */ | |
138 U8 code; /* current key code */ | |
139 MfwCb handler; /* event handler */ | |
140 } MfwKbd; | |
141 | |
142 /* PROTOTYPES */ | |
143 MfwRes kbdInit (void); | |
144 MfwRes kbdExit (void); | |
145 MfwCb kbdAlways (MfwCb f); | |
146 void kbdTime (long tLong, long tAuto, long tRepeat); | |
147 MfwHnd kbdCreate (MfwHnd w, MfwEvt e, MfwCb f); | |
148 MfwRes kbdDelete (MfwHnd h); | |
149 void kbdSignal (char make, char key); | |
150 | |
151 //Functions to access key presses in the queue | |
152 int kbd_getMakeAndKey( char* make, char* key); | |
153 int kbd_putMakeAndKey( char make, char key); | |
154 int kbd_getNumElements(void); | |
155 int kbd_processKeyInput(void); | |
156 int kbd_displayUpdateNeeded(void); | |
157 void kbd_setDisplayUpdateNeeded(int set); | |
158 int kbd_stillProcessingKeys(void); | |
159 | |
160 int mfwKey_skipDisplay( void ); | |
161 | |
162 #define PROCESS_EVERY_KEY 1 | |
163 #define QUEUE_EVERY_KEY 2 | |
164 #define QUEUE_N_KEYS 3 | |
165 //The define below also defines the number of keys to be queued | |
166 //NB Should be an odd number (above 1) so when swapping between screens, | |
167 //the displayed screen changes. (e.g. every third screen is shown) | |
168 #define NUM_QUEUE_KEYS 3 | |
169 | |
170 | |
171 | |
172 #endif | |
173 | |
174 |