annotate src/ui/bmi/mmiMain.c @ 99:8142e6773a49

mmiBlk*.h: bogotab fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 08 Nov 2020 08:33:36 +0000
parents 7160f0d005d2
children 00f4455e4c45
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
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
3 CONDAT (UK)
3
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)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 $Module: MMI
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 $File: MmiMain.c
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 $Revision: 1.0
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 $Author: Condat(UK)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 $Date: 22/02/01
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
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: MmiMain.c
66
74a034762083 mmiMain.c: white space initial preen
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 Nov 06, 2007 ER: OMAPS00151698 x0056422
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
32 Description:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
33 Solution 1) Need to suppress key beep sound for the commands that originated from the
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 BT headset and were simulated as key events. This is done by adding a check
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
35 for BMI_BT_HEADSET_COMMAND in keyAction function, and do nothing inside if
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
36 it is true.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
37
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
38 May 24, 2007 DR: OMAPS00132483 x0pleela
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
39 Description: MM: While playing an AAC, unplug USB freezes the audio
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
40 Solution: 1) Changed the function names to get and set the status of headset, usb insertion
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
41 and removal
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
42 2) In function globalmme(), removed the function call to get the phonelock status during
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
43 USB plug/unplug and headset plug/unplug event and inturn using a static variable
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
44 which gives the phonelock status. Replaced the function call mfw_get_phlock_status
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
45 with mfw_get_Phlock_status to get the phone lock status
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
46
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
47 Apr 03, 2007 ER: OMAPS00122561 x0pleela
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
48 Description: [ACI] Phone lock feature has to be supported by ACI
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
49 Solution: Phone Lock ER implementation
3
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 Mar 22, 2007 DVT: OMAPS00121916 x0039928(sumanth)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Description: T-Flash hot swap.
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
53
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 Jan 05, 2007 OMAPS00084665 x0039928(sumanth)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 Description: Boot time exceed UCSD estimations
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
56
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 Oct 30, 2006 ER:OMAPS00098881 x0039928(sumanth)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 Removal of power variant
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
59
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 Oct 30, 2006 ER:OMAPS00091029 x0039928(sumanth)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 Bootup time measurement
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 Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 Solution: NAPTUNE flag is removed from globalSignalUpdate().
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
67 Sep 11, 2006 DR: OMAPS00094182 xrashmic
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
68 Description: midi and mp3 files is not being populated on accessing corresponding menu, but only during bootup
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
69 Solution: Populate files on accessing the "browse files" list
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
70
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
71 xashmic 9 Sep 2006, OMAPS00092732
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
72 USBMS ER: Handles the connect and disconnect event.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
73
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
74 Aug 03, 2006 REF:OMAPS00088329 x0039928
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 Description : TTY> When TTY is ON Headset insertion detection / profile download should not happen
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 Solution : TTY ON condition is checked before downloading the headset profile.
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 Jun 09, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 Description : CPHS Roaming indication feature implementation
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
80 Solution : As part of the implementation, in this file, type of GlobalIconStatus is changed
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
81
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
82 Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
83 Description: Triton PG2.2 impacts on Locosto program
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
84 Solution: Software workaround is done to register headset-hook dynamically
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
85 during/before call is established and unregister it after the call is ended/disconnected.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
86
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
87 Apr 17, 2006 REF: ER OMAPS00075178 x0pleela
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
88 Description: When the charger connect to phone(i-sample), the charger driver works, but the MMI and App don't work
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
89 Solution: Defined new functions "charging_start_cb()": Callback after dialog "Charging" is displayed
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
90 and "charging_start_info()" : function to display the dialog "charging" when charger is connected
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
91 Handling battery/charger events in globalmme()
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
92
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
93 Nov 09, 2005 REF: DVT OMAPS00056873 xdeepadh
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
94 Description: Deactivating Bright Light on I-Sample
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
95 Solution: On Isample boards the backlight is set off, since the bright LEDS are very disturbing.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
96
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
97 xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
98 Description: Support for various audio profiles
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
99 Solution: The support for audio device's carkit/headset/loudspeaker/handheld.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
100 The audio device is enabled as per the user actions.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
101 Jul 05, 2005 REF: SPR 31894 xdeepadh
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
102 Description: Proposed chnages for Locosto-live sign off
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
103 Solution: UICC SIM API will be used for Locosto.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
104
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
105 x0018858 24 Mar, 2005 MMI-FIX-11321
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
106 Issue Description :- If the inbox is full and a new message is receivd, no indication is received.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
107 Fix: Added support for handling indication when message box is full and
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
108 there is a pending message.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
109 Apr 05, 2005 REF: ENH 29994 xdeepadh
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
110 Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
111 Solution: Generic Midi Ringer and Midi Test Application were implemented.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
112
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
113 Jan 07, 2005 REF: CRR 26394 xkundadu
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
114 Issue description:Logo of the operator not displayed
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
115 Solution: Set the network operator logo display option to enbled state.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
116
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
117 Oct 19, 2004 REF: CRR MMI-SPR-26002 xkundadu
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
118 Issue description: Golite booting problem.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
119 Solution: If the FFS is not formatted, prevent writing into the FFS.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
120
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
121 Aug 16, 2004 REF: CRR 24323 Deepa M.D
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
122 Bug:Clenup of sprintf used for tracing
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
123 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
124
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
125 Jul 22,2004 CRR:20896 xrashmic - SASKEN
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
126 Description: The current time format is not highlighted
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
127 Fix: The time format is written into flash. Instead of providing the submenu
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
128 directly we call a function where we set the menu and also higlight the
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
129 previously selected menu item
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
130
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
131
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
132 May 10, 2004 REF: CRR 15753 Deepa M.D
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
133 Menuitem provided to set the validity period to maximum.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
134
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
135 25/10/00 Original Condat(UK) BMI version.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
136
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 Dec 23, 2005 REF: SR13873 x0020906
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
138 Description: To stop playing ringtone when new sms arrives - when user is in any menu screen.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
139 Fix : Fix is done in keyAction ().
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
140
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 $End
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 #include <stdio.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 #define ENTITY_MFW
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 /* includes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 #include <string.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 #include <stdio.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 #include <stdlib.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 #include "typedefs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 #include "pei.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 #include "gdi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 #include "audio.h"
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 #include "mfw_sys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 #include "mfw_mfw.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 #include "mfw_kbd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 #include "mfw_tim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 #include "mfw_lng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 #include "mfw_win.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 #include "mfw_icn.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 #include "mfw_sim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 #include "mfw_nm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 #include "mfw_ffs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 /* SPR#1428 - SH - New Editor changes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 #ifndef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 #include "mfw_edt.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 #include "mfw_mnu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 #include "mfw_phb.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 #include "mfw_sms.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 #include "Mfw_td.h"/*SPR 1725*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 #ifdef SIM_TOOLKIT
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 #include "mfw_sat.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 #include "dspl.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 #include "p_mmi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 #include "message.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 #include "prim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 #include "aci_cmh.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 #include "mfw_mme.h"
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 #ifndef _SIMULATION_
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 /* BEGIN ADD: Neptune Alignment */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 #ifndef NEPTUNE_BOARD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 /* END ADD: Neptune Alignment */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 #include "sys_types.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 /* BEGIN ADD: Neptune Alignment */
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
199 #else
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 #include "bmi_integ_misc.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 /* END ADD: Neptune Alignment */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 #include "MmiMmi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 /* SPR#1428 - SH - New Editor changes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 #ifdef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 #include "ATBCommon.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 #include "ATBDisplay.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 #include "ATBEditor.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 #include "AUIEditor.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 #include "Mmiicons.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 #include "MmiPins.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 #include "MmiMain.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 #include "MmiDialogs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 #include "MmiIdle.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 #include "MmiStart.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 #include "mmiCall.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 #include "MmiSimToolkit.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 #include "MmiLists.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 #include "MmiSounds.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 #include "MmiResources.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 #include "MmiSettings.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 #include "MmiTimeDate.h"
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 #include "cus_aci.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 #include "prim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 #ifndef PCM_2_FFS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 #include "pcm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 #endif
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 /* OMAPS00151698, x0056422 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 #ifdef FF_MMI_A2DP_AVRCP
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 #include "mfw_bt_api.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 #include "mfw_bt_private.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 #endif
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 //x0pleela 21 Apr, 2006 DR: OMAPS00075178
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 //Removing the AUDIO_PROFILE flag as Mmicolours.h is also required for Battery/charger indication fix
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 //#ifdef FF_MMI_AUDIO_PROFILE
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 #include "MmiColours.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 //#endif
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
247 static MfwHnd times; /* clock via software timer */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
248 static MfwHnd times_switchoff; /* timer switch off (GB)*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
249
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
250 /* GLOBAL CONTROL DATA */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
251 LngInfo mainLngInfo; /* language control block */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
252 MfwHnd mainMmiLng; /* global language handler */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 //x0pleela 11 Apr, 2006 ER: OMAPS00075178
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 //Timer for battery charging animation
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
257 extern MfwHnd battery_charging_animate;
3
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 /* Taking idle data - RAVI - 23-12-2005 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260 #ifdef NEPTUNE_BOARD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 extern T_idle idle_data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263 /* END RAVI - 23-12-2005 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265 #ifndef _SIMULATION_
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 extern void AI_Power(SYS_UWORD8 power);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 #endif
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 #ifdef NEPTUNE_BOARD /* Removal of linker errors */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 void SIM_PowerOff (void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 static int keyAction (MfwEvt e, MfwKbd *res);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274 /* x0039928 - Lint warning removal
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 static int key (MfwEvt e, MfwKbd *kc); */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 static int timer (MfwEvt e, MfwTim *t);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 /* x0039928 - Lint warning removal
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 static void backlight (void); */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 static int timesEvent (MfwEvt e, MfwTim *t);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 static void showGoodBye (T_MFW_HND win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 static void goodbye_cb (void);
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
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
284 static MfwHnd mme; /* our MME manager */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 /* Jun 09, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 Description : CPHS Roaming indication feature implementation
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 Solution : As part of the implementation, type of GlobalIconStatus is changed from U16 to U32 as number of
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
289 bits in the variable is not sufficient to store details about all the icons*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 U32 GlobalIconStatus;
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
291 #if 0 /* removed in FreeCalypso */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 UBYTE globalMobileMode;
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
293 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 int MmiModule;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 // ADDED BY RAVI - 28-11-2005
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 EXTERN int flash_formatted(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 EXTERN void time_date_init(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 EXTERN void sms_cb_exit (void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 EXTERN void time_date_delete(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 EXTERN UBYTE getCurrentRingerSettings(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 EXTERN UBYTE CphsPresent(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 EXTERN void cphs_support_check(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 // END RAVI
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
306 /* batterie and signal start */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 int globalBatteryUpdate(U8 value);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 int globalSignalUpdate(U8 value);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
310 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 #ifdef FF_MMI_AUDIO_PROFILE
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 extern void mfw_audio_device_indication(U8 notify);
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
313 extern void mmi_hook_handle();
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 void mmi_device_status_info(T_MFW_HND parent, int str1, int str2, T_VOID_FUNC callback);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 #endif
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 UBYTE globalBatteryPicNumber;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 UBYTE globalSignalPicNumber;
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 UBYTE globalBatteryMode; /* */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 int globalMme(MfwEvt e, void *para);
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
323 /* batterie and signal end */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 /*MC SPR 1725 removed current clock and date variables*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 /* x0039928 - Lint warning removal
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 static LONG second; */
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
329 static U8 deregis = FALSE; /* status deregistration */
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 // SH 6/03/02 - HUPKeyOrigin is 1 if POWER_KEY is pressed in idle screen, 0 otherwise
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 // Means that long press of HUP key will go to idle screen, not just shut down
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 UBYTE HUPKeyOrigin;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
334 int off_switch; /* distinguish between on- and off switching to display a goodbye message*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 /* SPR877 - SH - set to TRUE if welcome animation has finished */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 extern UBYTE animation_complete;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 T_MFW_CFLAG_STATUS DivertStatus = MFW_CFLAG_NOTSet;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
339 #define TIME_MINUTE 60000
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
340 #define TIMEDOWN 120000L /* time for powerdown 2min */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
341 #define TIME_SWITCH_OFF 3000 /* switch off time delay */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 //Jul 05, 2005 REF: SPR 31894 xdeepadh
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
343 //The reader_id BSP_UICC_DEFAULT_READER_ID will be 0x01.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 #ifdef TI_PS_UICC_CHIPSET_15
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 #define BSP_UICC_DEFAULT_READER_ID 0x01
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 #endif
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 static UBYTE buffer[100];
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 /* Amounts to: 128 (format mode) + 8 (overwrite mode) */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 #ifdef FF_MMI_A2DP_AVRCP
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
353 extern BMI_BT_STRUCTTYPE tGlobalBmiBtStruct;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358 $Function:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
360 $Description: general editor control
3
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 $Returns: none.
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 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 /* SPR#1428 - SH - New Editor changes - this version of editControls used
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 * by new editor. The rest is now in AUITextEntry */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 #ifdef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
373 UBYTE editControls [KCD_MAX] = /* edit control keys: */
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 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 '*', '#', ctrlNone, ctrlNone, ctrlUp, ctrlDown, ctrlLeft, ctrlRight,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 ctrlNone, ctrlNone, ctrlEnter, ctrlNone, ctrlNone, ctrlNone,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 ctrlNone, ctrlNone, ctrlEnter
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 #else /* NEW_EDITOR */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
383 static MfwHnd myHandle = 0; /* editors handle */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
384 static MfwHnd editTim = 0; /* the editor timer */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
385 static char *formatHandle; // SH - pointer to format string, so that editEventKey can see it
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
386 static int *formatIndex; // SH - pointer to format index
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
387 static int *fieldIndex; // SH - pointer to field position
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
388 static char *tmpBuf; // SH - pointer to temporary buffer for hidden alphanumeric entry
3
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 #define KEY_PAD_MAX 5
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
392 UBYTE editControls [KCD_MAX] = /* edit control keys: */
3
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 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395 '*', '#', ecNone, ecNone, ecUp, ecDown, ecLeft, ecRight,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 ecNone, ecNone, ecEnter, ecNone, ecNone, ecNone,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397 ecNone, ecNone, ecEnter
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 };
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
400 static UBYTE editAlphaMode; /* alpha mode flag */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
401 static UBYTE editCalcMode; /* calculator mode flag */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
402 static UBYTE editFormatMode; /* format mode flag */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
403 static UBYTE editHiddenMode; /* hidden alphanumeric mode */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
404 static UBYTE editAlphaLevel; /* alpha level selected */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
405 static UBYTE editAlphaKey; /* alpha mode current key */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
406
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
407
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
408
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
409 static UBYTE editAlpha [12][KEY_PAD_MAX] = /* alpha mode characters */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
411 {'.','+','-','=','0'}, //0 key
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412 {' ','?','!','1',':'}, {'a','b','c','2',')'}, {'d','e','f','3','('}, // 1 2 3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413 {'g','h','i','4','$'}, {'j','k','l','5',' '}, {'m','n','o','6',','}, // 4 5 6
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
414 {'p','q','r','s','7'}, {'t','u','v','8',';'}, {'w','x','y','z','9'}, // 7 8 9
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 {'*','#','%','&',' '}, {' ','\'','\"','@','/'} // star and hash keys
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 };
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
418 static UBYTE editAlphaU [12][KEY_PAD_MAX] = /* upCase alpha mode characters*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
420 {'.','+','-','=','0'}, //0 key
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421 {' ','?','!','1',':'}, {'A','B','C','2',')'}, {'D','E','F','3','('}, // 1 2 3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 {'G','H','I','4','$'}, {'J','K','L','5',' '}, {'M','N','O','6',','}, // 4 5 6
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
423 {'P','Q','R','S','7'}, {'T','U','V','8',';'}, {'W','X','Y','Z','9'}, // 7 8 9
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
424 {'*','#','%','&',' '}, {' ','\'','\"','@','/'} // star and hash keys
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 };
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 int upCase= TRUE;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 static int editEventTim (MfwEvt e, MfwTim *t);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 static void editShowHeader (void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 #endif /* NEW_EDITOR */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436 #ifdef FF_MMI_AUDIO_PROFILE
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 extern T_call call_data;
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 NEPTUNE_BOARD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441 #ifdef MMI_POWER_MANAGEMENT_TEST
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
442 #define Bool unsigned char
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 EXTERN unsigned char Screen_Update;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444 EXTERN void SVC_SCN_EnablePM(Bool enable );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447 EXTERN MfwHnd timer_handle;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449 //x0pleela 19 Mar, 2007 ER: OMAPS00122561
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450 #ifdef FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451 static int ph_lock_status;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
453 #define ResetFlag 0x00 //toset any bit to zero
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
454 #define UsbMsEnum 0x01 //for USB MS enum/de-enum
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
455 #define HeadsetReg 0x02 //For Headset Plug/Unplug
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
457 //x0pleela 29 May, 2007 DR: OMAPS00132483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
458 EXTERN int mfw_get_Phlock_status(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459 EXTERN void mfw_set_Phlock_status( int phlock_status);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 EXTERN int mfw_get_Auto_Phlock_status(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461 EXTERN void mfw_set_Auto_Phlock_status( int phlock_status);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 //x0pleela 19 Mar, 2007 ER: OMAPS00122561
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 #ifdef FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 $Function: mmi_set_Headset_Reg
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
471 $Description: set /resets the HeadsetReg bit in ph_lock_status
3
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 $Returns: none.
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 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 //x0pleela 23 May, 2007 DR: OMAPS00132483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479 GLOBAL void mmi_set_Headset_Reg( int headset_reg)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
481 TRACE_FUNCTION("mmi_set_Headset_Reg()");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
482 if( headset_reg )
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
483 ph_lock_status |= HeadsetReg;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
484 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
485 ph_lock_status &= ResetFlag;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
486 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 $Function: mmi_get_Headset_Reg
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
493 $Description: returns the HeadsetReg status from ph_lock_status
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 //x0pleela 23 May, 2007 DR: OMAPS00132483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501 GLOBAL int mmi_get_Headset_Reg(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
503 TRACE_FUNCTION("mmi_get_Headset_Reg()");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
504 if( (ph_lock_status & HeadsetReg) == HeadsetReg)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
505 return TRUE;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
506 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
507 return FALSE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
509
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
510
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
511 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
513 $Function: mmi_set_usbms_enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
514
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
515 $Description: set /resets the UsbMsEnum bit in ph_lock_status
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
518
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
519 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
520
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
521 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522 //x0pleela 23 May, 2007 DR: OMAPS00132483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523 GLOBAL void mmi_set_usbms_enum( int usb_enum)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
525 TRACE_FUNCTION("mmi_set_usbms_enum()");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
526 if( usb_enum )
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
527 ph_lock_status |= UsbMsEnum;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
528 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
529 ph_lock_status &= ResetFlag;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
530 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
534
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
535 $Function: mmi_get_usbms_enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
536
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
537 $Description: returns the UsbMsEnum status from ph_lock_status
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
538
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
540
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
541 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
542
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 //x0pleela 23 May, 2007 DR: OMAPS00132483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545 GLOBAL int mmi_get_usbms_enum(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
546 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
547 TRACE_FUNCTION("mmi_get_usbms_enum()");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
548 if(( ph_lock_status & UsbMsEnum ) == UsbMsEnum)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
549 return TRUE;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
550 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
551 return FALSE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
552 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
553 #endif /*FF_PHONE_LOCK*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
554
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
555 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
556
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
557 $Function: mainInit
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
558
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
559 $Description: init MMI main module
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
560
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
561 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
562
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
563 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
565 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
566 void mainInit (UBYTE InitCause)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
567 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
568 int i;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
569 T_MFW_SMS_INFO sms_settings;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
570 //x0018858 24 Mar, 2005 MMI-FIX-11321
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
571 //added structures for storing the indication settings and CMER settings.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
572 T_ACI_MM_CIND_VAL_TYPE cindSettings;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
573 T_ACI_MM_CMER_VAL_TYPE cmerSettings;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574 TRACE_FUNCTION("maininit");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576 mfwSetSignallingMethod(1);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577 winAutoFocus(TRUE);
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
578 mfwSetFocus(0); /* reset focus */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
581 /*MC SPR 1111*/
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
582 /*MC check to see if language already selected and saved to FFS*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
583
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
584 // Oct 19, 2004 REF: CRR MMI-SPR-26002 xkundadu
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585 // Issue description: Golite booting problem.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586 // Solution: If the FFS is not formatted, dont write into the FFS.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587 // In that case just set the langauge to English and do the mmi
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
588 // layout settings.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
589 if(flash_formatted() == TRUE)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
590 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
591 if (flash_read() >= EFFS_OK)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
592 { TRACE_EVENT_P1("FFS_flashData.language: %d", FFS_flashData.language);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
593
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
594 /*MC SPR 1150 if language is not 0 and not greater than the maximum language code*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
595 if (FFS_flashData.language != NULL && FFS_flashData.language<= NO_OF_LANGUAGES)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
596 MmiRsrcSetLang(FFS_flashData.language);/*MC, change to stored language*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
597 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
598 MmiRsrcSetLang(ENGLISH_LANGUAGE);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
599
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
600 /*API - 28/07/03 - CQ10203 - If the flash value not set set to default VP_REL_24_HOURS*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
601 if((FFS_flashData.vp_rel != VP_REL_1_HOUR) &&
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
602 (FFS_flashData.vp_rel != VP_REL_12_HOURS) &&
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
603 (FFS_flashData.vp_rel != VP_REL_24_HOURS) &&
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
604 (FFS_flashData.vp_rel != VP_REL_1_WEEK)&&
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
605 (FFS_flashData.vp_rel != VP_REL_MAXIMUM)) // May 10, 2004 REF: CRR 15753 Deepa M.D
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
606 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
607 FFS_flashData.vp_rel = VP_REL_24_HOURS;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
608 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
609 /*API - 28/07/03 - CQ10203 - END */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
610
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
611 /*NDH - 13/01/04 - CQ16753 - Propogate the Validity Period Settings to the ACI */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
612 sms_settings.vp_rel = FFS_flashData.vp_rel;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
613 (void)sms_set_val_period(&sms_settings);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
614 /*NDH - 13/01/04 - CQ16753 - END */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
615 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
616 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
617 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
618 /* GW If flash read fails set up default settings. */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
619 /* This will also save the settings to flash */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
620 memset(&FFS_flashData, 0x00, sizeof(FFS_flashData));
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
621 /*default language is english*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
622 setUserSettings2Default();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
623 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
624 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
625 // Oct 19, 2004 REF: CRR MMI-SPR-26002 xkundadu
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626 // Issue description: Golite booting problem.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 // Solution: If the FFS is not formatted, dont write into the FFS.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 // In that case just set the langauge to English and mmi
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
629 // layout settings.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
630 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
631 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
632 // Set the default language to English.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
633 MmiRsrcSetLang(ENGLISH_LANGUAGE);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
634
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
635 // Jan 07, 2005 REF: CRR 26394 xkundadu
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
636 // Issue description:Logo of the operator not displayed
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
637 // Solution: Set the network operator logo display option to enbled state.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
638 // Set other user settings also to default values.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
639
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
640 #ifndef MMI_LITE
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
641 memset(&FFS_flashData, 0x00, sizeof(FFS_flashData));
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
642 setUserSettings2Default();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
643 #endif
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
644 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 /*mc end*/
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
646 HUPKeyOrigin = 0; // sbh
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
647 off_switch=0; /* 0 is stands for mobile is swiched on */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
648 animation_complete = FALSE;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
649
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
650 kbdAlways((MfwCb)keyAction); /* global keyboard access */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
651 kbdTime(2000,1000,400); /* long / repeat timeouts */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
652
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 mainMmiLng = lngCreate(0,0,&mainLngInfo,0); /* language handler */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
655 // times clock event
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
656
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
657 /*OMAPS00098881 (removing power variant) - a0393213(Prabakar)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
658 Removed #ifndef FF_POWER_MANAGEMENT.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
659 Timer is created irrespective of LCD refresh state.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
660 It would be started when LCD refresh is needed else it would be stopped*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661 times = timCreate(0,TIME_MINUTE,(MfwCb)timesEvent);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
663
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
664 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
665 // additional events addes for carkit and headset
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666 //xashmic 9 Sep 2006, OMAPS00092732
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
667 //Added MfwMmeUSBMS for handling USB MS events
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
668 #if defined(FF_MMI_AUDIO_PROFILE) && defined( FF_MMI_USBMS)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
669 mme = mmeCreate(0, MfwMmeSignal|MfwMmeBattery|MfwMmeBaState|MfwMmeHeadset|MfwMmeCarkit|MfwMmeUSBMS, (MfwCb)globalMme);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
670 #else
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671 #ifdef FF_MMI_AUDIO_PROFILE
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
672 mme = mmeCreate(0, MfwMmeSignal|MfwMmeBattery|MfwMmeBaState|MfwMmeHeadset|MfwMmeCarkit, (MfwCb)globalMme);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673 #else
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
674 #ifdef FF_MMI_USBMS
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
675 mme = mmeCreate(0, MfwMmeSignal|MfwMmeBattery|MfwMmeBaState|MfwMmeUSBMS, (MfwCb)globalMme);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
676 #else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
677 mme = mmeCreate(0, MfwMmeSignal|MfwMmeBattery|MfwMmeBaState, (MfwCb)globalMme);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
678 #endif
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
679 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
680 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
681
84
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
682 mme_backlightOnEvent();
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
683
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
684 //x0018858 24 Mar, 2005 MMI-FIX-11321
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
685 //Added two functions to set the indication and CMER values.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
686 //begin
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
687 sms_set_cind_values(&cindSettings);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
688 sms_set_cmer_values(&cmerSettings);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
689 //end.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
690
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
691 //RM test 14-07 second = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
692 /*SPR 1725, replace FFS clock data with RTC*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694 /*OMAPS00098881 (removing power variant) a0393213(R.Prabakar)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
695 Removed #ifndef FF_POWER_MANAGEMENT flag*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
696 time_date_init();
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
698 deregis = FALSE;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
699
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
700 /*OMAPS00098881 (removing power variant) a0393213(R.Prabakar)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
701 If FF_POWER_MANAGEMENT is not enabled the timer is started only when the lcd refresh is needed*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
702 #ifndef FF_POWER_MANAGEMENT
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
703 timStart(times); /* start clock */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
704 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
705 if(FFS_flashData.refresh==1)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
706 timStart(times);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
707 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
708
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
709 startExec(PhoneInit,0); /* get it rolling */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
711 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
712
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
714
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715 $Function: mainExit
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
716
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
717 $Description: exit MMI main module
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
718
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
721 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
724 void mainExit (UBYTE InitCause)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
725 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
726 TRACE_FUNCTION("mainExit");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
727
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
728 startExit();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
729 sim_exit(); /* finit SIM handler */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
730 lngDelete(mainMmiLng); mainMmiLng = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
731 timDelete(times);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
732 sms_cb_exit ();/*MC SPR1920 clean up cell broadcast*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
733 mmeDelete(mme); mme = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
734 kbdAlways(0);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
735 dspl_ClearAll();
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
736 time_date_delete();/*SPR 1725*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
737 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
738
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
739 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
740
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
741 $Function: keyAction
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
742
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
743 $Description: handler called on every keyboard action
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
744
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
745 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
746
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
747 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
748
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
749 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
750 static int keyAction (MfwEvt e, MfwKbd *res)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
751 {
80
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
752 int res_int = (int) res;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
753
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
754 /* this mask is use to filter the keyevent "e" */
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
755 /* want to use KEY_0, KEY_1,...... KEY_HASH */
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
756 USHORT mask = 0x0FFF;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
757 UBYTE currentRinger;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
758
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
759 /*
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
760 * Only do anything when we are called at the beginning of
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
761 * sigDistribute() in mfw_kbd.c, rather than at the end.
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
762 */
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
763 if (res_int != -1)
84
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
764 return 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
765
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
766 /* terminate the ringing in all situation (it doesnt matter where the user is */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
767 if ( (e & KEY_HUP) && (e & KEY_MAKE) )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
768 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
769 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
770 /* terminate the ringing */
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
771 #ifndef FF_MIDI_RINGER
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
772 currentRinger = getCurrentRingerSettings();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
773 audio_StopSoundbyID( AUDIO_BUZZER, currentRinger );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
774 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
775
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
776 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
777
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
778 /* the power-off-key ! */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
779 if ( (e & KEY_POWER) && (e & KEY_MAKE))
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
780 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
781 TRACE_EVENT("KEY_POWER pressed !!!!");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
782
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
783 if (pinsIsFocussed() EQ FOCUSSED_PINS)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
784 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
785 pin_exit();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
786 HUPKeyOrigin=1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
787 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
788 else if (idleIsFocussed())
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
789 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
790 HUPKeyOrigin=1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
791 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
792
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
793 if ((HUPKeyOrigin==1) && (off_switch == 0))
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
794 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
795 /*
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
796 ** Only pass through this once, off_switch must be 0 because Key_Action is called twice
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
797 ** for each key press.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
798 */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
799 TRACE_EVENT("In idle window.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
800 showGoodBye ( idle_get_window () );
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
801 times_switchoff = timCreate(0,THREE_SECS,(MfwCb)goodbye_cb);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
802 timStart(times_switchoff);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
803 off_switch++;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
804 deregis = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
805 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
807
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
808 HUPKeyOrigin = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
809
84
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
810 /* FreeCalypso backlight handling */
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
811 if (e & KEY_MAKE) {
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
812 if (mme_backlightKeyPress())
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
813 return 1;
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
814 } else {
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
815 mme_backlightOnEvent();
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
816 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
817
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
818 #ifdef SIM_TOOLKIT
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
819 /*SPR#2121 - DS - Only download event to SAT if the event has been registered
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 * by the SAT Setup Event List command
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
822 if (satEvtRegistered(SatEvtUserActionActivated) == TRUE)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
823 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
824 satEvtDownload(SatEvtUserAction);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
825 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
826 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
827
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
828 if ((FFS_flashData.settings_status & SettingsKeypadClick) && (e & KEY_MAKE))
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
829 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
830 TRACE_EVENT ("Keypad Click activ");
80
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
831 audio_PlaySoundID(0, TONES_KEYBEEP, 200, AUDIO_PLAY_ONCE );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
832 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
833 else if ((FFS_flashData.settings_status & SettingsKeypadDTMF) && (e & KEY_MAKE))
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
834 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
835 TRACE_EVENT ("Keypad DTMF activ");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
836 switch (e &= mask)
80
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
837 {
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
838 case KEY_0:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
839 audio_PlaySoundID(0, TONES_DTMF_0, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
840 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
841 case KEY_1:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
842 audio_PlaySoundID(0, TONES_DTMF_1, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
843 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
844 case KEY_2:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
845 audio_PlaySoundID(0, TONES_DTMF_2, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
846 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
847 case KEY_3:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
848 audio_PlaySoundID(0, TONES_DTMF_3, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
849 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
850 case KEY_4:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
851 audio_PlaySoundID(0, TONES_DTMF_4, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
852 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
853 case KEY_5:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
854 audio_PlaySoundID(0, TONES_DTMF_5, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
855 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
856 case KEY_6:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
857 audio_PlaySoundID(0, TONES_DTMF_6, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
858 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
859 case KEY_7:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
860 audio_PlaySoundID(0, TONES_DTMF_7, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
861 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
862 case KEY_8:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
863 audio_PlaySoundID(0, TONES_DTMF_8, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
864 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
865 case KEY_9:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
866 audio_PlaySoundID(0, TONES_DTMF_9, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
867 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
868 case KEY_STAR:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
869 audio_PlaySoundID(0, TONES_DTMF_STAR, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
870 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
871 case KEY_HASH:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
872 audio_PlaySoundID(0, TONES_DTMF_HASH, 0, AUDIO_PLAY_ONCE );
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
873 break;
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
874 default:
46bab586c09b mmiMain.c:keyAction() handler cleanup
Mychaela Falconia <falcon@freecalypso.org>
parents: 69
diff changeset
875 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
876 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
877 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
878
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
879 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
880 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
881
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
882 #if(0)/* x0039928 -Lint warning removal */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
883 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
884
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
885 $Function: key
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
886
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
887 $Description: keyboard event handler
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
888
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
889 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
890
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
891 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
892
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
893 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
894 // switching the mobile on
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
895 static int key (MfwEvt e, MfwKbd *kc)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
896 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
897
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
898 TRACE_FUNCTION("Initial key");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
899 //---------------start : Mobile On-------------------
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
900 TRACE_EVENT(" Mobile ON");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
901 /* set the state of mobile on */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
902 globalMobileMode = (globalMobileMode | GlobalMobileOn);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
903
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
904
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
905 //startExec(PhoneInit,0); /* get it rolling */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
906
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
907 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
908 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
909
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
910 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
911 //Callback after dialog "Charging" is displayed
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
912 //x0pleela 14 Apr, 2006 ER: OMAPS00075178
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
913 static void charging_start_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
914 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
915 TRACE_FUNCTION("charging_start_cb()");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
916 /*
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
917 ** Send an Idle Update to trigger the idle screen to be updated if required,
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
918 */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
919 idleEvent(IdleUpdate);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
920
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
921 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
922 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
923
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
924 //function to display the dialog "charging" when charger is connected
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
925 //x0pleela 14 Apr, 2006 ER: OMAPS00075178
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
926 static void charging_start_info(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
927 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
928 T_DISPLAY_DATA display_info;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
929
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
930 TRACE_FUNCTION("charging_start_info()");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
931
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
932 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtCharging, TxtNull, COLOUR_STATUS);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
933 /*a0393213 warnings removal-callback fn typecasted*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
934 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)charging_start_cb, TWO_SECS, KEY_CLEAR );
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
935 /*
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
936 * Call Info Screen
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
937 */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
938 info_dialog (idle_get_window(), &display_info);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
939
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
940
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
941 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
942 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
943 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
944
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
945 $Function: globalMme
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
946
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
947 $Description: MME event handler
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
948
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
949 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
950
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
951 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
952
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
953 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
954 int globalMme(MfwEvt e, MfwHnd para)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
955 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
956 MfwMme* mc = (MfwMme*)para;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
957
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
958 U8 value;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
959 #ifdef FF_MMI_AUDIO_PROFILE
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
960 MfwHnd win = call_data.win_incoming;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
961 MfwWin * win_data ;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
962 T_dialog_info * data;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
963 T_MFW_HND parent_win = NULL;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
964 USHORT Identifier = 0;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
965 void (* Callback)() = NULL;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
966
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
967 if( win != NULL)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
968 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
969 win_data = (MfwWin*)((T_MFW_HDR *)win)->data;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
970 data = (T_dialog_info *)win_data->user;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
971 parent_win = data->parent_win;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
972 Identifier = data->Identifier;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
973 Callback= data->Callback;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
974 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
975 #endif
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
976
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
977 TRACE_FUNCTION("globalMme");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
978
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
979 switch(e) {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
980 case MfwMmeSignal :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
981 TRACE_EVENT("Mme Event: Signal");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
982 value = (U8)mc->value;//JVJE
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
983 /***************************Go-lite Optimization changes Start***********************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
984 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
985 TRACE_EVENT_P1 ("Event MfwMmeSignal %d", value);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
986 /***************************Go-lite Optimization changes end***********************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
987 globalSignalUpdate(value); /*Update the value of the fieldstrength */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
988 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
989
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
990 case MfwMmeBattery:
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
991 TRACE_EVENT("Mme Event: Battery....");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
992 TRACE_EVENT_P1("MfwMmeBattery:mc->value: %d", mc->value);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
993 globalBatteryUpdate(mc->value); //x0pleela 10 Apr, 2006 ER: OMAPS00075178
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
994 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
995
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
996 case MfwMmeBaState:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
997 TRACE_EVENT("Mme Event: State....");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
998
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
999 value = (U8)mc->value;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1000 TRACE_EVENT_P1("MfwMmeBaState:mc->value: %d", mc->value);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1001 switch(value)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1002 {
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1003 case BATT_EVENT_CHARGER_PLUG:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1004 TRACE_EVENT("Mme Event:PWR_CHG_PLUG");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1005 charging_start_info();
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1006 break;
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1007 case BATT_STATE_NO_CHARGING:
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1008 case BATT_STATE_CHARGING:
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1009 case BATT_STATE_CHARGING_COMPLETE:
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1010 TRACE_EVENT_P1("MfwMmeBaState change to %d", value);
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1011 globalBatteryMode = value;
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1012 if (value != BATT_STATE_CHARGING)
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1013 timStop(battery_charging_animate);
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1014 idleEvent(IdleUpdate);
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1015 break;
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1016 default:
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1017 break;
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1018 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1019 break;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1020 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1021 #ifdef FF_MMI_AUDIO_PROFILE
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1022 //indicates the events related to the headset
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1023 case MfwMmeHeadset:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1024 // Aug 03, 2006 REF:OMAPS00088329 x0039928
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1025 #ifdef MMI_TTY_ENABLED
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1026
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1027 if(FFS_flashData.ttyAlwaysOn == FALSE && call_data.tty == CALL_TTY_OFF)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1028
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1029 #endif
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1030 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1031 value = (U8)mc->value;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1032 switch(value)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1033 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1034 case AUDIO_HEADSET_HOOK_DETECT:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1035 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1036 TRACE_EVENT("AUDIO_HEADSET_HOOK_DETECT");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1037 if( winIsFocussed(call_data.win_incoming))
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1038 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1039 dialog_info_destroy(win);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1040 if(Callback != NULL) /* x0039928 - Lint warning fix */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1041 (Callback)(parent_win,Identifier, INFO_KCD_LEFT);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1042 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1043 else if(call_data.win)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1044 mmi_hook_handle();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1045 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1046 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1047 case AUDIO_HEADSET_UNPLUGGED:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1048 TRACE_EVENT("AUDIO_HEADSET_UNPLUGGED");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1049 //x0pleela 20 Mar, 2007 ER: OMAPS00122561
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1050 #ifdef FF_PHONE_LOCK
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1051 //Set headset connect to FALSE
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1052 mmi_set_Headset_Reg(FALSE);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1053
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1054 //x0pleela 23 May, 2007 DR: OMAPS00132483
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1055 //get the phone lock status
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1056 if( !mfw_get_Phlock_status() )
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1057 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1058 #endif /*FF_PHONE_LOCK*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1059
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1060 mmi_device_status_info(NULL,TxtHeadset,TxtRemoved,NULL);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1061 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1062 // Fix: Hook is unregistered when headset is plugged off.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1063 mfw_hook_unregister();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1064
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1065 //x0pleela 20 Mar, 2007 ER: OMAPS00122561
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1066 #ifdef FF_PHONE_LOCK
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1067 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1068 #endif /*FF_PHONE_LOCK*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1069
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1070 mfw_audio_device_indication(value);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1071 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1072
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1073 case AUDIO_HEADSET_PLUGGED:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1074 TRACE_EVENT("AUDIO_HEADSET_PLUGGED");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1075 //x0pleela 20 Mar, 2007 ER: OMAPS00122561
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1076 #ifdef FF_PHONE_LOCK
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1077 //set headset connect to TRUE
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1078 mmi_set_Headset_Reg(TRUE);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1079
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1080 //x0pleela 23 May, 2007 DR: OMAPS00132483
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1081 //get the phone lock status
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1082 if( !mfw_get_Phlock_status() )
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1083 #endif /*FF_PHONE_LOCK*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1084
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1085 mmi_device_status_info(NULL,TxtHeadset,TxtInserted,NULL);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1086
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1087 mfw_audio_device_indication(value);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1088
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1089 //x0pleela 20 Mar, 2007 ER: OMAPS00122561
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1090 #ifdef FF_PHONE_LOCK
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1091 //x0pleela 23 May, 2007 DR: OMAPS00132483
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1092 //get the phone lock status
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1093 if( !mfw_get_Phlock_status() )
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1094 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1095 #endif /*FF_PHONE_LOCK*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1096 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1097 // Fix: Hook is registered when headset is plugged in during call.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1098 if(call_data.win_calling OR call_data.win_incoming OR call_data.calls.numCalls)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1099 mfw_hook_register();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1100
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1101 //x0pleela 20 Mar, 2007 ER: OMAPS00122561
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1102 #ifdef FF_PHONE_LOCK
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1103 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1104 #endif /*FF_PHONE_LOCK*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1105 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1106 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1107 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1108
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1109 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1110 //indicates the events related to the carkit
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1111 case MfwMmeCarkit:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1112 value = (U8) mc->value;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1113 switch(value)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1114 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1115 case AUDIO_CARKIT_UNPLUGGED:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1116 TRACE_EVENT("AUDIO_CARKIT_UNPLUGGED");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1117 mmi_device_status_info(NULL,TxtCarkit,TxtRemoved,NULL);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1118 mfw_audio_device_indication(value);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1119 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1120 case AUDIO_CARKIT_PLUGGED:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1121 TRACE_EVENT("AUDIO_CARKIT_PLUGGED");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1122 mmi_device_status_info(NULL,TxtCarkit,TxtInserted,NULL);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1123 mfw_audio_device_indication(value);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1124 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1125 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1126 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1127 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1128 //Handler for connect and disconnect event of the USB cable.
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1129 #ifdef FF_MMI_USBMS
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1130 case MfwMmeUSBMS:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1131 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1132 value = (U8) mc->value;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1133 switch(value)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1134 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1135 case MFW_USB_CABLE_CONNECT_EVENT :
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1136 //x0pleela 16 Mar, 2007 ER: OMAPS00122561
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1137 #ifdef FF_PHONE_LOCK
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1138 //set usb_ms_enum to TRUE
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1139 mmi_set_usbms_enum( TRUE);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1140 //x0pleela 23 May, 2007 DR: OMAPS00132483
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1141 //get the phone lock status
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1142 if( !mfw_get_Phlock_status() )
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1143 #endif /*FF_PHONE_LOCK*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1144
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1145 mmi_usb_enumeration_options();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1146 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1147
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1148 case MFW_USB_CABLE_DISCONNECT_EVENT :
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1149 //x0pleela 16 Mar, 2007 ER: OMAPS00122561
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1150 #ifdef FF_PHONE_LOCK
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1151 //set usb_ms_enum to FALSE
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1152 mmi_set_usbms_enum( FALSE );
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1153 //x0pleela 23 May, 2007 DR: OMAPS00132483
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1154 //get the phone lock status
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1155 if( !mfw_get_Phlock_status() )
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1156 #endif /*FF_PHONE_LOCK*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1157
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1158 mmi_usbms_mode_disconnect();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1159 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1160 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1161 #ifdef FF_MMI_FILEMANAGER
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1162 case MFW_TFLASH_INSERTED_EVENT:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1163 mmi_device_status_info(NULL,TxtTflash,TxtInserted,NULL);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1164 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1165 case MFW_TFLASH_REMOVED_EVENT:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1166 mmi_device_status_info(NULL,TxtTflash,TxtRemoved,NULL);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1167 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1168 #endif
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1169 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1170
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1171 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1172 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1173 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1174
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1175 default:
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1176 return 1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1177 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1178 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1179 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1180
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1181 #if(0) /* x0039928 - Lint warning removal */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1182 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1183
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1184 $Function: backlight
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1185
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1186 $Description: switch on backlight for certain time
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1187
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1188 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1189
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1190 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1191
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1192 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1193 static void backlight (void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1194 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1195
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1196
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1197 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1198 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1199 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1200
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1201 $Function: timesEvent
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1202
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1203 $Description: times event clock
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1204
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1205 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1206
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1207 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1208
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1209 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1210 static int timesEvent (MfwEvt e, MfwTim *t)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1211 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1212
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1213 //RM only for PC testing
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1214 /* x0039928 -Lint warning removal
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1215 second += 60; */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1216
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1217
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1218 idleEvent(IdleUpdate);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1219
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1220 /*MC CONQUEST 5999->6007,21/05/02 if CPHS reading didn't work on switch-on, try again*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1221 if (CphsPresent() == CPHS_ERR)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1222 cphs_support_check();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1223
84
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
1224 /* removed in FreeCalypso */
7160f0d005d2 first stage of actual FreeCalypso backlight rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 80
diff changeset
1225 /* mme_backlightEvent(BL_IDLE_TIMER); */
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1226
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1227 timStart(times);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1228
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1229 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1230 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1231
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1232
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1233 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1234
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1235 $Function: showCLOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1236
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1237 $Description: display clock
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1238
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1239 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1240
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1241 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1242
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1243 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1244 void showCLOCK(void)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1245 { /*SPR 1725, use new function to get clock string*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1246 dspl_TextOut(30,24,0,(char *)mfw_td_get_clock_str());
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1247 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1248 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1249
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1250 $Function: setClockFormat
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1251
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1252 $Description: used to switch between 24 hour and 12 hour display format
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1253
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1254 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1255
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1256 $Arguments: format enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1257
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1258 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1259 void setClockFormat(UBYTE format)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1260 {/*SPR 1725, use new function to set clock format*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1261 if (format == MFW_TIME_FORMAT_12HOUR)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1262 FFS_flashData.time_format = MFW_TIME_FORMAT_12HOUR;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1263 else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1264 FFS_flashData.time_format = MFW_TIME_FORMAT_24HOUR;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1265 // Jul 22,2004 CRR:20896 xrashmic - SASKEN
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1266 // The timeformat was not being written into the flash.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1267 flash_write();
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1268
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1269 mfw_td_set_time_format((T_MFW_TIME_FORMAT)format);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1270 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1271 // Issue Number : MMI-SPR-12159 on 07/04/04 by Rashmi C N and Deepa M D
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1272 // change by Sasken ( Rashmi C N and Deepa M D) on April 07th 2004
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1273 // Bug : The AM PM for 12 hour fomrat was not being shown
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1274 // Solution : Added the following function to get the current time format from flash
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1275 UBYTE getClockFormat()
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1276 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1277 return FFS_flashData.time_format;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1278 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1279
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1280 /*SPR 1725, removed ClockSet and DateSet functions*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1281
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1282 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1283
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1284 $Function: showDATE
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1285
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1286 $Description: display date
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1287
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1288 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1289
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1290 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1291
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1292 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1293 void showDATE(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1294 {/*SPR 1725, use new function to get date string*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1295 dspl_TextOut(0,10,0,mfw_td_get_date_str());
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1296
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1297 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1298
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1299
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1300 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1301
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1302 $Function: displayAlignedText
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1303
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1304 $Description: Display text horizontally aligned [left|right|center] in specified row.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1305
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1306
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1307 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1308
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1309 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1310
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1311 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1312 void displayAlignedText( T_MMI_ALIGN x_alignment, USHORT y_lineNum, UBYTE attrib, char* string )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1313 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1314 int stringLength = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1315 USHORT startXPos = 0; // starting X pos for display
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1316
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1317 dspl_DevCaps deviceCaps;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1318
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1319 dspl_GetDeviceCaps(&deviceCaps);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1320
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1321 /* SPR#1983 - SH - Shouldn't use strlen for unicode string.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1322 * 0 means whole string will be used. */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1323
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1324 stringLength = (int)dspl_GetTextExtent(string, 0);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1325
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1326 TRACE_EVENT_P2("aligned %d, extent = %d", x_alignment, stringLength);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1327
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1328 switch ( x_alignment ) {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1329 case LEFT:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1330 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1331
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1332 case RIGHT:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1333 startXPos = (USHORT) deviceCaps.Width - stringLength /*- OneCharLen*/ ;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1334 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1335
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1336 case CENTER:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1337 startXPos = (USHORT) (deviceCaps.Width - stringLength) / 2;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1338 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1339 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1340
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1341 dspl_TextOut(startXPos, y_lineNum, attrib, (char*)string );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1342 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1343 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1344
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1345 $Function: displayAlignedPrompt
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1346
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1347 $Description: Display prompt horizontally aligned [left|right|center] in specified row.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1348
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1349 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1350
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1351 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1352
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1353 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1354 void displayAlignedPrompt( T_MMI_ALIGN x_alignment, USHORT y_lineNum, UBYTE attrib, int string_id )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1355 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1356 int stringLength = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1357 USHORT startXPos = 0; // starting X pos for display
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1358
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1359 dspl_DevCaps deviceCaps;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1360
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1361 dspl_GetDeviceCaps(&deviceCaps);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1362
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1363
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1364 /* Marcus: Issue 1123: 12/09/2002: Replaced use of strlen with dspl_str_length for Unicode */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1365 stringLength=dspl_str_length((char*)MmiRsrcGetText( string_id ));
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1366 switch ( x_alignment )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1367 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1368 case LEFT:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1369
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1370 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1371
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1372 case RIGHT:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1373 startXPos = (USHORT) deviceCaps.Width - stringLength /*- OneCharLen*/ ;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1374 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1375
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1376 case CENTER:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1377 startXPos = (USHORT) (deviceCaps.Width - stringLength) / 2;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1378 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1379
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1380 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1381
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1382 PROMPT(startXPos, y_lineNum, attrib, string_id );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1383 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1384 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1385
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1386 $Function: mainShutdown
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1387
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1388 $Description:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1389
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1390 $Returns: none.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1391
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1392 $Arguments:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1393
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1394 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1395 void mainShutdown(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1396 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1397
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1398 TRACE_FUNCTION("mainShutdown ()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1399
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1400 if(deregis)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1401 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1402 //---------------start: Mobile OFF-------------------
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1403 TRACE_EVENT(" Mobile OFF");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1404 /* delete the state of mobile on */
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1405 #if 0 /* removed in FreeCalypso */
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1406 globalMobileMode = globalMobileMode & (~GlobalMobileOn);
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1407 #endif
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1408
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1409 deregis = FALSE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1410
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1411 mmiExit();/* RM 20-07 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1412
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1413 //Jul 05, 2005 REF: SPR 31894 xdeepadh
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1414 // SIM functionality has been replaced by UICC in Locosto.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1415 #ifdef TI_PS_UICC_CHIPSET_15
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1416 simdrv_poweroff(BSP_UICC_DEFAULT_READER_ID);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1417 #else
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1418 SIM_PowerOff();
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1419 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1420 #ifndef _SIMULATION_
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1421 AI_Power(0);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1422 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1423
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1424 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1425 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1426 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1427
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1428 $Function: globalBatteryUpdate
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1429
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1430 $Description: Update the value of the battery after the MME event
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1431
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1432 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1433
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1434 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1435
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1436 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1437 int globalBatteryUpdate (U8 value)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1438 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1439
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1440 MmiModuleDel (ModuleBattLow); /* delete the state */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1441
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1442 switch (value)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1443 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1444 case 0: /* battery low */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1445 globalBatteryPicNumber = 0;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1446
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1447 /* is just a global status */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1448 MmiModuleSet (ModuleBattLow); /* set the state */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1449 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1450
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1451 case 1:
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1452 globalBatteryPicNumber = 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1453 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1454
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1455 case 2:
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1456 globalBatteryPicNumber = 2;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1457 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1458
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1459 case 3:
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1460 globalBatteryPicNumber = 3;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1461 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1462
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1463 case 4:
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1464 globalBatteryPicNumber = 4;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1465 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1466
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1467 default:
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1468 globalBatteryPicNumber = 2;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1469 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1470 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1471
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1472 idleEvent(IdleUpdate);
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1473
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1474 return 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1475 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1476
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1477
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1478 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1479
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1480 $Function: globalSignalUpdate
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1481
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1482 $Description:Update the value of the fieldstrength after the MME event
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1484 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1485
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1486 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1487
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1488 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1489 int globalSignalUpdate (U8 value)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1490 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1491
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1492 globalSignalPicNumber = value;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1493
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1494 idleEvent(IdleUpdate);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1495 #ifdef NEPTUNE_BOARD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1496 dspl_Enable(1);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1497 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1498 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1499 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1500
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1501
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1502
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1503 #if 0 /* removed in FreeCalypso */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1504 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1505
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1506 $Function: globalFlashBattery
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1507
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1508 $Description: exit MMI main module
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1509
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1510 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1511
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1512 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1513
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1514 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1515 void globalFlashBattery (void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1516 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1517 TRACE_EVENT(" globalFlashBattery ");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1518
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1519 globalBatteryPicNumber++;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1520
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1521 if(globalBatteryPicNumber > 4)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1522 globalBatteryPicNumber = 0;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1523
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1524 idleEvent(IdleUpdate);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1525 TRACE_EVENT(" start the timer for Blink ");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1526 }
69
77321341946c first-pass implementation of UI to FCHG connection
Mychaela Falconia <falcon@freecalypso.org>
parents: 66
diff changeset
1527 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1528
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1529 /* SPR#1428 - SH - New Editor: this is all obsolete with new editor. Equivalent
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1530 * functionality can be found in AUITextEntry.c */
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1531
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1532 #ifndef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1533 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1534
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1535 $Function: editShowHeader
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1536
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1537 $Description: displays the new character over the cursor
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1538
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1539 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1540
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1541 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1542
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1543 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1544 /*MC SPR 1242 merged in b-sample version of this function */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1545 static void editShowHeader (void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1546 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1547 int alphachar;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1548 MfwEdt *edit = ((MfwHdr *) myHandle)->data;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1549
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1550 TRACE_FUNCTION("editShowHeader");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1551
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1552 edtChar(myHandle,ecDel);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1553 if (upCase)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1554 alphachar = editAlphaU[editAlphaKey][editAlphaLevel];
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1555 else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1556 alphachar = editAlpha[editAlphaKey][editAlphaLevel];
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1557
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1558 if (!(editAlphaMode && editAlphaKey != KCD_MAX))
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1559 alphachar= ' ';
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1560 else if (editHiddenMode) // SH - in hidden mode...
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1561 tmpBuf[edit->cp] = alphachar; // store character in buffer
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1562 #ifdef NO_ASCIIZ
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1563 /*MC, SPR 940/2 01/08/02, don't need to check for language, tag should be enough*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1564 if (edit->attr->text[0] == 0x80/*MC 22/07/02*/)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1565 alphachar = alphachar << 8;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1566 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1567 {/*NM p025*/
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1568 edit->attr->alphaMode = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1569 }
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1570
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1571 edtChar(myHandle,alphachar);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1572
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1573 /*
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1574 is this actually useless after insert a
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1575 character to call "ecRight" and then "ecLeft"
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1576 For the multitap we need only two steps:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1577 "ecDel" plus insert the character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1578
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1579 edtChar(myHandle,ecLeft);*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1580
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1581
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1582 {edit->attr->alphaMode = FALSE;}
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1583
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1584 /*p025 end*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1585
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1586 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1587
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1588 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1589
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1590 $Function: editEventTim
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1591
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1592 $Description: executes the timer event from the edit component
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1593
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1594 $Returns: none.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1595
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1596 $Arguments:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1597
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1598 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1599 /*MC SPR 1242 merged in b-sample version of this function */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1600 static int editEventTim (MfwEvt e, MfwTim *t)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1601 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1602 char *format = formatHandle; // SH - temporary format template
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1603
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1604 TRACE_FUNCTION("editEventTim");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1605
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1606 if (!(editAlphaMode || editFormatMode))
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1607 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1608
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1609
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1610 /*MC, SPR925 23/07/02, removed variable assignment for chinese */
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1611
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1612 // SH - modifications for format mode & hidden mode
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1613 if (editFormatMode) // SH - advance format pointer when
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1614 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1615 if (editHiddenMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1616 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1617 editCharFindNext('*');
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1618 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1619 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1620 editCharFindNext(ecRight);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1621 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1622 else if (editHiddenMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1623 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1624 edtChar(myHandle,'*');
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1625 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1626 // end of modifications
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1627
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1628 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1629 edtChar(myHandle,ecRight);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1630
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1631 editAlphaLevel = KEY_PAD_MAX-1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1632 editAlphaKey = KCD_MAX;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1633
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1634 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1635 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1636
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1637
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1638 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1639
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1640 $Function: editEventKey
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1641
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1642 $Description: executes the timer event form the edit component
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1643
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1644 $Returns: none.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1645
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1646 $Arguments:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1647
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1648 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1649 int editEventKey (MfwEvt e, MfwKbd *k)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1650 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1651 /*MC SPR 1242 merged in b-sample version of this function */
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1652 MfwEdt *edit;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1653 char *tb;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1654 UBYTE ch = '.';
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1655
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1656 char *format = formatHandle; // SH - temporary format template
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1657 char formatchar; // SH - Current format character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1658 char alphachar; // SH - Current multi-tap character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1659 int safetycounter; // SH - Stops searching forever to find compatible character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1660 BOOL validCharacter; // SH - flag to indicate whether character is accepted
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1661
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1662 BOOL unicode; /* SPR957 - SH - TRUE if string is unicode */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1663
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1664 /*NM p026*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1665 if (!myHandle) // If we've reached the end of the format string, don't allow input
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1666 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1667
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1668 /* Over the editor handle "e" we have now the access to
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1669 * the editor buffer "tb". We need it e.g "editCalcMode"
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1670 * to check the buffer */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1671
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1672 edit = ((MfwHdr *) myHandle)->data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1673 tb = edit->attr->text;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1674 /*p026 end*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1675
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1676 /* SPR957 - SH - TRUE if string is unicode */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1677 if (tb[0]==0x80)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1678 unicode = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1679 else
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1680 unicode = FALSE;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1681
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1682 /* SH - formatted input mode (for WAP) */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1683
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1684 if (editFormatMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1685 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1686 if (k->code==KCD_HUP) // Escape from edit screen
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1687 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1688
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1689 if (edit->cp >= (edit->attr->size)) // If at last character of editor, don't
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1690 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1691 return 1; // print character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1692 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1693
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1694 formatchar = format[*formatIndex];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1695
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1696 if (formatchar == NULL) // If we've reached the end of the format string, don't allow input
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1697 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1698
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1699 if ((formatchar>'0' && formatchar<='9') || formatchar=='*') // Delimiter for format field
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1700 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1701 (*formatIndex)++;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1702 *fieldIndex = 0;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1703 formatchar = format[*formatIndex]; // Next character is the format for the field
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1704 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1705
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1706 /* Multi-tap input
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1707 *
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1708 * The user presses a different key, meaning the previous character must be entered */
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1709
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1710 if (editAlphaKey != KCD_MAX && editAlphaKey != k->code)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1711 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1712 timStop(editTim);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1713
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1714 alphachar = NULL;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1715
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1716 switch(formatchar)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1717 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1718 case 'X': // Uppercase alphabetic only
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1719 case 'A': // Uppercase alphabetic or punctuation
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1720 alphachar = editAlphaU[editAlphaKey][editAlphaLevel];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1721 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1722
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1723 case 'x': // Lowercase alphabetic only
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1724 case 'a': // Lowercase alphabetic or punctuation
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1725 alphachar = editAlpha[editAlphaKey][editAlphaLevel];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1726 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1727
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1728 case 'M':
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1729 case 'm':
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1730 if (upCase)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1731 alphachar = editAlphaU[editAlphaKey][editAlphaLevel];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1732 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1733 alphachar = editAlpha[editAlphaKey][editAlphaLevel];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1734 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1735 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1736
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1737 if (alphachar!=NULL)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1738 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1739 if (editHiddenMode) // SH - in hidden mode...
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1740 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1741 tmpBuf[edit->cp] = alphachar; // store character in buffer
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1742 alphachar = '*'; // ...and show star
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1743 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1744 editCharFindNext(alphachar); // Add number to buffer & advance cursor
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1745 editAlphaLevel = KEY_PAD_MAX-1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1746 editAlphaKey = KCD_MAX;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1747 if (edit->cp >= (edit->attr->size)) // If at last character of editor, don't
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1748 return 1; // allow another character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1749 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1750 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1751
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1752 formatchar = format[*formatIndex];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1753
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1754 if (k->code <= KCD_9) // Key pressed is 0 - 9.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1755 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1756
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1757 /* Numeric */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1758
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1759 if (formatchar == 'N') // A numeric digit is expected
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1760 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1761 if (editHiddenMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1762 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1763 tmpBuf[edit->cp] = editControls[k->code];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1764 editCharFindNext('*');
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1765 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1766 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1767 editCharFindNext(editControls[k->code]); // Add number to buffer & advance cursor
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1768 editAlphaLevel = KEY_PAD_MAX-1; // Reset multi-tap settings
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1769 editAlphaKey = KCD_MAX;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1770 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1771 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1772
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1773 /* Multi-tap alphanumeric */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1774
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1775 alphachar = NULL;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1776
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1777 if (!strchr("XxAaMm",formatchar)) // If not a valid format code, exit
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1778 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1779
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1780 if (strchr("Xx",formatchar) && k->code<KCD_2) // 0 and 1 keys not valid in these modes
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1781 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1782
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1783 editAlphaKey = k->code; // Store the key pressed
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1784 editAlphaLevel++; // Increment through list of symbols
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1785 if (editAlphaLevel > (KEY_PAD_MAX-1)) // List wraps round
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1786 editAlphaLevel = 0;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1787
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1788 safetycounter = 0;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1789 while (alphachar==NULL && safetycounter<KEY_PAD_MAX)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1790 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1791 validCharacter = FALSE;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1792
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1793 switch(formatchar)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1794 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1795 case 'X':
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1796 alphachar = editAlphaU[editAlphaKey][editAlphaLevel]; // Uppercase...
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1797 validCharacter = (alphachar>='A' && alphachar<='Z'); // ...alphabetic only
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1798 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1799
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1800 case 'x':
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1801 alphachar = editAlpha[editAlphaKey][editAlphaLevel]; // Lowercase
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1802 validCharacter = (alphachar>='a' && alphachar<='z'); // ...alphabetic only
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1803 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1804
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1805 case 'A':
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1806 alphachar = editAlphaU[editAlphaKey][editAlphaLevel]; // Uppercase...
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1807 validCharacter = (alphachar<'0' || alphachar>'9'); // ..non-numeric
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1808 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1809
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1810 case 'a':
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1811 alphachar = editAlpha[editAlphaKey][editAlphaLevel]; // Lowercase...
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1812 validCharacter = (alphachar<'0' || alphachar>'9'); // ..non-numeric
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1813 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1814
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1815 case 'M':
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1816 case 'm':
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1817 if (upCase) // User-selected case...
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1818 alphachar = editAlphaU[editAlphaKey][editAlphaLevel];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1819 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1820 alphachar = editAlpha[editAlphaKey][editAlphaLevel];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1821 validCharacter = TRUE; // ...any character accepted
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1822 break;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1823 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1824
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1825 if (!validCharacter) // If character isn't uppercase alphabetic,
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1826 { // find the next one that is,
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1827 alphachar = NULL;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1828 safetycounter++; // (but don't search forever)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1829 editAlphaLevel++;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1830 if (editAlphaLevel > (KEY_PAD_MAX-1))
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1831 editAlphaLevel = 0;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1832 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1833 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1834
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1835 if (alphachar!=NULL) // If we've found a character, and string isn't max size
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1836 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1837 if (editHiddenMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1838 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1839 tmpBuf[edit->cp] = alphachar;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1840 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1841 edtChar(myHandle,alphachar);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1842 edtChar(myHandle,ecLeft);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1843 timStart(editTim);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1844 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1845 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1846 editAlphaKey = KEY_MAX;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1847 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1848 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1849
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1850 if (k->code==KCD_HASH) // Hash key
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1851 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1852 if (strchr("AaMm",formatchar))
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1853 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1854 if (editHiddenMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1855 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1856 tmpBuf[edit->cp] = ' ';
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1857 editCharFindNext('*');
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1858 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1859 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1860 editCharFindNext(' '); // Prints a space in this mode
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1861 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1862 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1863 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1864
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1865 if (k->code==KCD_STAR) // Star key
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1866 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1867 if (strchr("AaMm",formatchar))
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1868 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1869 if (editHiddenMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1870 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1871 tmpBuf[edit->cp] = '*';
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1872 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1873 editCharFindNext('*');
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1874 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1875 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1876 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1877
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1878 return 1;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1879 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1880
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1881 /************************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1882 /* Normal multi-tap mode */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1883 /************************/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1884
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1885 if (editAlphaMode)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1886 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1887 if (editAlphaKey != KCD_MAX && editAlphaKey != k->code)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1888 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1889 timStop(editTim);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1890
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1891 /*MC SPR 925, 23/07/02, removed editshowheader for chinese*/
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1892 edtChar(myHandle,ecRight);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1893 /*MC SPR 925, 23/07/02,removed shifting of alphachar, not needed here, merged from ealier code*/
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1894
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1895 editAlphaLevel = KEY_PAD_MAX-1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1896 editAlphaKey = KCD_MAX;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1897 }
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1898
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1899 if (k->code <= KCD_HASH)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1900 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1901 editAlphaLevel++;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1902 if (editAlphaLevel > (KEY_PAD_MAX-1))
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1903 editAlphaLevel = 0;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1904 if (editAlphaKey == KCD_MAX) // Inserting a new character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1905 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1906 TRACE_EVENT("Inserting character.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1907 /*MC, SPR 925, 23/07/02 removed insert space and ecLeft if Chinese*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1908
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1909 /* NM p01306
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1910 the patch p027 to reduce calling the edtChar as less as possible
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1911 was not working for inserting characters.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1912 This additional change should work now:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1913 */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1914 if (unicode) /*SPR957 - SH - use new unicode flag */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1915 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1916 moveRightUnicode((U16 *)&edit->attr->text[edit->cp*2],1);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1917 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1918 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1919 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1920 moveRight(&edit->attr->text[edit->cp],strlen(&edit->attr->text[edit->cp]),1);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1921 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1922 /* NM p01306 END */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1923 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1924 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1925 editAlphaKey = k->code;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1926 editShowHeader();
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1927 timStart(editTim);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1928 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1929 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1930
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1931 alphachar = NULL;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1932
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1933 switch (k->code)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1934 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1935 case KCD_HUP:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1936 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1937 case KCD_HASH:
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1938 /* KGT: If not in an alpha mode insert blanc.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1939 But in numeric mode insert '#'. */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1940 if (editAlphaMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1941 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1942 alphachar = ' ';
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1943 editShowHeader();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1944 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1945 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1946 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1947 if (editCalcMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1948 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1949 if(!(strchr(tb, ch ))) /* set '.' only once ! */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1950 alphachar = '.';
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1951 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1952 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1953 alphachar = '#';
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1954 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1955 /* end KGT */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1956
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1957 /* SH - hidden mode */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1958 if (editHiddenMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1959 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1960 tmpBuf[edit->cp] = alphachar;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1961 alphachar = '*';
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1962 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1963 /* end of hidden mode */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1964
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1965 /* SPR957 - In unicode mode, character is shifted to second byte */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1966 if (unicode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1967 alphachar = alphachar << 8;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1968
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1969 edtChar(myHandle,alphachar);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1970 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1971
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1972 case KCD_STAR:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1973
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1974 if (editCalcMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1975 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1976 if(!(strchr(tb, ch ))) /* set '.' only once ! */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1977 alphachar = '.'; /* SPR957 - SH*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1978 /*edtChar(myHandle,'.');*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1979 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1980 else
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1981 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1982 /*if (!editAlphaMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1983 edtChar(myHandle,'*');
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1984 else */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1985 if (editAlphaMode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1986 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1987 editShowHeader();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1988 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1989
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1990 alphachar = '*';
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1991
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1992 /* SH - hidden mode */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1993 if (editHiddenMode)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1994 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1995 tmpBuf[edit->cp] = '*';
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1996 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1997 /* end of hidden mode */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1998
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1999 /* SPR957 - SH - In unicode mode, character is shifted to second byte */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2000 if (unicode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2001 alphachar = alphachar << 8;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2002 edtChar(myHandle,alphachar);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2003 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2004 return 2; // SH - 2 indicates that character WAS printed
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2005
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2006 case KCD_ABC:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2007 editAlphaMode = (UBYTE) !editAlphaMode;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2008 if (editAlphaMode)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2009 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2010 editAlphaLevel = KEY_PAD_MAX-1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2011 editAlphaKey = KCD_MAX;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2012 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2013 editShowHeader();
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2014 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2015 default:
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2016 if (editAlphaMode){
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2017 timStop(editTim);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2018 edtChar(myHandle,ecRight);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2019 return 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2020 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2021 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2022 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2023
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2024 /* SH - hidden mode */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2025 if (editHiddenMode)
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2026 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2027 tmpBuf[edit->cp] = editControls[k->code];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2028 alphachar = '*'; /* SPR957 - SH*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2029 /* SPR957 - In unicode mode, character is shifted to second byte */
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2030 if (unicode)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2031 alphachar = alphachar << 8;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2032
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2033 edtChar(myHandle,alphachar);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2034 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2035 /* end of hidden mode */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2036 else
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2037 { /*MC SPR 964, sets alphamode to FALSE when in digits mode, so that cursor moves right*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2038 edit->attr->alphaMode = editAlphaMode;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2039 edtChar(myHandle,editControls[k->code]);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2040 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2041
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2042 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2043 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2044
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2045
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2046 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2047
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2048 $Function: editClear
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2049
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2050 $Description: SH - For formatted input, clears everything except fixed characters
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2051
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2052 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2053
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2054 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2055
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2056 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2057 /*MC SPR 1242 merged in b-sample version of this function */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2058 void editClear()
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2059 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2060 int editIndex = 0;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2061 MfwEdt *edit = ((MfwHdr *) myHandle)->data;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2062 char *tb = edit->attr->text;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2063
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2064 *formatIndex = -1; // Find first non-fixed character,
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2065 edtChar(myHandle,ecTop); // starting from the top.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2066 editCharFindNext(NULL);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2067
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2068 while (edit->cp <strlen(tb))
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2069 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2070 editCharFindNext(' '); // Overwrite everything with spaces
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2071 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2072 edtChar(myHandle,ecTop);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2073 *formatIndex = -1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2074 editCharFindNext(NULL); // Return to the first non-fixed character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2075
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2076 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2077 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2078
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2079
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2080 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2081
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2082 $Function: editCharFindNext
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2083
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2084 $Description: SH - For formatted input, adds a character to the input buffer then finds
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2085 the next non-fixed character space for the cursor to occupy
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2086
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2087 $Returns:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2088
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2089 $Arguments: character - the character (or code) to print
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2090
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2091 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2092 /*MC SPR 1242 merged in b-sample version of this function */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2093 void editCharFindNext(char character)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2094 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2095 char *format = formatHandle; // SH - temporary format template
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2096 char formatchar;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2097 MfwEdt *edit = ((MfwHdr *) myHandle)->data;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2098 UBYTE inField = 0; // =1 if entering field, =2 if in field
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2099
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2100 TRACE_EVENT("editCharFindNext");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2101
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2102 // Check for delimited field
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2103
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2104 if (*formatIndex>0)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2105 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2106 formatchar = format[*formatIndex-1];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2107 if ((formatchar>'0' && formatchar<='9') || formatchar=='*')
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2108 inField = 2;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2109 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2110
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2111 formatchar = format[*formatIndex];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2112 if ((formatchar>'0' && formatchar<='9') || formatchar=='*')
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2113 inField = 1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2114
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2115 // Check for cursor right at end of string - don't allow
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2116
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2117 if (character == ecRight && edit->cp >= strlen(edit->attr->text) && *formatIndex>-1 && inField==0)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2118 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2119 TRACE_EVENT("End of string.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2120 return;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2121 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2122
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2123 if (character!=NULL) // First add the required character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2124 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2125 edtChar(myHandle, character); // to the buffer
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2126 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2127
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2128 // Check for start of fixed input field
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2129
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2130 if (inField==1)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2131 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2132 TRACE_EVENT("Entering field.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2133 (*formatIndex)++; // Get us into the field...
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2134 *fieldIndex = 0; // ...and reset the field index
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2135 formatchar = *(format+*formatIndex);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2136 if (formatchar=='M')
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2137 upCase = TRUE;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2138 if (formatchar=='m')
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2139 upCase = FALSE;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2140 inField = 2;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2141 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2142
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2143 // Check whether we're in a fixed input field, e.g. "4N" or "8X"
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2144
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2145 if (inField==2) // So we don't look back beyond start of string
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2146 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2147 TRACE_EVENT("Move on in field.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2148 (*fieldIndex)++; // Increment the position in the field
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2149 if (*fieldIndex==(int)(formatchar-'0')) // If we've entered the number of characters specified (note- will never happen for the '*' !)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2150 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2151 TRACE_EVENT("Exiting field.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2152 (*formatIndex)++; // point to NULL at end of string (no more input)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2153 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2154 return;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2155 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2156
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2157 // If not, just look at next format character as usual
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2158
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2159 (*formatIndex)++; // Point to next character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2160
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2161 while (*formatIndex<strlen(format) && *(format+*formatIndex) == '\\') // Fixed characters encountered
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2162 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2163 edtChar(myHandle,ecRight); // Skip over them
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2164 (*formatIndex)+=2;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2165 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2166
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2167 if (*formatIndex>(strlen(format))) // Don't look beyond end of string
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2168 *formatIndex = strlen(format);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2169 /***************************Go-lite Optimization changes Start***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2170 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2171 TRACE_EVENT_P2("formatIndex, fieldIndex: %d, %d", *formatIndex, *fieldIndex);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2172 /***************************Go-lite Optimization changes end***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2173 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2174 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2175
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2176 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2177
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2178 $Function: editFindPrev
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2179
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2180 $Description: SH - For formatted input, finds the previous non-fixed character and
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2181 moves the cursor there if possible
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2182
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2183 $Returns: 0 if the cursor position is not changed (nowhere to go)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2184 1 if the previous character has been found
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2185 2 if the cursor was over the first non-fixed character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2186
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2187 $Arguments:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2188
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2189 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2190 /*MC SPR 1242 merged in b-sample version of this function */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2191 int editFindPrev()
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2192 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2193 char *format = formatHandle; // SH - temporary format template
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2194 int editIndex;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2195 char formatchar;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2196 MfwEdt *edit = ((MfwHdr *) myHandle)->data;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2197
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2198 TRACE_EVENT("editFindPrev");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2199
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2200 if (edit->cp == 0) // If cursor is at start of string, return 2
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2201 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2202 TRACE_EVENT("Exit - start of string found");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2203 /***************************Go-lite Optimization changes Start***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2204 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2205 TRACE_EVENT_P2("formatIndex, fieldIndex: %d, %d", *formatIndex, *fieldIndex);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2206 /***************************Go-lite Optimization changes end***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2207 return 2;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2208 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2209 // First check whether we're in a fixed input field, e.g. "4N" or "8X"
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2210
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2211 if (*formatIndex>0) // So we don't look back beyond start of string
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2212 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2213 formatchar = *(format+*formatIndex-1);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2214 if ((formatchar>'0' && formatchar<='9') || formatchar=='*') // If it's a number between 1 and 9, or a *
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2215 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2216 TRACE_EVENT("In delimited field.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2217 edtChar(myHandle,ecLeft);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2218 if (edit->cp < edit->attr->size-1) // (Don't decrement if at last char in string)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2219 (*fieldIndex)--; // Decrement the position in the field
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2220
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2221 if (*fieldIndex==0) // If we've reached the beginning of the field
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2222 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2223 TRACE_EVENT("Getting out of field.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2224 (*formatIndex)--; // Get out of the field
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2225 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2226
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2227
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2228 TRACE_EVENT_P2("formatIndex, fieldIndex: %d, %d", *formatIndex, *fieldIndex);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2229
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2230 if (edit->cp==(strlen(edit->attr->text)-1)) // Special case if last character - tell editor to shorten the string
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2231 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2232 TRACE_EVENT("Shorten string");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2233 return 3;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2234 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2235
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2236 return 1; // then we're done
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2237 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2238 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2239
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2240 // If not (or if we've just come out of one) just look at next format character as usual
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2241
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2242 editIndex = *formatIndex-1; // Make copy of format position, starting off to left
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2243
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2244 while (editIndex>0)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2245 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2246 if (*(format+editIndex-1)=='\\') // If there's a fixed char
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2247 editIndex -=2; // Look back a further 2 characters
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2248 else // If there's a non-fixed character
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2249 break; // then exit loop
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2250 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2251
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2252 if (editIndex==-1) // Go back from 1st character in editor
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2253 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2254 TRACE_EVENT("Exit - skipped over fixed character");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2255 /***************************Go-lite Optimization changes Start***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2256 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2257 TRACE_EVENT_P2("formatIndex, fieldIndex: %d, %d", *formatIndex, *fieldIndex);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2258 /***************************Go-lite Optimization changes end***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2259 return 2;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2260 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2261
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2262 formatchar = format[editIndex-1];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2263 if ((formatchar>'0' && formatchar<='9') || formatchar=='*')
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2264 (*fieldIndex)--;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2265
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2266 if (editIndex>-1) // Provided there is somewhere to go....
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2267 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2268 while(*formatIndex>editIndex)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2269 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2270 if (edtChar(myHandle,ecLeft)==MfwResOk) // move cursor there
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2271 (*formatIndex)--;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2272 if (format[*formatIndex]=='\\')
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2273 (*formatIndex)--;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2274 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2275 TRACE_EVENT("Found new position.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2276 /***************************Go-lite Optimization changes Start***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2277 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2278 TRACE_EVENT_P2("formatIndex, fieldIndex: %d, %d", *formatIndex, *fieldIndex);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2279 /***************************Go-lite Optimization changes end***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2280 return 1; // Found new position
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2281 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2282 TRACE_EVENT("Position unchanged.");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2283 /***************************Go-lite Optimization changes Start***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2284 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2285 TRACE_EVENT_P2("formatIndex, fieldIndex: %d, %d", *formatIndex, *fieldIndex);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2286 /***************************Go-lite Optimization changes end***********************/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2287 return 0; // Position unchanged
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2288 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2289
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2290
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2291 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2292
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2293 $Function: editActivate
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2294
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2295 $Description: Activates the edit component
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2296
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2297 $Returns: none.
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2298
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2299 $Arguments:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2300
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2301 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2302 void editActivate (MfwHnd e, int AlphaMode)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2303 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2304 TRACE_FUNCTION("editActivate");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2305
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2306 myHandle = e;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2307 /*NM p028*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2308 if (!editTim)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2309 editTim = timCreate(0,1000,(MfwCb) editEventTim);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2310 editAlphaMode = ((AlphaMode != 0) && (AlphaMode != 4) && (AlphaMode != 5));
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2311 editCalcMode = (AlphaMode == 4);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2312 editFormatMode = (AlphaMode == 6);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2313 editHiddenMode = FALSE;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2314 editAlphaLevel = KEY_PAD_MAX-1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2315 editAlphaKey = KCD_MAX;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2316 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2317
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2318
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2319 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2320
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2321 $Function: editHiddenActivate
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2322
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2323 $Description: SH - Activates the edit component for hidden alphanumeric entry
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2324
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2325 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2326
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2327 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2328
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2329 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2330 void editHiddenActivate (char *buffer)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2331 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2332 TRACE_FUNCTION("editHiddenActivate");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2333 tmpBuf = buffer;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2334 editHiddenMode = 1;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2335 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2336 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2337
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2338 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2339
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2340 $Function: editDeactivate
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2341
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2342 $Description: deactivates the edit component
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2343
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2344 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2345
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2346 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2347
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2348 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2349 void editDeactivate (void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2350 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2351 //myHandle = 0; //SPR#1014 - DS - Commented out.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2352
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2353 if (editTim) {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2354 timStop(editTim);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2355 timDelete(editTim);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2356 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2357 editTim = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2358 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2359 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2360
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2361 $Function: activeEditor
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2362
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2363 $Description: deactivates the edit component
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2364
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2365 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2366
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2367 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2368
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2369 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2370 MfwHnd activeEditor (void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2371 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2372 return myHandle;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2373 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2374
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2375 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2376
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2377 $Function: setformatpointers
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2378
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2379 $Description: SH - Sets static variables formatHandle and formatIndex, so thet editEventKey
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2380 can access the format string
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2381
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2382 $Returns:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2383
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2384 $Arguments: Pointer to format string, pointer to format index
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2385
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2386 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2387
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2388
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2389 void setFormatPointers (char *format, int *index, int *index2)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2390 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2391
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2392 TRACE_FUNCTION("setFormatPointers");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2393 formatHandle = format;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2394 formatIndex = index;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2395 fieldIndex = index2;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2396 return;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2397 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2398
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2399 #endif /* NEW_EDITOR */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2400
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2401 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2402
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2403 $Function: MmiModuleSet
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2404
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2405 $Description: Set the status
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2406
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2407 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2408
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2409 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2410
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2411 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2412 void MmiModuleSet (int module)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2413 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2414 switch(module)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2415 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2416 case ModuleIdle:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2417 MmiModule = MmiModule & ModuleBattLow;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2418 MmiModule = MmiModule | ModuleIdle;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2419 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2420 case ModuleInCall:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2421 MmiModuleDel(ModuleIdle);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2422 MmiModule=MmiModule | ModuleInCall;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2423 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2424 case ModuleCall:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2425 MmiModuleDel(ModuleIdle);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2426 MmiModule=MmiModule | ModuleCall;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2427 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2428 case ModuleMenu:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2429 MmiModuleDel(ModuleIdle);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2430 MmiModule=MmiModule | ModuleMenu;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2431 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2432 case ModulePhon:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2433 MmiModuleDel(ModuleIdle);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2434 MmiModule=MmiModule | ModulePhon;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2435 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2436 case ModuleSms:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2437 MmiModuleDel(ModuleIdle);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2438 MmiModule=MmiModule | ModuleSms;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2439 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2440 case ModuleBattLow:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2441 MmiModule=MmiModule | ModuleBattLow;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2442 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2443 case ModuleSAT:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2444 MmiModuleDel(ModuleIdle);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2445 MmiModule=MmiModule | ModuleSAT;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2446 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2447 case ModuleAlarm:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2448 MmiModuleDel(ModuleIdle);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2449 MmiModule=MmiModule | ModuleAlarm;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2450 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2451 case ModuleFax:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2452 MmiModule=MmiModule | ModuleFax;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2453 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2454 case ModuleDialling:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2455 MmiModuleDel(ModuleIdle);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2456 MmiModule=MmiModule | ModuleDialling;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2457 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2458 default:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2459 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2460 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2461
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2462 return;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2463
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2464 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2465
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2466 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2467
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2468 $Function: MmiModuleDel
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2469
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2470 $Description: Delete the status
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2471
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2472 $Returns: none.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2473
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2474 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2475
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2476 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2477 void MmiModuleDel (int module)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2478 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2479 switch(module)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2480 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2481 case ModuleIdle:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2482
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2483 MmiModule = MmiModule & (~ModuleIdle);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2484 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2485 case ModuleInCall:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2486 MmiModule=MmiModule & (~ModuleInCall);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2487 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2488 case ModuleCall:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2489 MmiModule=MmiModule & (~ModuleCall);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2490 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2491 case ModuleMenu:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2492 MmiModule=MmiModule & (~ModuleMenu);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2493 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2494 case ModulePhon:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2495 MmiModule=MmiModule & (~ModulePhon);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2496 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2497 case ModuleSms:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2498 MmiModule=MmiModule & (~ModuleSms);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2499 break;
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2500 case ModuleBattLow:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2501 MmiModule=MmiModule & (~ModuleBattLow);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2502 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2503 case ModuleSAT:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2504 MmiModule=MmiModule & (~ModuleSAT);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2505 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2506 case ModuleAlarm:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2507 MmiModule=MmiModule & (~ModuleAlarm);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2508 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2509 case ModuleFax:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2510 MmiModule=MmiModule & (~ModuleFax);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2511 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2512 case ModuleDialling:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2513 MmiModule=MmiModule & (~ModuleDialling);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2514 default:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2515 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2516 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2517
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2518 return;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2519
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2520 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2521
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2522 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2523
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2524 $Function: showGoodBye
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2525
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2526 $Description: shows a goodbye Message when swiching off the mobile
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2527
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2528 $Returns: none
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2529
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2530 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2531
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2532 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2533
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2534
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2535 static void showGoodBye (T_MFW_HND win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2536 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2537 T_DISPLAY_DATA display_info;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2538
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2539 TRACE_FUNCTION("showGoodBye ()");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2540 dlg_zeroDisplayData(&display_info);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2541 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)goodbye_cb, FOREVER, 0 );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2542
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2543 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2544 * Call Icon
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2545 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2546
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2547 mmi_dialogs_insert_animation (info_dialog (win, &display_info), 400 ,(MfwIcnAttr*)&goodbye_Attr,animGoodbye);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2548
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2549
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2550 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2551
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2552 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2553
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2554 $Function: goodbye_cb
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2555
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2556 $Description:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2557
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2558 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2559
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2560 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2561
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2562 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2563
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2564
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2565 static void goodbye_cb (void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2566 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2567 TRACE_FUNCTION("goodbye_cb ()");
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2568 nm_deregistration(); /* start deregistration procedure */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2569 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2570
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2571 #ifdef FF_MMI_AUDIO_PROFILE
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2572 void mmi_device_status_info(T_MFW_HND parent, int str1, int str2, T_VOID_FUNC callback)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2573 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2574 T_DISPLAY_DATA display_info;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2575
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2576 TRACE_FUNCTION("mmi_device_status_info");
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2577 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, str1,str2, COLOUR_STATUS);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2578 dlg_initDisplayData_events( &display_info, callback, THREE_SECS, KEY_LEFT | KEY_CLEAR | KEY_HUP);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2579 info_dialog(parent,&display_info);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2580 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2581 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2582
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2583
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2584 #if 0 /* FreeCalypso */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2585 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2586
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2587 $Function: menuBootTimeMsmt
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2588
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2589 $Description: menu handler for 'Boot Time' menu. Shows time taken for various boot events
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2590
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2591 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2592
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2593 $Arguments:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2594
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2595 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2596 int menuBootTimeMsmt(MfwMnu* m, MfwMnuItem* i)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2597 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2598 int boot_time[4];
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2599 T_AUI_EDITOR_DATA editor_data;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2600 T_MFW_HND win = (T_MFW_HND)bookCurrentWindow();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2601
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2602 memset(buffer,0,sizeof(buffer));
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2603 get_boot_time(&boot_time);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2604 TRACE_EVENT_P4("pre boot %d, app init %d, ti logo %d, conn log %d",boot_time[0],boot_time[1],boot_time[2],boot_time[3]);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2605 sprintf((char*)buffer,"\nPre boot -%d ms \nApp init - %d ms \nModem Boot - %d ms \nNetwork sync - %d ms",boot_time[0],boot_time[1],boot_time[2],boot_time[3]);
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2606 AUI_edit_SetDefault(&editor_data);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2607 AUI_edit_SetDisplay(&editor_data, ZONE_FULL_SK_TITLE, COLOUR_EDITOR, EDITOR_FONT);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2608 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtSoftBack, TxtBootTime, NULL);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2609 AUI_edit_SetEvents(&editor_data, 0, TRUE, FOREVER, NULL);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2610 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, buffer, 100);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2611 AUI_edit_SetMode(&editor_data, ED_MODE_READONLY, ED_CURSOR_NONE);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2612
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2613 AUI_edit_Start(win, &editor_data);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2614
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2615 return 1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2616 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2617 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2618
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2619 /* ****************************************************************** */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2620 #ifdef NEPTUNE_BOARD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2621 void AI_Power(SYS_UWORD8 power)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2622 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2623
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2624 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2625
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2626 void SIM_PowerOff (void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2627 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2628 TRACE_FUNCTION ("SIM_PowerOff()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2629 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2630
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2631 #ifdef MMI_POWER_MANAGEMENT_TEST
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2632
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2633 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2634
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2635 $Function: mmi_PowerManagement_screen_forever
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2636
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2637 $Description: This will be executed when closing Power Management Screen
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2638
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2639 $Returns:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2640 $Arguments: window, Idetifier, reason
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2641
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2642 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2643
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2644 void mmi_PowerManagementStatus(T_MFW_HND win, USHORT identifier, SHORT reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2645 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2646 timStart( timer_handle );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2647 SVC_SCN_EnablePM( 0 );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2648 Screen_Update = 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2649 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2650
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2651
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2652 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2653
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2654 $Function: mmi_PowerManagement_screen_forever
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2655
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2656 $Description: Used to display Power Management running Screen
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2657
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2658 $Returns: 0 - Success
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2659 1 - Error
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2660
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2661
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2662 $Arguments: window, textId/TestString, color
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2663
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2664 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2665 T_MFW_HND mmi_PowerManagement_screen_forever( MfwHnd win,int TextId, char* TextStr, int colour )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2666 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2667 T_DISPLAY_DATA DisplayInfo;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2668 dlg_initDisplayData_TextId( &DisplayInfo, TxtNull, TxtCancel, TxtNull, TxtNull, colour);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2669 dlg_initDisplayData_events( &DisplayInfo, (T_VOID_FUNC)mmi_PowerManagementStatus, FOREVER, KEY_ALL );
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2670 DisplayInfo.TextString = TextStr;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2671 return info_dialog(win, &DisplayInfo);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2672 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2673
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2674 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2675
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2676 $Function: mmi_PowerManagement
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2677
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2678 $Description: Used to test the power Management
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2679
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2680 $Returns: 0 - Success
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2681 1 - Error
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2682
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2683
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2684 $Arguments: menu, menu item
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2685
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2686 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2687 int mmi_PowerManagement(MfwMnu* m, MfwMnuItem* i)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2688 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2689 mmi_PowerManagement_screen_forever(0, NULL, "Power Management Running...\n", 1 );
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2690 timStop( timer_handle );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2691 dspl_Enable(1);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2692 Screen_Update = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2693 SVC_SCN_EnablePM( 1 );
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2694 return 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2695 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2696
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2697 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2698
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2699
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2700 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2701
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2702 /*OMAPS00098881(removing power variant) a0393213(prabakar) - screenUpdateOn() and screenUpdateOff() added*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2703 #ifdef FF_POWER_MANAGEMENT
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2704 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2705
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2706 $Function: screenUpdateOn
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2707
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2708 $Description: menu handler for Phone settings --> screen update --> on
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2709
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2710 $Returns:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2711
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2712 $Arguments:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2713
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2714 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2715 int screenUpdateOn(MfwMnu* m, MfwMnuItem* i)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2716 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2717 if(FFS_flashData.refresh!=1)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2718 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2719 /*Update the screen, start the timer (which is responsible for time update in idle screen) and save the status*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2720 idleEvent(IdleUpdate);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2721 timStart(times);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2722 timStart(timer_handle);/*starting mfw timer also*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2723 FFS_flashData.refresh=1;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2724 flash_write();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2725 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2726 mmi_dialog_information_screen(0, TxtDone, NULL, NULL, 0);
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2727 return MFW_EVENT_CONSUMED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2728 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2729 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2730
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2731 $Function: mmi_PowerManagement
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2732
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2733 $Description: menu handler for Phone settings --> screen update --> off
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2734
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2735 $Returns:
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2736
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2737 $Arguments: menu, menu item
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2738
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2739 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2740 int screenUpdateOff(MfwMnu* m, MfwMnuItem* i)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2741 {
66
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2742 if(FFS_flashData.refresh!=0)
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2743 {
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2744 /*Stop the timer(so no time update occurs in idle screen) and save the status in flash*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2745 timStop(times);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2746 timStop(timer_handle); /*stoping mfw timer also*/
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2747 FFS_flashData.refresh=0;
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2748 flash_write();
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2749 }
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2750 mmi_dialog_information_screen(0, TxtDone, NULL, NULL, 0);
74a034762083 mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2751 return MFW_EVENT_CONSUMED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2752 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2753
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2754 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2755