annotate src/ui/bmi/AUISymbol.c @ 303:f76436d19a7a default tip

!GPRS config: fix long-standing AT+COPS chance hanging bug There has been a long-standing bug in FreeCalypso going back years: sometimes in the AT command bring-up sequence of an ACI-only MS, the AT+COPS command would produce only a power scan followed by cessation of protocol stack activity (only L1 ADC traces), instead of the expected network search sequence. This behaviour was seen in different FC firmware versions going back to Citrine, and seemed to follow some law of chance, not reliably repeatable. This bug has been tracked down and found to be specific to !GPRS configuration, stemming from our TCS2/TCS3 hybrid and reconstruction of !GPRS support that was bitrotten in TCS3.2/LoCosto version. ACI module psa_mms.c, needed only for !GPRS, was missing in the TCS3 version and had to be pulled from TCS2 - but as it turns out, there is a new field in the MMR_REG_REQ primitive that needs to be set correctly, and that psa_mms.c module is the place where this initialization needed to be added.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 08 Jun 2023 08:23:37 +0000
parents 70ea7526b59e
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
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
3 CONDAT (UK)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
5 ********************************************************************************
3
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
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
8 disclosed to any third party without the express permission of the owner.
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
9
3
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
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
12 $Project name: Basic MMI
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
13 $Project code: BMI
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: AUISymbol.c
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
16 $Revision: 1.0
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
17
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
18 $Author: Condat(UK)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
19 $Date:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
20
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 ********************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
22
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 Description: Symbol screen for AUI editor
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
25
3
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: AUISymbol.c
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
31 Mar 23, 2005 REF: CRR 28490 xnkulkar
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
32 Description: Golite- 5-way navigation behaves wrongly while selecting special characters
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
33 in the text editor screen.The background screen goes blank when the special
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
34 characters screen comes up.
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
35 Solution: Commented 'dspl_ClearAll()' to make the behaviour consistent with normal variant.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
37
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 $End
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 // Issue Number : SPR#12817 on 26/03/04 by Deepa M.D.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 *******************************************************************************/
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 /* includes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 #include <string.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #include <stdio.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #include <stdlib.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #if defined (NEW_FRAME)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #include "typedefs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #include "pei.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 #include "gsm.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 #else
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 #include "STDDEFS.H"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 #include "vsi.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 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 #include "mfw_mfw.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 #include "mfw_win.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 #include "mfw_kbd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 #include "mfw_tim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 #include "mfw_phb.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 #include "mfw_sms.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 #include "mfw_ss.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 #include "mfw_icn.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 #include "mfw_mnu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 #include "mfw_lng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 #include "mfw_sat.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 #include "mfw_kbd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 #include "mfw_nm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 #include "mfw_cm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 #include "dspl.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 #include "ksd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 #include "psa.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 #include "MmiDummy.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 #include "MmiMmi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 #include "MmiDialogs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 #include "MmiLists.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 #include "MmiMenu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 #include "MmiSoftKeys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 #include "MmiIdle.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 #include "cus_aci.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 #include "prim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 #ifndef PCM_2_FFS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 #include "pcm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 #endif
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 #include "mmiColours.h"
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 #include "ATBCommon.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 #include "ATBDisplay.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 #include "ATBEditor.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 #include "AUIEditor.h"
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 //data structure for punctuation symbols selection screen
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 typedef struct
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 {
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
112 T_MMI_CONTROL mmi_control;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
113 T_MFW_HND parent;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
114 T_MFW_HND win;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
115 T_ED_DATA *editor;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
116 T_MFW_HND kbd;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
118 T_AUI_EDITOR_DATA editor_data;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
119 USHORT cursor_position;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
120 USHORT output_symbol;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
121 USHORT return_event;
3
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 T_AUI_SYMBOL_INFO;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 //events in main editor screen
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 typedef enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 {
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
128 EDITOR_INIT,
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
129 EDITOR_DEINIT,
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
130 EDITOR_UPDATE
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 } T_SYMBOL_EVENTS;
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 **********************************************************************
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 DYNAMIC EDITOR WINDOW. DECLARATION
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 *********************************************************************
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 /* Local function protoypes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 static T_MFW_HND AUI_symbol_Create (T_MFW_HND parent);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 static int AUI_symbol_WinCb (T_MFW_EVENT event, T_MFW_WIN * win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 static int AUI_symbol_KbdCb (T_MFW_EVENT event, T_MFW_KBD *keyboard);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 static void AUI_symbol_ExecCb (T_MFW_HND win, USHORT event, USHORT value, void * symbol);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
152 $Function: AUI_symbol_Destroy
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
154 $Description: Destroy thesymbol screen
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
155
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
156 $Returns: None.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
158 $Arguments: window handle
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
159
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 void AUI_symbol_Destroy (T_MFW_HND window)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 {
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
164 T_MFW_WIN *win = ((T_MFW_HDR *)window)->data;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
165 T_AUI_SYMBOL_INFO *data = (T_AUI_SYMBOL_INFO *)win->user;
3
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 TRACE_FUNCTION ("AUI_symbol_Destroy()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 /* Send character to editor window */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
170
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
171 SEND_EVENT (data->parent, data->return_event, (SHORT)data->output_symbol, NULL);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
172
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 if (data)
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
174 { /*SPR 2520, need to destroy ATB editor*/
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
175 ATB_edit_Destroy( data->editor);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
176
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
177 /* Delete WIN Handler */
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
178 win_delete (data->win);
3
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 /* Free Memory */
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
181 FREE_MEMORY ((void *)data, sizeof (T_AUI_SYMBOL_INFO));
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
182 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 {
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
185 TRACE_EVENT ("AUI_symbol_Destroy() called twice");
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
186 return ;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
187 }
3
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
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
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
193 $Function: AUI_symbol_Start
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
195 $Description: Starts the symbol screen
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
196
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
197 $Returns: handle
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
199 $Arguments: parent window, editor data
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
200
3
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 T_MFW_HND AUI_symbol_Start (T_MFW_HND parent, USHORT return_event)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 T_MFW_HND win;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
205
3
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 TRACE_FUNCTION ("AUI_symbol_Start()");
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 win = AUI_symbol_Create (parent);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
210
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 if (win NEQ NULL)
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
212 {
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
213 SEND_EVENT (win, EDITOR_INIT, return_event, 0);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
214 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 return win;
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
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
221 $Function: LatinEditorcreate
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
223 $Description: Creation of a symbol screen
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
224
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
225 $Returns: handle of new window
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
227 $Arguments: parent window
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
228
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 static T_MFW_HND AUI_symbol_Create (T_MFW_HND parent)
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 T_AUI_SYMBOL_INFO * data = (T_AUI_SYMBOL_INFO *)ALLOC_MEMORY (sizeof (T_AUI_SYMBOL_INFO));
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 T_MFW_WIN * win;
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 TRACE_FUNCTION ("AUI_symbol_Create()");
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 /* Create window handler */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 data->win = winCreate (parent, 0, E_WIN_VISIBLE, (T_MFW_CB)AUI_symbol_WinCb);
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 if (data->win EQ NULL)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 return NULL;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 }
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 /* Connect the dialog data to the MFW-window */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
249 data->mmi_control.dialog = (T_DIALOG_FUNC)AUI_symbol_ExecCb;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
250 data->mmi_control.data = data;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
251 data->parent = parent;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
252 win = ((T_MFW_HDR *)data->win)->data;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
253 win->user = (void *)data;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
254
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
255 return data->win;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 /*******************************************************************************
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 $Function: AUI_symbol_ExecCb
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
263 $Description: handles events for symbol window
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
264
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
265 $Returns: None.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
267 $Arguments: window, event, value, editor data
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
268
3
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 static void AUI_symbol_ExecCb (T_MFW_HND win, USHORT event, USHORT value, void *parameter)
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 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
274 T_AUI_SYMBOL_INFO * data = (T_AUI_SYMBOL_INFO *)win_data->user;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
276 // T_MFW_HND parent_win = data->parent; // RAVI
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
277 // USHORT Identifier = data->editor_data.Identifier; // RAVI
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
278 // T_AUI_EDIT_CB Callback = data->editor_data.Callback; // RAVI
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
280 /* List of symbols */
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
281 /*SPR 1955, replaced 0xA3 sign with our ASCII code for it*/
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
282 /*SPR2175, added previously un-enterable symbols into symbol table*/
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
283 static char symStr[] = ". , ? ! : ; - + # * ( ) \' \" _ @ & $ \x9C % / < > = \x8F \x86 \xA5 \xA4 \x2 \x7 \x4 \x9D \xe8 \xE2 \xEF \xEA \xE3 \x5 \xe4 \xe9 \xF0 \x92 \x91 \x01 \xAD \xA8 \x06";
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
284
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 TRACE_FUNCTION ("AUI_symbol_ExecCb()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 switch (event)
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
288 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 case EDITOR_INIT:
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
290 /* Get the return event that has been passed */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
292 data->return_event = value;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
293
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 /* Create the keyboard handler */
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
295 data->kbd = kbdCreate (data->win, KEY_ALL,(T_MFW_CB)AUI_symbol_KbdCb);
3
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 /* Initialise editor variables */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
298
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
299 AUI_edit_SetDefault(&data->editor_data);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
300 AUI_edit_SetDisplay(&data->editor_data, ZONE_MIDDLE_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
301 AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_ASCII, (UBYTE *)symStr, strlen(symStr)+1);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
302 AUI_edit_SetMode(&data->editor_data, ED_MODE_ALPHA, ED_CURSOR_BLOCK);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
303 data->editor = ATB_edit_Create(&data->editor_data.editor_attr,0);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
304 ATB_edit_Init(data->editor);
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
305
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
306 ATB_edit_Char(data->editor, ctrlTop, TRUE);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 win_show(data->win);
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
308 break;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
309
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 case EDITOR_DEINIT:
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
311 AUI_symbol_Destroy (data->win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 default:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 break;
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 }
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
322 $Function: AUI_symbol_WinCb
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
324 $Description: Editor window event handler.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
325
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
326 $Returns: status int
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
328 $Arguments: event, window
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
329
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 static int AUI_symbol_WinCb (T_MFW_EVENT event, T_MFW_WIN * win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 T_AUI_SYMBOL_INFO * data = (T_AUI_SYMBOL_INFO *)win->user;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
335 TRACE_FUNCTION ("AUI_symbol__win_cb()");
3
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 if (!data)
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
338 {
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
339 return MFW_EVENT_CONSUMED;
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
340 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
341
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 switch (event)
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
343 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 case E_WIN_VISIBLE: /* window is visible */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 if (win->flags & E_WIN_VISIBLE)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 // Mar 23, 2005 REF: CRR 28490 xnkulkar
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
348 // Description: Golite- 5-way navigation behaves wrongly while selecting special characters
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
349 // in the text editor screen.The background screen goes blank when the special
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
350 // characters screen comes up.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
351 // Solution: Commented 'dspl_ClearAll()' to make the behaviour consistent with normal variant.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 //#ifndef COLOURDISPLAY
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 /* Clear Screen */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 // dspl_ClearAll();
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 //#endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 /* Print the information */
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
358 ATB_edit_Show(data->editor);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
359
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
360 // change by Sasken ( Deepa M D) on March 26th 2004
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
361 // Issue Number : MMI-SPR-12817
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
362 // Subject: Wrong softkey in the symbol table.
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
363 // Bug : While selecting the symbols in the editor
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
364 // for the sms write screen, the softkey dispalyed
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
365 // was "Options" instead of "Select"
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
366 // Solution: Commenting the compilation flags COLOURDISPLAY.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 //#ifndef COLOURDISPLAY
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 /* Print the softkeys */
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
369 displaySoftKeys(TxtSoftSelect, TxtSoftBack);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 //#endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 default:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 return MFW_EVENT_REJECTED;
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
375 }
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
376 return MFW_EVENT_CONSUMED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
382 $Function: AUI_symbol__kbd_cb
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
384 $Description: Symbol screen keyboard event handler
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
385
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
386 $Returns: None.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
388 $Arguments: event, keyborad data
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
389
3
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 static int AUI_symbol_KbdCb (T_MFW_EVENT event, T_MFW_KBD *keyboard)
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 T_MFW_HND win = mfw_parent (mfw_header());
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 T_AUI_SYMBOL_INFO * data = (T_AUI_SYMBOL_INFO *)win_data->user;
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 TRACE_FUNCTION ("AUI_symbol__kbd_cb()");
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 switch (keyboard->code)
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 /* Use left and right keys in colour display, not up and down */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
403
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404 #ifdef COLOURDISPLAY
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
405 case KCD_MNURIGHT:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406 ATB_edit_Char(data->editor,ctrlRight, FALSE);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 ATB_edit_Char(data->editor,ctrlRight, TRUE);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 ATB_edit_Show(data->editor);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 case KCD_MNULEFT:
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
412 ATB_edit_Char(data->editor,ctrlLeft, FALSE);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
413 ATB_edit_Char(data->editor,ctrlLeft, TRUE);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
414 ATB_edit_Show(data->editor);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 break;
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 case KCD_MNUUP:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418 ATB_edit_Char(data->editor,ctrlUp, TRUE);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 ATB_edit_Show(data->editor);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
422 case KCD_MNUDOWN:
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
423 ATB_edit_Char(data->editor,ctrlDown, TRUE);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
424 ATB_edit_Show(data->editor);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 #else
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
427 case KCD_MNUUP:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 ATB_edit_Char(data->editor,ctrlRight, FALSE);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 ATB_edit_Char(data->editor,ctrlRight, TRUE);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430 ATB_edit_Show(data->editor);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
433 case KCD_MNUDOWN:
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
434 ATB_edit_Char(data->editor,ctrlLeft, FALSE);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
435 ATB_edit_Char(data->editor,ctrlLeft, TRUE);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
436 ATB_edit_Show(data->editor);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440 #ifdef COLOURDISPLAY
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
441 case KCD_MNUSELECT:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 case KCD_LEFT:
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
444 data->output_symbol = ATB_string_GetChar(&data->editor_data.editor_attr.text, data->editor->cursor.pos);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
445 AUI_symbol_Destroy(data->win);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
446 return MFW_EVENT_CONSUMED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447 // break; // RAVI
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
449 case KCD_HUP:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450 case KCD_RIGHT:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451 data->output_symbol = NULL;
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
452 AUI_symbol_Destroy(data->win);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
453 return MFW_EVENT_CONSUMED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 // break; // RAVI
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
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
457 /* If we've landed on a space or an end-of-string, move cursor left */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
458
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
459 if ( ( ATB_edit_GetCursorChar(data->editor, 0)==UNICODE_SPACE
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
460 || ATB_edit_GetCursorChar(data->editor, 0)==UNICODE_EOLN )
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
461 && data->editor->cursor.pos>0 )
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
462 {
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
463 ATB_edit_Char(data->editor, ctrlLeft, TRUE);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
464 // Apr 27, 2004 REF: CRR MMI-SPR-12353 Rashmi C N(Sasken)
135
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
465 // When we encounter a white space the coordinates were updated but not the screen, hence an ATB_edit_Show is needed at this point
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
466 ATB_edit_Show(data->editor);
70ea7526b59e bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
467 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468 return MFW_EVENT_CONSUMED;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 }