FreeCalypso > hg > fc-tourmaline
annotate src/ui/bmi/AUITextEntry.c @ 301:4bb5772a05a3
AT%SPVER: new command for setting custom speech version lists
The speech version list in the Bearer Capability IE tells the network
which speech codecs are supported by the MS, and in which order of
preference. The standard behaviour is to list all codecs that are
supported by the hw+fw platform, and the standard preference order
is newer over older, FR over HR. But sometimes it is desirable
(for network testing) to artificially restrict which codecs the test MS
will declare as supported, and/or to list them in some peculiar
non-standard order of preference. Add a new private AT command,
AT%SPVER, allowing the user to set and clear custom speech version
lists for the Bearer Capability IE composer in CC.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 May 2023 21:43:10 +0000 |
parents | 70ea7526b59e |
children |
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 CONDAT (UK) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 This software product is the property of Condat (UK) Ltd and may not be |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 disclosed to any third party without the express permission of the owner. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 $Project name: Basic MMI |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 $Project code: BMI (6349) |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
14 $Module: MMI |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
15 $File: AUITextEntry.c |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
16 $Revision: 1.0 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
18 $Author: Condat(UK) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
19 $Date: 22/02/01 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 Multi-tap and other text entry methods for AUI Editor. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 $History: AUITextEntry.c |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
30 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 31/01/02 Original Condat(UK) BMI version. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 $End |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #define ENTITY_MFW |
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 /* includes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include <string.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #include <stdio.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #include <stdlib.h> |
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 #if defined (NEW_FRAME) |
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 #include "typedefs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #include "vsi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #include "pei.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #include "custom.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #include "gsm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #else |
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 "STDDEFS.H" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 #include "custom.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 #include "gsm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 #include "vsi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 #include "mfw_mfw.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 #include "mfw_win.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 #include "mfw_kbd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #include "mfw_tim.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 #include "mfw_phb.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 #include "mfw_sms.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 #include "mfw_ss.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 #include "mfw_icn.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 #include "mfw_mnu.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 #include "mfw_lng.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 #include "mfw_sat.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 #include "mfw_kbd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 #include "mfw_nm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 #include "mfw_cm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 #include "mfw_edt.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 "dspl.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 #include "ksd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 #include "psa.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 #include "MmiDummy.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 #include "MmiMmi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 #include "MmiDialogs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 #include "MmiMain.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #include "cus_aci.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 #include "prim.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 #ifndef PCM_2_FFS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 #include "pcm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 |
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 #include "ATBCommon.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 #include "ATBDisplay.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 #include "ATBEditor.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 #include "AUITextEntry.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 /******************************************************************************* |
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 STATIC DATA |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 ********************************************************************************/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
103 /*SPR 2175, increased KEY_PAD_MAX and changed tables to allow entry of some |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 accented characters*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 #define KEY_PAD_MAX 6 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 /* API - 01/09/03 - SPR2371 - Move the new character to the end of the multitap sequence */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 /* Alpha mode characters for multi-tap - lower case */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
111 static UBYTE editAlpha [12][KEY_PAD_MAX] = |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
113 {'.', ',', '+', '-', '=', '0'}, /*Key 0*/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
114 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
115 {' ' ,'?', '!', ';', ':', '1'}, /*Key 1*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
116 /* a grave a umlaut*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
117 {'a', 'b', 'c', '2', '\x85', '\x84'}, /*Key 2*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
118 /* e-grave e-acute*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
119 {'d', 'e', 'f', '3', '\x8a', '\x83'}, /*Key 3*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
120 /* i-grave*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
121 {'g', 'h', 'i', '4', '\x8d', '@'}, /*Key 4*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 /**/ |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
123 {'j', 'k', 'l', '5', '&', '*'}, /*Key 5*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
124 /* o-grave o-umlaut*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
125 {'m', 'n', 'o', '6', '\x95', '\x94'}, /*Key 6*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
126 /* SS*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
127 {'p', 'q', 'r', 's', '7', '\xe1'}, /*Key 7*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
128 /* u-grave u-umlaut*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
129 {'t', 'u', 'v', '8', '\x97', '\x82'}, /*Key 8*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
130 /**/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
131 {'w', 'x', 'y', 'z', '9', '#'}, /*Key 9*/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
132 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
133 {'*', '*', '*', '*', '*', '*'}, /*Key star, not actually used for multitap*/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
134 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
135 {'#', '#', '#', '#', '#', '#'} /*Key hash, not actually used for multitap*/ |
3
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 /* Alpha mode characters for multi-tap - upper case */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
139 |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
140 static UBYTE editAlphaU [12][KEY_PAD_MAX] = |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
142 {'.', ',', '+', '-', '=', '0'}, /*Key 0*/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
143 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
144 {' ', '?', '!', ';', ':', '1'}, /*Key 1*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
145 /* A-umlaut cedilla*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
146 {'A', 'B', 'C', '2', '\x8e', '\x81'}, /*Key 2*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
147 /* E-acute*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
148 {'D', 'E', 'F', '3', '\x90', ' '}, /*Key 3*/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
149 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
150 {'G', 'H', 'I', '4', '@', ' '}, /*Key 4*/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
151 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
152 {'J', 'K', 'L', '5', '&', '*'}, /*Key 5*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
153 /* O-umlaut */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
154 {'M', 'N', 'O', '6', '\x99', ' '}, /*Key 6*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
155 /* SS*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
156 {'P', 'Q', 'R', 'S', '7', '\xe1'}, /*Key 7*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
157 /* U-umlaut*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
158 {'T', 'U', 'V', '8', '\x9A', ' '}, /*Key 8*/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
159 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
160 {'W', 'X', 'Y', 'Z', '9', '#'}, /*Key 9*/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
161 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
162 {'*', '*', '*' ,'*', '*', '*'}, /*Key star, not actually used for multitap*/ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
163 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
164 {'#', '#', '#', '#', '#', '#'} /*Key hash, not actually used for multitap*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 }; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 /* API - 01/09/03 - SPR2371 - END*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
169 static void *MMIdata; /* Temporary storage for MMI pointer */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 |
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 LOCAL FUNCTION PROTOTYPES |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 static int AUI_entry_Timer (MfwEvt event, MfwTim *timer); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 static USHORT AUI_entry_Keypress(T_AUI_ENTRY_DATA *entry_data, MfwEvt event, MfwKbd *key); |
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 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
182 $Function: AUI_entry_Create |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
184 $Description: Initialises the text entry data. Allocates memory. Creates the timer. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
186 $Returns: Pointer to the data. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
188 $Arguments: win - The window in which the editor is displayed |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
189 editor - The editor |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
190 update - The event to be sent to the window in order to update it |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
191 |
3
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 T_AUI_ENTRY_DATA *AUI_entry_Create(T_MFW_HND win, T_ED_DATA *editor, U32 update) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
196 T_AUI_ENTRY_DATA *entry_data = (T_AUI_ENTRY_DATA *)mfwAlloc(sizeof(T_AUI_ENTRY_DATA)); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
197 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
198 entry_data->win = win; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
199 entry_data->update = update; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
200 entry_data->editor = editor; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
201 /* SPR#1597 - SH - Always create this timer */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
202 entry_data->editTim = tim_create(win, 1000, (MfwCb) AUI_entry_Timer); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
203 entry_data->Level = KEY_PAD_MAX-1; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
204 entry_data->Key = KCD_MAX; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 return entry_data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
212 $Function: AUI_entry_Destroy |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
213 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
214 $Description: Frees memory associated with text entry. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
216 $Returns: none. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
218 $Arguments: entry_data - The text entry data |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
219 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 void AUI_entry_Destroy(T_AUI_ENTRY_DATA *entry_data) |
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 if (entry_data->editTim) |
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 timDelete(entry_data->editTim); |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 mfwFree((void *)entry_data, sizeof(T_AUI_ENTRY_DATA)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 |
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 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
236 $Function: AUI_entry_EditChar |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
238 $Description: Sends a character to the text editor. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
240 $Returns: None. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
242 $Arguments: data - The editor data |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
243 alphachar - Character to be inserted, or NULL if key tables are to |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
244 be used |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
245 multitap - TRUE if multitap is in progress |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
246 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 *******************************************************************************/ |
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 USHORT AUI_entry_EditChar (T_AUI_ENTRY_DATA *entry_data, USHORT alphachar, BOOL multitap) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
251 T_ED_DATA *editor = entry_data->editor; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
253 TRACE_FUNCTION("AUITextEntry: AUI_entry_EditChar()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
255 /* If character is not provided, get it from the key table */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
257 if (alphachar==NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
258 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
259 alphachar = AUI_entry_GetKeyChar(entry_data, ATB_edit_GetCasePref(editor)); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
261 if (!(ATB_edit_Mode(entry_data->editor, ED_MODE_ALPHA) && entry_data->Key!=KCD_MAX)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
262 alphachar = UNICODE_SPACE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
263 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
265 ATB_edit_MultiTap(editor, alphachar, multitap); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 return alphachar; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 |
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 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
273 $Function: AUI_entry_EditDigit |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
275 $Description: Sends a numeric digit/symbol to the editor |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
277 $Returns: None. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
279 $Arguments: data - The editor data |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
280 code - The key code of the digit to be inserted |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
281 |
3
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 USHORT AUI_entry_EditDigit (T_AUI_ENTRY_DATA *entry_data, UBYTE code) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
286 T_ED_DATA *editor = entry_data->editor; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
287 USHORT alphachar; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
289 TRACE_FUNCTION("AUITextEntry: AUI_entry_EditDigit()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
291 alphachar = ATB_char_Unicode(editControls[code]); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
292 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
293 ATB_edit_MultiTap(editor, alphachar, FALSE); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 return alphachar; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 } |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
301 $Function: AUI_entry_Timer |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
303 $Description: executes the timer event from the edit component |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
305 $Returns: none. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
307 $Arguments: |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
308 |
3
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 static int AUI_entry_Timer (MfwEvt event, MfwTim *timer) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
313 T_AUI_ENTRY_DATA *entry_data = (T_AUI_ENTRY_DATA *)MMIdata; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
315 TRACE_FUNCTION("AUIEditor: AUI_entry_Timer()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 /* SPR#2174 - SH - Only display character if we're still in multi-tap */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 if (entry_data->editor->multitap) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
321 if (ATB_edit_Mode(entry_data->editor, ED_MODE_ALPHA)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
322 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
323 AUI_entry_EditChar(entry_data, NULL, FALSE); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
324 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
325 entry_data->Level = KEY_PAD_MAX-1; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
326 entry_data->Key = KCD_MAX; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
327 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
329 SEND_EVENT(entry_data->win, entry_data->update,0,0); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
330 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
331 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 return 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
338 $Function: AUI_entry_StopMultitap |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
340 $Description: Stops a multitap operation going on, cancelling the timer |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
341 SPR#2174 - SH - Added |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
342 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
343 $Returns: none. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
345 $Arguments: entry_data - The entry data |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
346 |
3
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 void AUI_entry_StopMultitap(T_AUI_ENTRY_DATA *entry_data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
351 TRACE_FUNCTION("AUIEditor: AUI_entry_StopMultitap()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
353 timStop(entry_data->editTim); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 entry_data->editor->multitap = FALSE; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
356 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 entry_data->Level = KEY_PAD_MAX-1; |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
358 entry_data->Key = KCD_MAX; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
359 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
366 $Function: AUI_entry_EventKey |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
368 $Description: Process a keypress event. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
370 $Returns: The character that is entered, or NULL. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
372 $Arguments: |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
373 |
3
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 USHORT AUI_entry_EventKey (T_AUI_ENTRY_DATA *entry_data, MfwEvt event, MfwKbd *key) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
378 T_ED_DATA *editor = entry_data->editor; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
379 USHORT alphachar; // The character entered |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
381 TRACE_FUNCTION("AUIEditor: AUI_entry_EventKey"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
382 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
383 alphachar = AUI_entry_Keypress(entry_data, event, key); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
385 ATB_edit_Refresh(editor); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
386 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
387 return alphachar; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 } |
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 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
393 $Function: AUI_entry_Keypress |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
395 $Description: Process a keypress event |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
397 $Returns: The character that is entered, or NULL. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
399 $Arguments: |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
400 |
3
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 static USHORT AUI_entry_Keypress(T_AUI_ENTRY_DATA *entry_data, MfwEvt event, MfwKbd *key) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
405 T_ED_DATA *editor = entry_data->editor; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
406 USHORT alphachar; /* Current multi-tap character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
407 T_ED_CASE_PREF casePref; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
409 TRACE_FUNCTION("AUIEditor: AUI_entry_KeypressFormat()"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
410 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
411 alphachar = NULL; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
412 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
413 if (key->code!=KCD_HUP && editor->cursor.pos<(editor->attr->size-1)) /* SPR#1995 - SH */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
414 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
415 /* Multi-tap: The user presses a different key, meaning the previous character must be entered */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
417 if (entry_data->Key != KCD_MAX && entry_data->Key != key->code) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
418 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
419 timStop(entry_data->editTim); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
421 AUI_entry_EditChar(entry_data, alphachar, FALSE); // Show character, not multi-tap |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
422 entry_data->Level = KEY_PAD_MAX-1; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
423 entry_data->Key = KCD_MAX; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
424 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
426 casePref = ATB_edit_GetCasePref(editor); /* Work out the format character that will govern the format of this keypress */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
427 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
428 if (editor->cursor.pos < (editor->attr->size-1) && casePref!=ED_CASEPREF_NONE) /* SPR#1995 - SH */ // Make sure we can still show a character |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
429 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
430 if (key->code <= KCD_HASH) /* SPR#1788 - SH - Now accept 0-9, * and # */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
431 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
432 entry_data->Key = key->code; // Store the key pressed |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
433 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
434 /* Numeric */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
435 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
436 if (casePref==ED_CASEPREF_NUM) // A numeric digit is expected |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
437 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
438 alphachar = AUI_entry_GetKeyChar(entry_data, casePref); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
439 entry_data->Level = KEY_PAD_MAX-1; // Reset multi-tap settings |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
440 entry_data->Key = KCD_MAX; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
441 AUI_entry_EditChar(entry_data, alphachar, FALSE); // Show character, not multi-tap# |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
442 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
444 /* Multi-tap alphanumeric */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
446 else // Valid format codes |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
447 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
448 alphachar = NULL; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
449 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
450 entry_data->Level++; // Increment through list of symbols |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
451 if (entry_data->Level > (KEY_PAD_MAX-1)) // List wraps round |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
452 entry_data->Level = 0; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
453 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
454 alphachar = AUI_entry_GetKeyChar(entry_data, casePref); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
456 if (alphachar!=NULL) // If we've found a character, and string isn't max size |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
457 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
458 AUI_entry_EditChar(entry_data, alphachar, TRUE); // Add character, multi-tap |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
459 /* Need to store this handle, so timer can get access to |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
460 * entry_data on callback */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
461 MMIdata = (void *)entry_data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
462 timStart(entry_data->editTim); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
463 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
464 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
465 entry_data->Key = KCD_MAX;/*a0393213 warnings removal-KEY_MAX changed to KCD_MAX*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
466 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
467 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
468 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
469 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
470 return alphachar; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
476 $Function: AUI_entry_GetKeyChar |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
478 $Description: Return the character to be entered, based on the keypress |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
480 $Returns: the unicode character to be entered into the text |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
482 $Arguments: case - the preference for the case of the output |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
484 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 USHORT AUI_entry_GetKeyChar(T_AUI_ENTRY_DATA *entry_data, T_ED_CASE_PREF casePref) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
489 T_ED_DATA *editor = entry_data->editor; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
490 USHORT alphachar; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
491 USHORT safetycounter; /* Stops searching forever to find compatible character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
492 BOOL valid; /* flag to indicate whether character is accepted */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
493 USHORT upper; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
494 USHORT lower; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
495 UBYTE caseSel = ATB_edit_GetCase(editor); /* The case selected by the user */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
497 TRACE_FUNCTION("AUI_entry_GetKeyChar"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
498 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
499 if (casePref==ED_CASEPREF_NUM || (casePref==ED_CASEPREF_ALPHANUM && caseSel==ED_CASE_NUM)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
500 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
501 alphachar = editControls[entry_data->Key]; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
502 if (entry_data->Key<=KCD_HASH) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
503 alphachar = alphachar << 8; // Gives us the ascii in the upper byte of the unicode |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
504 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
505 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
506 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
507 valid = FALSE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
508 alphachar = NULL; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
509 safetycounter = 0; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
510 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
511 while (!valid && safetycounter<KEY_PAD_MAX) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
512 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
513 upper = (USHORT)editAlphaU[entry_data->Key][entry_data->Level]; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
514 lower = (USHORT)editAlpha[entry_data->Key][entry_data->Level]; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
516 switch(casePref) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
517 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
518 case ED_CASEPREF_ALPHANUM: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
519 if (caseSel==ED_CASE_UPPER || caseSel==ED_CASE_CAPS) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
520 alphachar = upper; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
521 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
522 alphachar = lower; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
523 valid = TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
524 break; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
525 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
526 case ED_CASEPREF_ALPHANUM_UC: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
527 alphachar = upper; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
528 valid = TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
529 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
531 case ED_CASEPREF_ALPHANUM_LC: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
532 alphachar = lower; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
533 valid = TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
534 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
536 case ED_CASEPREF_ALPHA_UC: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
537 alphachar = upper; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
538 valid = !ATB_char_IsNumeric(alphachar); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
539 break; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
540 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
541 case ED_CASEPREF_ALPHA_LC: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
542 alphachar = lower; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
543 valid = !ATB_char_IsNumeric(alphachar); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
544 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
545 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
547 if (!valid) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
548 { // find the next one that is, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
549 alphachar = NULL; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
550 safetycounter++; // (but don't search forever) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
551 entry_data->Level++; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
552 if (entry_data->Level > (KEY_PAD_MAX-1)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
553 entry_data->Level = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
554 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
555 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
557 alphachar = ATB_char_Unicode(alphachar); /* SPR#2342 - SH - Convert from unicode properly */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
558 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
560 TRACE_EVENT_P1(">>> alphachar = %d", alphachar); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
561 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
562 return alphachar; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 } |