annotate src/ui/mfw/mfw_kbd.c @ 218:77b980f09bd9

Condat backlight driver switched to use the new R2D on/off API
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 24 Apr 2021 23:47:53 +0000
parents 7160f0d005d2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_kbd.c $|
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 | $Author:: Es $ CONDAT GmbH $Revision:: 18 $|
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 | CREATED: 21.09.98 $Modtime:: 23.03.00 8:24 $|
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | STATE : code |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 MODULE : MFW_KBD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 PURPOSE : keyboard handling functions
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 EXPORT :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 TO DO : adjust PEI/driver interface
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 HISTORY :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
19 Sep 14, 2007 REF: OMAPS00145862 Adrian Salido
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
20 Description: FT - MMI: Wrong trace class
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
21 Solution: changed some event traces to function traces because the information content of
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
22 this is low for non-MMI people and against TI coding convention.
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
23
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 Oct 13, 2006 REF: OMAPS00097121 - x0039928
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 Description: Keyboard pressed in a loop. KBP_R after suspend-resume
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 Solution : If the Auto press timer expires mmi checks the bsp kpd status and accordingly
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 sets auto key in the key map.
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
28
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 Sep 18, 2006 REF: OMAPS00094426 - x0039928
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
30 Description: Locosto - KPD Release event would NOT be generated if a key is pressed
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 several times in a short period of time
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 Solution : If the long press timer expires mmi checks the bsp kpd status and accordingly
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 sets long press bit in the key map.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 xrashmic 22 Aug, 2004 MMI-SPR-32798
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 Adding the support for screen capture using a dynamically assigned key.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 Apr 03, 2005 REF: CRR 29988 - xpradipg
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 Description: Optimisation 2: Reduce the keyboard buffer and the dtmf buffer
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 size
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 Solution : The keyboard buffer is reduced to 20 from 50
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #define ENTITY_MFW
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #include "typedefs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #include "pei.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #include <stdio.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 #include <string.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #include "mfw_mfw.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 #include "mfw_sys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 #include "mfw_tim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #include "drv_key.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #include "mfw_win.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 #include "mfw_kbd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 /* BEGIN ADD: Req ID: : Sumit : 14-Mar-05 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 #ifndef NEPTUNE_BOARD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 /* END ADD: Req ID: : Sumit : 14-Mar-05 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 #include "kpd/kpd_api.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 /* BEGIN ADD: Req ID: : Sumit : 14-Mar-05 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 #include "ti1_key.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 #endif /* NEPTUNE_BOARD*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 /* END ADD: Req ID: : Sumit : 14-Mar-05 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 #include "mfw_ffs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 #include "mfw_utils.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 #include "mfw_mme.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 static int kbdCommand (U32 cmd, void *h);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 static int toLong (U32 t, void *h);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 static int toAuto (U32 t, void *h);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 static MfwCb doAlways; /* all cases handler */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 static MfwHdr timLongH; /* the long press timer */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 static MfwTim timLong;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 static MfwHdr timAutoH; /* the auto repeat timer */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 static MfwTim timAuto;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 static U32 valAuto; /* auto start intervall */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 static U32 valRepeat; /* auto repeat intervall */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 static U32 curMap; /* current key map */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 static U8 curKey; /* current key code */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 static int still_processing_flag;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 // PATCH LE 06.06.00
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 // current MFW element needed for multiple instances
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 EXTERN MfwHdr * current_mfw_elem;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 // END PATCH LE 06.06.00
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 ** KeyPress Buffer Macros and Limits
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 // Apr 03, 2005 REF: CRR 29988 - xpradipg
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
104 // Keyboard buffer reduced from 50 to 20
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 #ifdef FF_MMI_REDUCED_KBD_BUFFER
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 #define MAX_KPRESS_BFR 20
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 #define MAX_KPRESS_BFR 50
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 typedef struct keyPressDetailsTag {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
111 char make;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
112 char key;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 } keyPressDetails;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 // Sep 18, 2006 REF: OMAPS00094426 - x0039928
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 #if(BOARD == 71)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 UBYTE kpd_key;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 static keyPressDetails keyPressBfr[MAX_KPRESS_BFR];
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 static SHORT mfw_kbd_kpress_buf_id;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 extern void sendKeyInd( T_KPD_VIRTUAL_KEY_ID virtual_key_id,
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
124 T_KPD_KEY_STATE key_state,
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
125 T_KPD_PRESS_STATE press_state);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 extern char drvGetKeyIndex( char key);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 | STATE : code ROUTINE : kbdInit |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 PURPOSE : initialize keyboard handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 MfwRes kbdInit (void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 timLong.time = 0; /* setup long press timer */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 timLong.left = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 timLong.handler = toLong;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 timLong.next = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 timLongH.data = &timLong;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 timLongH.type = MfwTypTim;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 timAuto.time = 0; /* setup auto repeat timer */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 timAuto.left = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 timAuto.handler = toAuto;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 timAuto.next = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 timAutoH.data = &timAuto;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 timAutoH.type = MfwTypTim;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 valAuto = valRepeat = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 keyInit(kbdSignal); /* init keyboard driver */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 mfwCommand[MfwTypKbd] = (MfwCb) kbdCommand;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 doAlways = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 mfw_kbd_kpress_buf_id = mfw_cbuf_create(MAX_KPRESS_BFR,
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
161 sizeof(keyPressDetails),
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
162 FALSE,
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
163 0xFF,
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
164 TRUE,
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
165 keyPressBfr);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
167 if (mfw_kbd_kpress_buf_id < 0)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
168 TRACE_EVENT_P1("ERROR : mfw_cbuf_create failed with error value %d", mfw_kbd_kpress_buf_id);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 return MfwResOk;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 | STATE : code ROUTINE : kbdExit |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 PURPOSE : finalize keyboard handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 MfwRes kbdExit (void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 mfwCommand[MfwTypKbd] = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 keyExit();
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 return MfwResOk;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 | STATE : code ROUTINE : kbdAlways |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 PURPOSE : create keyboard control for all events
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 MfwCb kbdAlways (MfwCb f)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 MfwCb always = doAlways;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 doAlways = f;
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
208 if (!f)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
209 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 timStop(&timLongH);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 timStop(&timAutoH);
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
212 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 return always;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 | STATE : code ROUTINE : kbdTime |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 PURPOSE : define keyboard timeouts
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 void kbdTime (long tLong, long tAuto, long tRepeat)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 timLong.time = tLong; /* setup long press timer */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 timAuto.time = tAuto; /* setup auto repeat timer */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 valAuto = tAuto; /* save auto start timeout */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 valRepeat = tRepeat; /* save repeat intervall */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 | STATE : code ROUTINE : kbdCreate |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 PURPOSE : create keyboard control
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 MfwHnd kbdCreate (MfwHnd w, MfwEvt e, MfwCb f)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 MfwHdr *hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr));
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 MfwKbd *kbd = (MfwKbd *) mfwAlloc(sizeof(MfwKbd));
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
251 MfwHdr *insert_status =0;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
252
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 if (!hdr || !kbd)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
255 TRACE_ERROR("ERROR: kbdCreate() Mem Alloc Failed.");
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
256
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
257 if(hdr)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
258 mfwFree((U8*)hdr,sizeof(MfwHdr));
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
259 if(kbd)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
260 mfwFree((U8*)kbd,sizeof(MfwKbd));
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
261 return 0;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
262 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264 kbd->map = e;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265 kbd->key = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 kbd->handler = f;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 hdr->data = kbd;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 hdr->type = MfwTypKbd;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 insert_status = mfwInsert(w,hdr);
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
272
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 if(!insert_status)
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
274 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
275 TRACE_ERROR("ERROR: kbdCreate() Failed to Install Handler. ");
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
276 mfwFree((U8*)hdr,sizeof(MfwHdr));
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
277 mfwFree((U8*)kbd ,sizeof(MfwKbd));
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
278 return 0;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
279 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 return insert_status;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 | STATE : code ROUTINE : kbdDelete |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 PURPOSE : delete keyboard control
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 MfwRes kbdDelete (MfwHnd h)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 MfwRes res;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 if (!h)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 return MfwResIllHnd;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 res = (mfwRemove(h)) ? MfwResOk : MfwResIllHnd;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 mfwFree(((MfwHdr *) h)->data,sizeof(MfwKbd));
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 mfwFree(h,sizeof(MfwHdr));
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306 return res;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 | STATE : code ROUTINE : sigExec |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 PURPOSE : execute keyboard signal
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 if the registered set of keys match the currently
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318 pressed key, the event handler is called, if the
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 registered flags match the current flags according
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 to the following table:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 M: Make/Break (key release events wanted)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 L: Long press event (timeout set via kbdTime())
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 A: Auto repeat event (timing defined via kbdTime())
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 M 0 0 0 0 1 1 1 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 current event flags --------- L 0 0 0 0 0 0 1 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 A 0 0 0 0 0 1 0 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 M L A .................
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 0 0 0 . 0 0 0 0 1 0 0 0
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 0 0 1 . 0 0 0 0 1 1 0 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 registered 0 1 0 . 0 0 0 0 0 0 1 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 event ----------- 0 1 1 . 0 0 0 0 0 1 1 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 flags 1 0 0 . 1 1 1 1 1 0 0 0
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 1 0 1 . 1 1 1 1 1 1 0 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 1 1 0 . 1 1 1 1 0 0 1 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 1 1 1 . 1 1 1 1 0 1 1 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 static int sigExec (MfwHdr *curElem, U32 map, U8 key)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 MfwKbd *kc;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 while (curElem)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 if (curElem->type == MfwTypKbd)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348 kc = curElem->data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 if (kc->map & map & ~KEY_FLAGS)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350 { /* keys match */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351 kc->code = key; /* set current key code */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 if (map & KEY_MAKE)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 kc->key |= map; /* set key in control block */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358 kc->key &= ~map; /* del key in control block */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 kc->key &= ~KEY_MAKE; /* del make/break flag */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 if ((KEY_MAKE & ~map & kc->map) ||
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362 (KEY_MAKE & map &&
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363 ((KEY_LONG & map & kc->map) ||
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364 (!(KEY_LONG & kc->map)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365 && (KEY_AUTO & kc->map & map)) ||
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 (!(KEY_LONG & map)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 && !(KEY_AUTO & map)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 && !(KEY_LONG & kc->map)) ||
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 (!(KEY_LONG & map)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 && (KEY_AUTO & map)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 && (KEY_AUTO & kc->map)))))
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 if (kc->handler) /* handler valid */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375 // PATCH LE 06.06.00
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 // store current mfw elem
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 current_mfw_elem = curElem;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 // END PATCH LE 06.06.00
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 if ((*(kc->handler))(map,kc))
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 return 1; /* event consumed */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 curElem = curElem->next;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395 | STATE : code ROUTINE : sigDistribute |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 PURPOSE : distribute keyboard event
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 static void sigDistribute (U32 map, U8 key)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404 int res = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406 TRACE_EVENT("sigDistribute");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 if (doAlways)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409 if (doAlways(map,(void*) -1))
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 return; /* event consumed */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412 if (mfwSignallingMethod == 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414 if (mfwFocus)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 res = sigExec(mfwFocus,map,key);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 if (!res && mfwRoot)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417 res = sigExec(mfwRoot,map,key);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421 MfwHdr *h = mfwFocus;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 if (!h)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
423 h = mfwRoot;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
424 while (h)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 res = sigExec(h,map,key); /* Warning correction - x0020906 - 14-08-2006*/
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
427 if (res)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 if (h == mfwRoot)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 h = mfwParent(mfwParent(h));
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 if (h)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 h = ((MfwWin *)(h->data))->elems;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435 if (!res && mfwRoot && h != mfwRoot)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436 res = sigExec(mfwRoot,map,key);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439 if (doAlways)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440 (void)(doAlways(map,(void*) res));/*a0393213 lint warnings removal - void cast is done to avoid lint warning though the function returns int*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 return;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449 | STATE : code ROUTINE : kbdSignal |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 PURPOSE : keyboard event (called by driver/PEI)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
453
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456 #define MAX_CONSEC_KEYS 6 // Maximum number of keys which can be processed before
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
457 // allowing the protocol stack processing time
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
458 //xrashmic 22 Aug, 2004 MMI-SPR-32798
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459 #ifdef MMI_EM_ENABLED
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 #ifndef NEPTUNE_BOARD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461 /* This is not valid for Neptune Engineering Mode, hence*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462 extern U8 screenCaptureKey;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463 void screen_capture(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 #endif /* ifndef NEPTUNE_BOARD */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 void kbdSignal (char make, char key)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468 {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
469 U32 map;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
470 UBYTE temp=0 ;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
471 USHORT numElem;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
473 int loopNo;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
474 int keyNo;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
477 if ((kbd_processKeyInput()== QUEUE_EVERY_KEY) ||
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
478 (kbd_processKeyInput()== QUEUE_N_KEYS))
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
479 temp = dspl_Enable(0);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480
84
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 79
diff changeset
481 /* removed in FreeCalypso */
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 79
diff changeset
482 /* mme_backlightEvent(BL_KEY_PRESS); */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
484 loopNo = 0;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
485 keyNo = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
487 while (kbd_getMakeAndKey(&make,&key) != -1)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
488 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 #ifdef MMI_EM_ENABLED
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490 #ifndef NEPTUNE_BOARD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 /* This is not valid for Neptune Engineering Mode, hence*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493 //xrashmic 22 Aug, 2004 MMI-SPR-32798
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
494 //If screen capture is enabled the key pressed is the screen capture key,
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
495 //we write the LCD buffer into the FFS and and consume the key
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496 //event here itself without sending it to BMI
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 // Also the screen capture key will be disabled here
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498 if(key== screenCaptureKey && make==1)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 TRACE_EVENT("*****Capturing the screen");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501 screenCaptureKey=KCD_NONE;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502 screen_capture();
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503 dspl_Enable(temp);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504 return;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 #endif /* ifndef NEPTUNE_BOARD*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
507 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
509 still_processing_flag = 1;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
510 TRACE_EVENT_P2("NDH : KbdSignal - key %d, state %02x", key, make);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
511
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
512 if (key <= KCD_MAX) /*a0393213 compiler warnings removal - comparison of key with 0 removed*/
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
513 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
514 loopNo++;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
515 keyNo++;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
517 map = 1L << key;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
518
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
519 if (make)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
520 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
521 map |= KEY_MAKE;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
522 curMap = map;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
523 curKey = key;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
524 timStart(&timLongH);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
525 timAuto.time = valAuto;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
526
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
527 /*NM, p007a*/
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
528 if (valAuto)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
529 timStart(&timAutoH);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
530 /*NM, p007a end*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
532 }
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
533 else
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
534 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
535 map &= ~KEY_MAKE;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
536 curMap = map; //ES!!
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
537 curKey = key; //ES!!
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
538 timStop(&timLongH);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
540 if (valAuto)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
541 timStop(&timAutoH);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
542 }
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
543
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
544 //Select when we update the display
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
545 switch (kbd_processKeyInput())
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
546 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
547 case QUEUE_EVERY_KEY:
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
548 sigDistribute(map,key);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
549 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
550
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
551 case PROCESS_EVERY_KEY:
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
552 temp = dspl_Enable(0);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
553 sigDistribute(map,key);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
554 dspl_Enable(temp);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
555 break;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
556
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
557 case QUEUE_N_KEYS:
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
558 if ((loopNo %(NUM_QUEUE_KEYS*2))==0)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
559 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
560 kbd_setDisplayUpdateNeeded(1);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
561 sigDistribute(map,key);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
562 dspl_Enable(temp);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
563 temp = dspl_Enable(0);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
564 kbd_setDisplayUpdateNeeded(0);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
565 }
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
566 else
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
567 sigDistribute(map,key);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
568 break;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
569 }
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
570 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
571
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
572 if (keyNo == MAX_CONSEC_KEYS)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
573 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
574 still_processing_flag = FALSE;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
575 break;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
576 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
578 still_processing_flag = FALSE;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
579 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
581 numElem = mfw_cbuf_num_elements(mfw_kbd_kpress_buf_id);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
582
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
583 /* x0083025 on Sep 14, 2007 for OMAPS00145862 (adrian) */
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
584 MMI_TRACE_EVENT_P2("NDH >>> Kbd :- There are %d elements in the buffer (id : %d)" ,
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
585 numElem, mfw_kbd_kpress_buf_id);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
587 if ((keyNo == MAX_CONSEC_KEYS) && (numElem > 0))
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
588 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
589 sendKeyInd(0, 0, 0); // dummy values to trigger another keypress_ind
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
590 /*
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
591 ** This delay is required to slow down the BMI when no trace is being output in order
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
592 ** to permit the Protocol Stack & other tasks to function correctly
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
593 */
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
594 vsi_t_sleep (VSI_CALLER 30);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
595 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
597 if ((kbd_processKeyInput()== QUEUE_EVERY_KEY) ||
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
598 (kbd_processKeyInput()== QUEUE_N_KEYS))
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
599 dspl_Enable(temp);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
600
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
601 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
602 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
604
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
605 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
607 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 | STATE : code ROUTINE : toLong |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
609 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 PURPOSE : long press timeout handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
612
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
614 static int toLong (U32 t, void *h)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 // Sep 18, 2006 REF: OMAPS00094426 - x0039928
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
617 // Fix: On long key press timer expiry bsp kpd status is checked to see if the state is
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 // in in Kpd pressed state and sets the long key bit.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619 #if(BOARD == 71)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
620 UBYTE state;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621 kpd_retrieve_key_status(kpd_key, KPD_DEFAULT_MODE, &state);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622 if(!state)
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
623 #endif
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
624 curMap |= KEY_LONG;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
625 sigDistribute(curMap,curKey);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
632 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
634 | STATE : code ROUTINE : toAuto |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
635 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
636
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
637 PURPOSE : auto repeat timeout handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
638
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
639 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641 static int toAuto (U32 t, void *h)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
643 #if(BOARD == 71)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
644 UBYTE state;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 kpd_retrieve_key_status(kpd_key, KPD_DEFAULT_MODE, &state);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
646 if(!state)
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
647 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
648 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 curMap |= KEY_AUTO;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650 sigDistribute(curMap,curKey);
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
651
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
652 timAuto.time = valRepeat;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 /* NM p007c*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654 if (valRepeat)
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
655 timStart(&timAutoH);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
656 /* NM p007c end*/
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
657 #if(BOARD == 71)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
658 }
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
659 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
664 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
665 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
667 | STATE : code ROUTINE : kbdCommand |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
668 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
669
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
670 PURPOSE : handle mfw windows command
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
674 static int kbdCommand (U32 cmd, void *h)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
675 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
676 switch (cmd)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
677 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
678 case MfwCmdDelete: /* delete me */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
679 if (!h)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
680 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
681 kbdDelete(h);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
682 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
683 default:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
687 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
688 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
689
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
690
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
691 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
692 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694 | STATE : code ROUTINE : kbd_putMakeAndKey |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697 PURPOSE : places 'make' (key up/down) and key index into a queue
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
698
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
699 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
700
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
701 int kbd_putMakeAndKey( char make, char key)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
702 {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
703 keyPressDetails localKP;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
704 SHORT retVal;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
705
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
706 localKP.make = make;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
707 localKP.key = key;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
708
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
709 retVal = mfw_cbuf_put(mfw_kbd_kpress_buf_id, &localKP);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
711 if (retVal < 0)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
712 TRACE_EVENT_P1("ERROR : mfw_cbuf_put failed with error value %d", retVal);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
714 return (retVal);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
716
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
717 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
718 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720 | STATE : code ROUTINE : kbd_getMakeAndKey |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
721 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723 PURPOSE : reads 'make' (key up/down) and key index into a queue
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
724 Return +ve number - keys left in buffer
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
725 0 - no keys left - last key press returned
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
726 -1 - no keys and none in buffer
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
727 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
728
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
729 int kbd_getMakeAndKey( char* make, char* key)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
730 {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
731 keyPressDetails localKP;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
732 SHORT retVal;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
733
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
734 retVal = mfw_cbuf_get(mfw_kbd_kpress_buf_id, &localKP);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
735
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
736 if (retVal < 0)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
737 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
738 *key = 0x7F;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
739 *make = 0;
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
740 return (-1);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
741 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
742
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
743 *make = !(localKP.make);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
744 *key = drvGetKeyIndex(localKP.key);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
745 return (mfw_cbuf_num_elements(mfw_kbd_kpress_buf_id));
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
746 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
747
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
748 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
749 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
750 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
751 | STATE : code ROUTINE : kbd_getNumElements |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
752 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
753
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
754 PURPOSE : returns number of elements in queue
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
755
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
756 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
757 int kbd_getNumElements(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
758 {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
759 return ((int)mfw_cbuf_num_elements(mfw_kbd_kpress_buf_id));
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
760 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
761
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
762 int kbd_stillProcessingKeys(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
763 {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
764 return (still_processing_flag);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
765 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
766
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
767 int mfwKey_skipDisplay( void )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
768 {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
769 if ((mfw_cbuf_num_elements(mfw_kbd_kpress_buf_id) > 2) && (still_processing_flag == 1))
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
770 return (TRUE);
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
771 else
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
772 return (FALSE);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
773 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
774
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
775 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
776 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
777 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
778 | STATE : code ROUTINE : kbd_displayUpdateNeeded |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
779 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
780
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
781 PURPOSE : returns TRUE if we need to update the display
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
782
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
783 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
784 int displayUpdateNeeded; //used for output every 'n' key presses
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
785 int kbd_displayUpdateNeeded(void)
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
786 {
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
787 if (kbd_processKeyInput()==PROCESS_EVERY_KEY)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
788 return (TRUE);//Processing each key press - always update screen
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
789 else if (displayUpdateNeeded==0)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
790 return (TRUE);//need to update the display (1 in 6 output)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
791 else if (mfw_cbuf_num_elements(mfw_kbd_kpress_buf_id) > 1)
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
792 return (FALSE);//keys in queue - do not update
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
793 else
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
794 return (TRUE);//only 1 key up/down in queue - update display
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
795 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
796 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
797 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
798 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
799 | STATE : code ROUTINE : kbd_setDisplayUpdateNeeded |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
800 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
801
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
802 PURPOSE : sets/clears the flag indicating we need to update the display
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
803
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
804 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
805 void kbd_setDisplayUpdateNeeded(int set)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806 {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
807 displayUpdateNeeded = set;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
808 }
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
809
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
810 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
811 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
812 | PROJECT : MMI-Framework (8417) MODULE : MFW_KBD |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
813 | STATE : code ROUTINE : kbd_processEveryKeyInput |
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
814 +--------------------------------------------------------------------+
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
815
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
816 PURPOSE : indicates if the software should process each keypad input individually
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
817 (TRUE) or if it should process keypad inputs one at a time (FALSE)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
818
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
819 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 int kbd_processKeyInput(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821 {
79
e5e2af0ca91c mfw_kbd.c: white space fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
822 return (QUEUE_EVERY_KEY);//We buffer multiple key inputs
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
823
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
824 }