FreeCalypso > hg > fc-tourmaline
annotate src/ui/bmi/mmiMain.c @ 67:40d5d4addfb2
mmiIcons.c: trailing white space fixes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 23 Oct 2020 01:29:36 +0000 |
parents | 74a034762083 |
children | 77321341946c |
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; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 UBYTE globalMobileMode; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 int MmiModule; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 // ADDED BY RAVI - 28-11-2005 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 EXTERN int flash_formatted(void); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 EXTERN void time_date_init(void); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 EXTERN void sms_cb_exit (void); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 EXTERN void time_date_delete(void); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 EXTERN UBYTE getCurrentRingerSettings(void); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 EXTERN UBYTE CphsPresent(void); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 EXTERN void cphs_support_check(void); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 // END RAVI |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
304 /* batterie and signal start */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 int globalBatteryUpdate(U8 value); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 int globalSignalUpdate(U8 value); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
308 // 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
|
309 #ifdef FF_MMI_AUDIO_PROFILE |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 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
|
311 extern void mmi_hook_handle(); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 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
|
313 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 void globalFlashBattery (void); |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
682 /*Setup when we want the backlight to come on*/ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
683 // Nov 09, 2005 REF: DVT OMAPS00056873 xdeepadh |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
684 //On Isample boards the backlight is set off, since the bright LEDS are very disturbing. |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
685 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
686 for (i=0;i<BL_LAST_OPTION;i++) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
687 #if (BOARD == 71) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
688 mme_setBacklightEvent(i,BL_NO_LIGHT); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
689 #else |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
690 mme_setBacklightEvent(i,BL_MAX_LIGHT); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
691 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
692 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
693 #if (BOARD == 71) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
694 mme_setBacklightEvent(BL_IDLE_TIMER,BL_NO_LIGHT); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
695 #else |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
696 mme_setBacklightEvent(BL_IDLE_TIMER,BL_SET_IDLE); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
697 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
698 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
699 mme_setBacklightEvent(BL_KEY_PRESS,BL_MAX_LIGHT); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
700 mme_setBacklightEvent(BL_INCOMING_CALL,BL_MAX_LIGHT); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
701 mme_setBacklightEvent(BL_EXIT,BL_NO_LIGHT); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
702 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
703 /*and tell the backlight that the init event has happened */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
704 mme_backlightEvent(BL_INIT); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
705 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
706 //x0018858 24 Mar, 2005 MMI-FIX-11321 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
707 //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
|
708 //begin |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
709 sms_set_cind_values(&cindSettings); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
710 sms_set_cmer_values(&cmerSettings); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
711 //end. |
3
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 //RM test 14-07 second = 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
714 /*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
|
715 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
716 /*OMAPS00098881 (removing power variant) a0393213(R.Prabakar) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
717 Removed #ifndef FF_POWER_MANAGEMENT flag*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
718 time_date_init(); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
719 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
720 deregis = FALSE; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
721 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
722 /*OMAPS00098881 (removing power variant) a0393213(R.Prabakar) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
723 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
|
724 #ifndef FF_POWER_MANAGEMENT |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
725 timStart(times); /* start clock */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
726 #else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
727 if(FFS_flashData.refresh==1) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
728 timStart(times); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
729 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
730 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
731 startExec(PhoneInit,0); /* get it rolling */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
732 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
733 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
734 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
735 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
736 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
737 $Function: mainExit |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
738 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
739 $Description: exit MMI main module |
3
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 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
742 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
743 $Arguments: |
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 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
746 void mainExit (UBYTE InitCause) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
747 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
748 TRACE_FUNCTION("mainExit"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
749 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
750 startExit(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
751 sim_exit(); /* finit SIM handler */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
752 lngDelete(mainMmiLng); mainMmiLng = 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
753 timDelete(times); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
754 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
|
755 mmeDelete(mme); mme = 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
756 kbdAlways(0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
757 dspl_ClearAll(); |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
758 time_date_delete();/*SPR 1725*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
759 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
760 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
761 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
762 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
763 $Function: keyAction |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
764 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
765 $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
|
766 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
767 $Returns: |
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 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
770 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
771 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
772 static int keyAction (MfwEvt e, MfwKbd *res) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
773 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
774 /* this function "keyAction" is called 4*times from MFW per each keypress */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
775 /* twice for keypress and twice for keyrelease */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
776 /* the variable "toggle" is using to avoid to play the keypadtone twice ! */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
777 static UBYTE toggle = TRUE; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
778 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
779 /* OMAPS00151698, x0056422 */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
780 #ifdef FF_MMI_A2DP_AVRCP |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
781 if(tGlobalBmiBtStruct.bConnected == BMI_BT_CONNECTED && tGlobalBmiBtStruct.tCmdSrc == BMI_BT_HEADSET_COMMAND) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
782 {} |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
783 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
784 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
785 #endif |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
786 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
787 #ifdef NEPTUNE_BOARD /* OMAPS00033660 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
788 static unsigned char cKeySound = 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
789 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
790 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
791 /* this mask is use to filter the keyevent "e" */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
792 /* want to use KEY_0, KEY_1,...... KEY_HASH */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
793 USHORT mask = 0x0FFF; |
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 /* Initialize - RAVI - 23-12-2005 */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
796 /*a0393213 warnings removal-variable conditionally removed*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
797 #if ((!defined(FF_MIDI_RINGER)) || defined(NEPTUNE_BOARD)) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
798 UBYTE currentRinger = 0; |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
799 #endif |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
800 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
801 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
802 /* 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
|
803 if ( (e & KEY_HUP) && (e & KEY_MAKE) ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
804 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
805 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
806 /* terminate the ringing */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
807 #ifndef FF_MIDI_RINGER |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
808 currentRinger = getCurrentRingerSettings(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
809 audio_StopSoundbyID( AUDIO_BUZZER, currentRinger ); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
810 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
811 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
812 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
813 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
814 /* the power-off-key ! */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
815 if ( (e & KEY_POWER) && (e & KEY_MAKE)) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
816 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
817 TRACE_EVENT("KEY_POWER pressed !!!!"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
818 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
819 if (pinsIsFocussed() EQ FOCUSSED_PINS) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
820 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
821 pin_exit(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
822 HUPKeyOrigin=1; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
823 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
824 else if (idleIsFocussed()) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
825 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
826 HUPKeyOrigin=1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
827 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
828 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
829 if ((HUPKeyOrigin==1) && (off_switch == 0)) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
830 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
831 /* |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
832 ** 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
|
833 ** for each key press. |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
834 */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
835 TRACE_EVENT("In idle window."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
836 showGoodBye ( idle_get_window () ); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
837 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
|
838 timStart(times_switchoff); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
839 off_switch++; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
840 deregis = TRUE; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
841 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
842 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
843 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
844 HUPKeyOrigin = 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
845 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
846 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
847 /* every other calls */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
848 if(toggle) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
849 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
850 #ifdef SIM_TOOLKIT |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
851 /*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
|
852 * by the SAT Setup Event List command |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
853 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
854 if (satEvtRegistered(SatEvtUserActionActivated) == TRUE) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
855 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
856 satEvtDownload(SatEvtUserAction); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
857 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
858 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
859 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
860 /* Stop Playing ring tone - RAVI - 23-12-2005 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
861 #ifdef NEPTUNE_BOARD |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
862 if(idle_data.new_sms == TRUE) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
863 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
864 currentRinger = getcurrentSMSTone(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
865 audio_StopSoundbyID( AUDIO_BUZZER, currentRinger ); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
866 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
867 /* Till this audio is stopped and next is played. */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
868 vsi_t_sleep( 0, 10 ); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
869 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
870 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
871 cKeySound = 1; /* OMAPS00033660 */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
872 if( idle_data.edt_buf[0] != '\0' ) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
873 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
874 if( idle_data.edt_buf[0] == '*' || idle_data.edt_buf[0] == '#' ) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
875 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
876 cKeySound = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
877 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
878 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
879 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
880 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
881 if ( (e & KEY_HASH) || ( e & KEY_STAR ) ) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
882 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
883 cKeySound = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
884 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
885 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
886 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
887 if( cKeySound == 1 ) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
888 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
889 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
890 #endif /* OMAPS00033660 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
891 /* END RAVI - 23-12-2005 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
892 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
893 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
|
894 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
895 TRACE_EVENT ("Keypad Click activ"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
896 /* Start Playing key tones on key press - RAVI 23-12-2005 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
897 #ifndef NEPTUNE_BOARD |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
898 audio_PlaySoundID(0, TONES_KEYBEEP, 200, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
899 #else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
900 /* RAVI - 20-1-2006 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
901 /* Silent Implementation */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
902 /* Changed 0 to getCurrentVolumeSetting () */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
903 audio_PlaySoundID(0, (TONES_KEYBEEP), getCurrentVoulmeSettings(), |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
904 AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
905 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
906 /* END RAVI */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
907 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
908 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
|
909 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
910 TRACE_EVENT ("Keypad DTMF activ"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
911 switch (e &= mask) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
912 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
913 case KEY_0: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
914 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
915 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
916 audio_PlaySoundID(0, (TONES_DTMF_0), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
917 #else |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
918 audio_PlaySoundID(0, (TONES_DTMF_0), 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
919 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
920 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
921 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
922 case KEY_1: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
923 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
924 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
925 audio_PlaySoundID(0, (TONES_DTMF_1), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
926 #else |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
927 audio_PlaySoundID(0, TONES_DTMF_1, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
928 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
929 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
930 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
931 case KEY_2: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
932 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
933 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
934 audio_PlaySoundID(0, (TONES_DTMF_2), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
935 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
936 audio_PlaySoundID(0, TONES_DTMF_2, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
937 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
938 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
939 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
940 case KEY_3: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
941 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
942 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
943 audio_PlaySoundID(0, (TONES_DTMF_3), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
944 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
945 audio_PlaySoundID(0, TONES_DTMF_3, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
946 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
947 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
948 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
949 case KEY_4: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
950 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
951 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
952 audio_PlaySoundID(0, (TONES_DTMF_4), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
953 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
954 audio_PlaySoundID(0, TONES_DTMF_4, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
955 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
956 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
957 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
958 case KEY_5: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
959 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
960 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
961 audio_PlaySoundID(0, (TONES_DTMF_5), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
962 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
963 audio_PlaySoundID(0, TONES_DTMF_5, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
964 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
965 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
966 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
967 case KEY_6: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
968 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
969 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
970 audio_PlaySoundID(0, (TONES_DTMF_6), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
971 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
972 audio_PlaySoundID(0, TONES_DTMF_6, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
973 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
974 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
975 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
976 case KEY_7: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
977 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
978 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
979 audio_PlaySoundID(0, (TONES_DTMF_7), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
980 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
981 audio_PlaySoundID(0, TONES_DTMF_7, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
982 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
983 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
984 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
985 case KEY_8: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
986 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
987 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
988 audio_PlaySoundID(0, (TONES_DTMF_8), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
989 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
990 audio_PlaySoundID(0, TONES_DTMF_8, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
991 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
992 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
993 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
994 case KEY_9: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
995 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
996 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
997 audio_PlaySoundID(0, (TONES_DTMF_9), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
998 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
999 audio_PlaySoundID(0, TONES_DTMF_9, 0,AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1000 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1001 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1002 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1003 case KEY_STAR: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1004 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1005 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1006 audio_PlaySoundID(0, (TONES_DTMF_STAR), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1007 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1008 audio_PlaySoundID(0, TONES_DTMF_STAR, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1009 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1010 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1011 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1012 case KEY_HASH: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1013 /* RAVI - 20-1-2006 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1014 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1015 audio_PlaySoundID(0, (TONES_DTMF_HASH), getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1016 #else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1017 audio_PlaySoundID(0, TONES_DTMF_HASH, 0, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1018 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1019 /* END RAVI */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1020 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1021 default: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1022 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1023 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1024 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1025 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1026 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1027 #ifdef NEPTUNE_BOARD |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1028 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1029 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1030 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1031 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1032 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1033 /* OMAPS00151698, x0056422 */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1034 #ifdef FF_MMI_A2DP_AVRCP |
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 #endif |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1037 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1038 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1039 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1040 /* toggle the variable */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1041 if(toggle) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1042 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1043 toggle = FALSE; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1044 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1045 else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1046 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1047 toggle = TRUE; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1048 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1049 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1050 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1051 return 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1052 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1053 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1054 #if(0)/* x0039928 -Lint warning removal */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1055 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1056 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1057 $Function: key |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1058 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1059 $Description: keyboard event handler |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1060 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1061 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1062 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1063 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1064 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1065 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1066 // switching the mobile on |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1067 static int key (MfwEvt e, MfwKbd *kc) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1068 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1069 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1070 TRACE_FUNCTION("Initial key"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1071 //---------------start : Mobile On------------------- |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1072 TRACE_EVENT(" Mobile ON"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1073 /* set the state of mobile on */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1074 globalMobileMode = (globalMobileMode | GlobalMobileOn); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1075 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1076 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1077 //startExec(PhoneInit,0); /* get it rolling */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1078 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1079 return 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1080 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1081 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1082 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1083 //Callback after dialog "Charging" is displayed |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1084 //x0pleela 14 Apr, 2006 ER: OMAPS00075178 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1085 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
|
1086 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1087 TRACE_FUNCTION("charging_start_cb()"); |
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 ** 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
|
1090 */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1091 idleEvent(IdleUpdate); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1092 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1093 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1094 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1095 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1096 //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
|
1097 //x0pleela 14 Apr, 2006 ER: OMAPS00075178 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1098 static void charging_start_info(void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1099 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1100 T_DISPLAY_DATA display_info; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1101 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1102 TRACE_FUNCTION("charging_start_info()"); |
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 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
|
1105 /*a0393213 warnings removal-callback fn typecasted*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1106 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
|
1107 /* |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1108 * Call Info Screen |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1109 */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1110 info_dialog (idle_get_window(), &display_info); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1111 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1112 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1113 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1114 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1115 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1116 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1117 $Function: globalMme |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1118 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1119 $Description: MME event handler |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1120 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1121 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1122 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1123 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1124 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1125 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1126 int globalMme(MfwEvt e, MfwHnd para) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1127 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1128 MfwMme* mc = (MfwMme*)para; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1129 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1130 U8 value; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1131 #ifdef FF_MMI_AUDIO_PROFILE |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1132 MfwHnd win = call_data.win_incoming; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1133 MfwWin * win_data ; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1134 T_dialog_info * data; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1135 T_MFW_HND parent_win = NULL; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1136 USHORT Identifier = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1137 void (* Callback)() = NULL; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1138 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1139 if( win != NULL) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1140 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1141 win_data = (MfwWin*)((T_MFW_HDR *)win)->data; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1142 data = (T_dialog_info *)win_data->user; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1143 parent_win = data->parent_win; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1144 Identifier = data->Identifier; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1145 Callback= data->Callback; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1146 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1147 #endif |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1148 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1149 TRACE_FUNCTION("globalMme"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1150 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1151 switch(e) { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1152 case MfwMmeSignal : |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1153 TRACE_EVENT("Mme Event: Signal"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1154 value = (U8)mc->value;//JVJE |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1155 /***************************Go-lite Optimization changes Start***********************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1156 //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
|
1157 TRACE_EVENT_P1 ("Event MfwMmeSignal %d", value); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1158 /***************************Go-lite Optimization changes end***********************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1159 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
|
1160 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1161 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1162 case MfwMmeBattery: |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1163 TRACE_EVENT("Mme Event: Battery...."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1164 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
|
1165 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
|
1166 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1167 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1168 case MfwMmeBaState: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1169 TRACE_EVENT("Mme Event: State...."); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1170 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1171 value = (U8)mc->value; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1172 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
|
1173 switch(value) |
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 //x0pleela 10 Apr, 2006 ER: OMAPS00075178 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1176 case PWR_CHG_PLUG: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1177 TRACE_EVENT("Mme Event:PWR_CHG_PLUG"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1178 charging_start_info(); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1179 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1180 /* External Power Plugged Off */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1181 //case 0: //x0pleela 10 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1182 case PWR_CHG_UNPLUG://x0pleela 10 Apr, 2006 ER: OMAPS00075178 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1183 TRACE_EVENT("Mme Event:Discharging"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1184 globalMobileMode = globalMobileMode & (~GlobalCharging); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1185 globalMobileMode = globalMobileMode & (~GlobalBatteryPower); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1186 globalBatteryMode = GlobalBatteryGreater5; //x0pleela 10 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1187 timStop(battery_charging_animate ); //x0pleela 11 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1188 idleEvent(IdleUpdate); //x0pleela 10 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1189 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1190 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1191 /* Mme Event: External Power Connected or End of Charge */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1192 // case 1: //x0pleela 10 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1193 case PWR_CHG_STOP: //x0pleela 10 Apr, 2006 ER: OMAPS00075178 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1194 TRACE_EVENT("Mme Event:GlobalBatteryPower"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1195 // globalMobileMode = globalMobileMode & (~GlobalCharging); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1196 globalMobileMode = (globalMobileMode | GlobalBatteryPower); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1197 /* indicate that the battery is full*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1198 globalBatteryMode = GlobalBatteryFull; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1199 timStop(battery_charging_animate ); //x0pleela 11 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1200 idleEvent(IdleUpdate); //x0pleela 10 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1201 TRACE_EVENT("globalBatteryPicNumber = GlobalBatteryFull"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1202 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1203 /* Mme Event: Start of Charge */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1204 // case 2: //x0pleela 10 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1205 case PWR_CHG_BEGIN: //x0pleela 10 Apr, 2006 ER: OMAPS00075178 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1206 TRACE_EVENT("Mme Event:Charging"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1207 globalMobileMode = globalMobileMode & (~GlobalBatteryPower); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1208 globalMobileMode = (globalMobileMode | GlobalCharging); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1209 globalBatteryMode = GlobalBatteryGreater5; //x0pleela 10 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1210 idleEvent(IdleUpdate); //x0pleela 10 Apr, 2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1211 //globalFlashBattery (); //x0pleela 10 Apr, 2006 : included to show animation of battery charging |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1212 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1213 default: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1214 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1215 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1216 break; |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1217 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1218 #ifdef FF_MMI_AUDIO_PROFILE |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1219 //indicates the events related to the headset |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1220 case MfwMmeHeadset: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1221 // Aug 03, 2006 REF:OMAPS00088329 x0039928 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1222 #ifdef MMI_TTY_ENABLED |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1223 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1224 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
|
1225 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1226 #endif |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1227 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1228 value = (U8)mc->value; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1229 switch(value) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1230 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1231 case AUDIO_HEADSET_HOOK_DETECT: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1232 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1233 TRACE_EVENT("AUDIO_HEADSET_HOOK_DETECT"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1234 if( winIsFocussed(call_data.win_incoming)) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1235 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1236 dialog_info_destroy(win); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1237 if(Callback != NULL) /* x0039928 - Lint warning fix */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1238 (Callback)(parent_win,Identifier, INFO_KCD_LEFT); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1239 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1240 else if(call_data.win) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1241 mmi_hook_handle(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1242 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1243 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1244 case AUDIO_HEADSET_UNPLUGGED: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1245 TRACE_EVENT("AUDIO_HEADSET_UNPLUGGED"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1246 //x0pleela 20 Mar, 2007 ER: OMAPS00122561 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1247 #ifdef FF_PHONE_LOCK |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1248 //Set headset connect to FALSE |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1249 mmi_set_Headset_Reg(FALSE); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1250 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1251 //x0pleela 23 May, 2007 DR: OMAPS00132483 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1252 //get the phone lock status |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1253 if( !mfw_get_Phlock_status() ) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1254 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1255 #endif /*FF_PHONE_LOCK*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1256 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1257 mmi_device_status_info(NULL,TxtHeadset,TxtRemoved,NULL); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1258 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1259 // 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
|
1260 mfw_hook_unregister(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1261 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1262 //x0pleela 20 Mar, 2007 ER: OMAPS00122561 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1263 #ifdef FF_PHONE_LOCK |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1264 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1265 #endif /*FF_PHONE_LOCK*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1266 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1267 mfw_audio_device_indication(value); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1268 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1269 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1270 case AUDIO_HEADSET_PLUGGED: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1271 TRACE_EVENT("AUDIO_HEADSET_PLUGGED"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1272 //x0pleela 20 Mar, 2007 ER: OMAPS00122561 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1273 #ifdef FF_PHONE_LOCK |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1274 //set headset connect to TRUE |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1275 mmi_set_Headset_Reg(TRUE); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1276 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1277 //x0pleela 23 May, 2007 DR: OMAPS00132483 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1278 //get the phone lock status |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1279 if( !mfw_get_Phlock_status() ) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1280 #endif /*FF_PHONE_LOCK*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1281 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1282 mmi_device_status_info(NULL,TxtHeadset,TxtInserted,NULL); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1283 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1284 mfw_audio_device_indication(value); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1285 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1286 //x0pleela 20 Mar, 2007 ER: OMAPS00122561 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1287 #ifdef FF_PHONE_LOCK |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1288 //x0pleela 23 May, 2007 DR: OMAPS00132483 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1289 //get the phone lock status |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1290 if( !mfw_get_Phlock_status() ) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1291 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1292 #endif /*FF_PHONE_LOCK*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1293 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1294 // 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
|
1295 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
|
1296 mfw_hook_register(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1297 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1298 //x0pleela 20 Mar, 2007 ER: OMAPS00122561 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1299 #ifdef FF_PHONE_LOCK |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1300 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1301 #endif /*FF_PHONE_LOCK*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1302 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1303 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1304 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1305 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1306 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1307 //indicates the events related to the carkit |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1308 case MfwMmeCarkit: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1309 value = (U8) mc->value; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1310 switch(value) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1311 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1312 case AUDIO_CARKIT_UNPLUGGED: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1313 TRACE_EVENT("AUDIO_CARKIT_UNPLUGGED"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1314 mmi_device_status_info(NULL,TxtCarkit,TxtRemoved,NULL); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1315 mfw_audio_device_indication(value); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1316 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1317 case AUDIO_CARKIT_PLUGGED: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1318 TRACE_EVENT("AUDIO_CARKIT_PLUGGED"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1319 mmi_device_status_info(NULL,TxtCarkit,TxtInserted,NULL); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1320 mfw_audio_device_indication(value); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1321 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1322 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1323 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1324 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1325 //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
|
1326 #ifdef FF_MMI_USBMS |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1327 case MfwMmeUSBMS: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1328 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1329 value = (U8) mc->value; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1330 switch(value) |
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 MFW_USB_CABLE_CONNECT_EVENT : |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1333 //x0pleela 16 Mar, 2007 ER: OMAPS00122561 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1334 #ifdef FF_PHONE_LOCK |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1335 //set usb_ms_enum to TRUE |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1336 mmi_set_usbms_enum( TRUE); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1337 //x0pleela 23 May, 2007 DR: OMAPS00132483 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1338 //get the phone lock status |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1339 if( !mfw_get_Phlock_status() ) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1340 #endif /*FF_PHONE_LOCK*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1341 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1342 mmi_usb_enumeration_options(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1343 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1344 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1345 case MFW_USB_CABLE_DISCONNECT_EVENT : |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1346 //x0pleela 16 Mar, 2007 ER: OMAPS00122561 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1347 #ifdef FF_PHONE_LOCK |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1348 //set usb_ms_enum to FALSE |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1349 mmi_set_usbms_enum( FALSE ); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1350 //x0pleela 23 May, 2007 DR: OMAPS00132483 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1351 //get the phone lock status |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1352 if( !mfw_get_Phlock_status() ) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1353 #endif /*FF_PHONE_LOCK*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1354 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1355 mmi_usbms_mode_disconnect(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1356 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1357 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1358 #ifdef FF_MMI_FILEMANAGER |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1359 case MFW_TFLASH_INSERTED_EVENT: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1360 mmi_device_status_info(NULL,TxtTflash,TxtInserted,NULL); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1361 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1362 case MFW_TFLASH_REMOVED_EVENT: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1363 mmi_device_status_info(NULL,TxtTflash,TxtRemoved,NULL); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1364 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1365 #endif |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1366 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1367 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1368 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1369 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1370 #endif |
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 default: |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1373 return 1; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1374 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1375 return 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1376 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1377 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1378 #if(0) /* x0039928 - Lint warning removal */ |
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 $Function: backlight |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1382 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1383 $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
|
1384 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1385 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1386 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1387 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1388 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1389 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1390 static void backlight (void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1391 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1392 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1393 |
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 #endif |
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 $Function: timesEvent |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1399 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1400 $Description: times event clock |
3
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 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1403 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1404 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1405 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1406 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1407 static int timesEvent (MfwEvt e, MfwTim *t) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1408 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1409 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1410 //RM only for PC testing |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1411 /* x0039928 -Lint warning removal |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1412 second += 60; */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1413 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1414 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1415 idleEvent(IdleUpdate); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1416 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1417 /*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
|
1418 if (CphsPresent() == CPHS_ERR) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1419 cphs_support_check(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1420 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1421 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1422 mme_backlightEvent(BL_IDLE_TIMER); |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1423 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1424 timStart(times); |
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 return 1; |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1429 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1430 /******************************************************************************* |
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 $Function: showCLOCK |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1433 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1434 $Description: display clock |
3
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 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1437 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1438 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1439 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1440 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1441 void showCLOCK(void) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1442 { /*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
|
1443 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
|
1444 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1445 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1446 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1447 $Function: setClockFormat |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1448 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1449 $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
|
1450 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1451 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1452 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1453 $Arguments: format enum |
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 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1456 void setClockFormat(UBYTE format) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1457 {/*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
|
1458 if (format == MFW_TIME_FORMAT_12HOUR) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1459 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
|
1460 else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1461 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
|
1462 // Jul 22,2004 CRR:20896 xrashmic - SASKEN |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1463 // 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
|
1464 flash_write(); |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1465 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1466 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
|
1467 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1468 // 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
|
1469 // 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
|
1470 // 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
|
1471 // 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
|
1472 UBYTE getClockFormat() |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1473 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1474 return FFS_flashData.time_format; |
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 /*SPR 1725, removed ClockSet and DateSet functions*/ |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1481 $Function: showDATE |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1482 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1483 $Description: display date |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1484 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1485 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1486 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1487 $Arguments: |
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 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1490 void showDATE(void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1491 {/*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
|
1492 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
|
1493 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1494 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1495 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1496 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1497 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1498 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1499 $Function: displayAlignedText |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1500 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1501 $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
|
1502 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1503 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1504 $Returns: none. |
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 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1507 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1508 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1509 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
|
1510 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1511 int stringLength = 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1512 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
|
1513 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1514 dspl_DevCaps deviceCaps; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1515 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1516 dspl_GetDeviceCaps(&deviceCaps); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1517 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1518 /* 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
|
1519 * 0 means whole string will be used. */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1520 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1521 stringLength = (int)dspl_GetTextExtent(string, 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1522 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1523 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
|
1524 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1525 switch ( x_alignment ) { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1526 case LEFT: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1527 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1528 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1529 case RIGHT: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1530 startXPos = (USHORT) deviceCaps.Width - stringLength /*- OneCharLen*/ ; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1531 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1532 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1533 case CENTER: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1534 startXPos = (USHORT) (deviceCaps.Width - stringLength) / 2; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1535 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1536 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1537 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1538 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
|
1539 } |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1542 $Function: displayAlignedPrompt |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1543 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1544 $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
|
1545 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1546 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1547 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1548 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1549 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1550 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1551 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
|
1552 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1553 int stringLength = 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1554 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
|
1555 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1556 dspl_DevCaps deviceCaps; |
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 dspl_GetDeviceCaps(&deviceCaps); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1559 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1560 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1561 /* 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
|
1562 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
|
1563 switch ( x_alignment ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1564 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1565 case LEFT: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1566 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1567 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1568 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1569 case RIGHT: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1570 startXPos = (USHORT) deviceCaps.Width - stringLength /*- OneCharLen*/ ; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1571 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1572 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1573 case CENTER: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1574 startXPos = (USHORT) (deviceCaps.Width - stringLength) / 2; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1575 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1576 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1577 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1578 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1579 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
|
1580 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1581 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1582 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1583 $Function: mainShutdown |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1584 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1585 $Description: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1586 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1587 $Returns: none. |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1588 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1589 $Arguments: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1590 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1591 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1592 void mainShutdown(void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1593 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1594 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1595 TRACE_FUNCTION("mainShutdown ()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1596 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1597 if(deregis) |
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 //---------------start: Mobile OFF------------------- |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1600 TRACE_EVENT(" Mobile OFF"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1601 /* delete the state of mobile on */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1602 globalMobileMode = globalMobileMode & (~GlobalMobileOn); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1603 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1604 deregis = FALSE; |
3
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 mmiExit();/* RM 20-07 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1607 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1608 //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
|
1609 // 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
|
1610 #ifdef TI_PS_UICC_CHIPSET_15 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1611 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
|
1612 #else |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1613 SIM_PowerOff(); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1614 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1615 #ifndef _SIMULATION_ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1616 AI_Power(0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1617 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1618 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1619 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1620 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1621 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1622 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1623 $Function: globalBatteryUpdate |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1624 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1625 $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
|
1626 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1627 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1628 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1629 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1630 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1631 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1632 int globalBatteryUpdate (U8 value) |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1635 MmiModuleDel (ModuleBattLow); /* delete the state */ |
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 globalBatteryMode = GlobalBatteryGreater5; |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1640 switch (value) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1641 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1642 case 0: /* battery low */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1643 globalBatteryPicNumber = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1644 globalBatteryMode = GlobalBatteryLesser5; |
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 /* is just a global status */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1647 MmiModuleSet (ModuleBattLow); /* set the state */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1648 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1649 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1650 case 1: |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1651 globalBatteryPicNumber = 1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1652 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1653 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1654 case 2: |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1655 globalBatteryPicNumber = 2; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1656 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1657 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1658 case 3: |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1659 globalBatteryPicNumber = 3; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1660 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1661 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1662 case 4: |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1663 globalBatteryPicNumber = 4; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1664 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1665 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1666 default: |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1667 globalBatteryPicNumber = 2; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1668 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1669 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1670 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1671 idleEvent(IdleUpdate); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1672 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1673 return 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1674 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1675 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1676 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1677 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1678 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1679 $Function: globalSignalUpdate |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1680 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1681 $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
|
1682 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1683 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1684 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1685 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1686 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1687 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1688 int globalSignalUpdate (U8 value) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1689 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1690 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1691 globalSignalPicNumber = value; |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1692 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1693 idleEvent(IdleUpdate); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1694 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1695 dspl_Enable(1); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1696 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1697 return 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1698 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1699 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1700 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1701 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1702 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1703 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1704 $Function: globalFlashBattery |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1705 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1706 $Description: exit MMI main module |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1707 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1708 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1709 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1710 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1711 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1712 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1713 void globalFlashBattery (void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1714 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1715 TRACE_EVENT(" globalFlashBattery "); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1716 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1717 globalBatteryPicNumber++; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1718 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1719 if(globalBatteryPicNumber > 4) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1720 globalBatteryPicNumber = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1721 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1722 idleEvent(IdleUpdate); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1723 TRACE_EVENT(" start the timer for Blink "); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1724 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1725 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1726 /* 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
|
1727 * functionality can be found in AUITextEntry.c */ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1728 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1729 #ifndef NEW_EDITOR |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1730 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1731 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1732 $Function: editShowHeader |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1733 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1734 $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
|
1735 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1736 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1737 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1738 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1739 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1740 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1741 /*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
|
1742 static void editShowHeader (void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1743 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1744 int alphachar; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1745 MfwEdt *edit = ((MfwHdr *) myHandle)->data; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1746 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1747 TRACE_FUNCTION("editShowHeader"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1748 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1749 edtChar(myHandle,ecDel); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1750 if (upCase) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1751 alphachar = editAlphaU[editAlphaKey][editAlphaLevel]; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1752 else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1753 alphachar = editAlpha[editAlphaKey][editAlphaLevel]; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1754 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1755 if (!(editAlphaMode && editAlphaKey != KCD_MAX)) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1756 alphachar= ' '; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1757 else if (editHiddenMode) // SH - in hidden mode... |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1758 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
|
1759 #ifdef NO_ASCIIZ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1760 /*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
|
1761 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
|
1762 alphachar = alphachar << 8; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1763 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1764 {/*NM p025*/ |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1765 edit->attr->alphaMode = TRUE; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1766 } |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1767 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1768 edtChar(myHandle,alphachar); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1769 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1770 /* |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1771 is this actually useless after insert a |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1772 character to call "ecRight" and then "ecLeft" |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1773 For the multitap we need only two steps: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1774 "ecDel" plus insert the character |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1775 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1776 edtChar(myHandle,ecLeft);*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1777 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1778 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1779 {edit->attr->alphaMode = FALSE;} |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1780 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1781 /*p025 end*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1782 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1783 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1784 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1785 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1786 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1787 $Function: editEventTim |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1788 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1789 $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
|
1790 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1791 $Returns: none. |
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 $Arguments: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1794 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1795 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1796 /*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
|
1797 static int editEventTim (MfwEvt e, MfwTim *t) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1798 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1799 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
|
1800 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1801 TRACE_FUNCTION("editEventTim"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1802 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1803 if (!(editAlphaMode || editFormatMode)) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1804 return 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1805 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1806 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1807 /*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
|
1808 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1809 // SH - modifications for format mode & hidden mode |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1810 if (editFormatMode) // SH - advance format pointer when |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1811 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1812 if (editHiddenMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1813 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1814 editCharFindNext('*'); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1815 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1816 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1817 editCharFindNext(ecRight); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1818 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1819 else if (editHiddenMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1820 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1821 edtChar(myHandle,'*'); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1822 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1823 // end of modifications |
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 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1826 edtChar(myHandle,ecRight); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1827 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1828 editAlphaLevel = KEY_PAD_MAX-1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1829 editAlphaKey = KCD_MAX; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1830 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1831 return 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1832 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1833 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1834 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1835 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1836 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1837 $Function: editEventKey |
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 $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
|
1840 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1841 $Returns: none. |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1842 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1843 $Arguments: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1844 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1845 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1846 int editEventKey (MfwEvt e, MfwKbd *k) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1847 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1848 /*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
|
1849 MfwEdt *edit; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1850 char *tb; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1851 UBYTE ch = '.'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1852 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1853 char *format = formatHandle; // SH - temporary format template |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1854 char formatchar; // SH - Current format character |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1855 char alphachar; // SH - Current multi-tap character |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1856 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
|
1857 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
|
1858 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1859 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
|
1860 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1861 /*NM p026*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1862 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
|
1863 return 1; |
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 /* 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
|
1866 * 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
|
1867 * to check the buffer */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1868 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1869 edit = ((MfwHdr *) myHandle)->data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1870 tb = edit->attr->text; |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1871 /*p026 end*/ |
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 /* 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
|
1874 if (tb[0]==0x80) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1875 unicode = TRUE; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1876 else |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1877 unicode = FALSE; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1878 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1879 /* SH - formatted input mode (for WAP) */ |
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 if (editFormatMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1882 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1883 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
|
1884 return 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1885 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1886 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
|
1887 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1888 return 1; // print character |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1889 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1890 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1891 formatchar = format[*formatIndex]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1892 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1893 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
|
1894 return 1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1895 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1896 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
|
1897 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1898 (*formatIndex)++; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1899 *fieldIndex = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1900 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
|
1901 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1902 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1903 /* Multi-tap input |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1904 * |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1905 * 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
|
1906 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1907 if (editAlphaKey != KCD_MAX && editAlphaKey != k->code) |
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 timStop(editTim); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1910 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1911 alphachar = NULL; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1912 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1913 switch(formatchar) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1914 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1915 case 'X': // Uppercase alphabetic only |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1916 case 'A': // Uppercase alphabetic or punctuation |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1917 alphachar = editAlphaU[editAlphaKey][editAlphaLevel]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1918 break; |
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 case 'x': // Lowercase alphabetic only |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1921 case 'a': // Lowercase alphabetic or punctuation |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1922 alphachar = editAlpha[editAlphaKey][editAlphaLevel]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1923 break; |
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 case 'M': |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1926 case 'm': |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1927 if (upCase) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1928 alphachar = editAlphaU[editAlphaKey][editAlphaLevel]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1929 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1930 alphachar = editAlpha[editAlphaKey][editAlphaLevel]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1931 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1932 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1933 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1934 if (alphachar!=NULL) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1935 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1936 if (editHiddenMode) // SH - in hidden mode... |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1937 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1938 tmpBuf[edit->cp] = alphachar; // store character in buffer |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1939 alphachar = '*'; // ...and show star |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1940 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1941 editCharFindNext(alphachar); // Add number to buffer & advance cursor |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1942 editAlphaLevel = KEY_PAD_MAX-1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1943 editAlphaKey = KCD_MAX; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1944 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
|
1945 return 1; // allow another character |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1946 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1947 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1948 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1949 formatchar = format[*formatIndex]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1950 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1951 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
|
1952 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1953 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1954 /* Numeric */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1955 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1956 if (formatchar == 'N') // A numeric digit is expected |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1957 { |
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] = editControls[k->code]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1961 editCharFindNext('*'); |
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 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1964 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
|
1965 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
|
1966 editAlphaKey = KCD_MAX; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1967 return 1; |
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 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1970 /* Multi-tap alphanumeric */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1971 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1972 alphachar = NULL; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1973 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1974 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
|
1975 return 1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1976 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1977 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
|
1978 return 1; |
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 editAlphaKey = k->code; // Store the key pressed |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1981 editAlphaLevel++; // Increment through list of symbols |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1982 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
|
1983 editAlphaLevel = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1984 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1985 safetycounter = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1986 while (alphachar==NULL && safetycounter<KEY_PAD_MAX) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1987 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1988 validCharacter = FALSE; |
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 switch(formatchar) |
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 case 'X': |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1993 alphachar = editAlphaU[editAlphaKey][editAlphaLevel]; // Uppercase... |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1994 validCharacter = (alphachar>='A' && alphachar<='Z'); // ...alphabetic only |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1995 break; |
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 case 'x': |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1998 alphachar = editAlpha[editAlphaKey][editAlphaLevel]; // Lowercase |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1999 validCharacter = (alphachar>='a' && alphachar<='z'); // ...alphabetic only |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2000 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2001 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2002 case 'A': |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2003 alphachar = editAlphaU[editAlphaKey][editAlphaLevel]; // Uppercase... |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2004 validCharacter = (alphachar<'0' || alphachar>'9'); // ..non-numeric |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2005 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2006 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2007 case 'a': |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2008 alphachar = editAlpha[editAlphaKey][editAlphaLevel]; // Lowercase... |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2009 validCharacter = (alphachar<'0' || alphachar>'9'); // ..non-numeric |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2010 break; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2011 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2012 case 'M': |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2013 case 'm': |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2014 if (upCase) // User-selected case... |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2015 alphachar = editAlphaU[editAlphaKey][editAlphaLevel]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2016 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2017 alphachar = editAlpha[editAlphaKey][editAlphaLevel]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2018 validCharacter = TRUE; // ...any character accepted |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2019 break; |
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 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2022 if (!validCharacter) // If character isn't uppercase alphabetic, |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2023 { // find the next one that is, |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2024 alphachar = NULL; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2025 safetycounter++; // (but don't search forever) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2026 editAlphaLevel++; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2027 if (editAlphaLevel > (KEY_PAD_MAX-1)) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2028 editAlphaLevel = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2029 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2030 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2031 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2032 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
|
2033 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2034 if (editHiddenMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2035 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2036 tmpBuf[edit->cp] = alphachar; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2037 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2038 edtChar(myHandle,alphachar); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2039 edtChar(myHandle,ecLeft); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2040 timStart(editTim); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2041 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2042 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2043 editAlphaKey = KEY_MAX; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2044 return 1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2045 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2046 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2047 if (k->code==KCD_HASH) // Hash key |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2048 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2049 if (strchr("AaMm",formatchar)) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2050 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2051 if (editHiddenMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2052 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2053 tmpBuf[edit->cp] = ' '; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2054 editCharFindNext('*'); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2055 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2056 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2057 editCharFindNext(' '); // Prints a space in this mode |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2058 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2059 return 1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2060 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2061 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2062 if (k->code==KCD_STAR) // Star key |
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 if (strchr("AaMm",formatchar)) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2065 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2066 if (editHiddenMode) |
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 tmpBuf[edit->cp] = '*'; |
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('*'); |
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 return 1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2073 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2074 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2075 return 1; |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2076 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2077 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2078 /************************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2079 /* Normal multi-tap mode */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2080 /************************/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2081 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2082 if (editAlphaMode) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2083 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2084 if (editAlphaKey != KCD_MAX && editAlphaKey != k->code) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2085 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2086 timStop(editTim); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2087 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2088 /*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
|
2089 edtChar(myHandle,ecRight); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2090 /*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
|
2091 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2092 editAlphaLevel = KEY_PAD_MAX-1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2093 editAlphaKey = KCD_MAX; |
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 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2096 if (k->code <= KCD_HASH) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2097 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2098 editAlphaLevel++; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2099 if (editAlphaLevel > (KEY_PAD_MAX-1)) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2100 editAlphaLevel = 0; |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2101 if (editAlphaKey == KCD_MAX) // Inserting a new character |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2102 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2103 TRACE_EVENT("Inserting character."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2104 /*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
|
2105 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2106 /* NM p01306 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2107 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
|
2108 was not working for inserting characters. |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2109 This additional change should work now: |
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 if (unicode) /*SPR957 - SH - use new unicode flag */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2112 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2113 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
|
2114 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2115 else |
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 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
|
2118 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2119 /* NM p01306 END */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2120 } |
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 editAlphaKey = k->code; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2123 editShowHeader(); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2124 timStart(editTim); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2125 return 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2126 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2127 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2128 alphachar = NULL; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2129 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2130 switch (k->code) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2131 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2132 case KCD_HUP: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2133 return 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2134 case KCD_HASH: |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2135 /* 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
|
2136 But in numeric mode insert '#'. */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2137 if (editAlphaMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2138 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2139 alphachar = ' '; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2140 editShowHeader(); |
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 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2143 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2144 if (editCalcMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2145 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2146 if(!(strchr(tb, ch ))) /* set '.' only once ! */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2147 alphachar = '.'; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2148 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2149 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2150 alphachar = '#'; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2151 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2152 /* end KGT */ |
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 /* SH - hidden mode */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2155 if (editHiddenMode) |
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 tmpBuf[edit->cp] = alphachar; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2158 alphachar = '*'; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2159 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2160 /* end of hidden mode */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2161 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2162 /* 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
|
2163 if (unicode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2164 alphachar = alphachar << 8; |
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 edtChar(myHandle,alphachar); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2167 return 1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2168 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2169 case KCD_STAR: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2170 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2171 if (editCalcMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2172 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2173 if(!(strchr(tb, ch ))) /* set '.' only once ! */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2174 alphachar = '.'; /* SPR957 - SH*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2175 /*edtChar(myHandle,'.');*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2176 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2177 else |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2178 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2179 /*if (!editAlphaMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2180 edtChar(myHandle,'*'); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2181 else */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2182 if (editAlphaMode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2183 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2184 editShowHeader(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2185 } |
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 alphachar = '*'; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2188 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2189 /* SH - hidden mode */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2190 if (editHiddenMode) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2191 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2192 tmpBuf[edit->cp] = '*'; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2193 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2194 /* end of hidden mode */ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2195 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2196 /* 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
|
2197 if (unicode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2198 alphachar = alphachar << 8; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2199 edtChar(myHandle,alphachar); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2200 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2201 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
|
2202 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2203 case KCD_ABC: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2204 editAlphaMode = (UBYTE) !editAlphaMode; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2205 if (editAlphaMode) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2206 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2207 editAlphaLevel = KEY_PAD_MAX-1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2208 editAlphaKey = KCD_MAX; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2209 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2210 editShowHeader(); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2211 return 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2212 default: |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2213 if (editAlphaMode){ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2214 timStop(editTim); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2215 edtChar(myHandle,ecRight); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2216 return 1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2217 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2218 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2219 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2220 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2221 /* SH - hidden mode */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2222 if (editHiddenMode) |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2223 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2224 tmpBuf[edit->cp] = editControls[k->code]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2225 alphachar = '*'; /* SPR957 - SH*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2226 /* 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
|
2227 if (unicode) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2228 alphachar = alphachar << 8; |
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 edtChar(myHandle,alphachar); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2231 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2232 /* end of hidden mode */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2233 else |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2234 { /*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
|
2235 edit->attr->alphaMode = editAlphaMode; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2236 edtChar(myHandle,editControls[k->code]); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2237 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2238 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2239 return 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2240 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2241 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2242 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2243 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2244 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2245 $Function: editClear |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2246 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2247 $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
|
2248 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2249 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2250 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2251 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2252 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2253 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2254 /*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
|
2255 void editClear() |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2256 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2257 int editIndex = 0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2258 MfwEdt *edit = ((MfwHdr *) myHandle)->data; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2259 char *tb = edit->attr->text; |
66
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 *formatIndex = -1; // Find first non-fixed character, |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2262 edtChar(myHandle,ecTop); // starting from the top. |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2263 editCharFindNext(NULL); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2264 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2265 while (edit->cp <strlen(tb)) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2266 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2267 editCharFindNext(' '); // Overwrite everything with spaces |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2268 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2269 edtChar(myHandle,ecTop); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2270 *formatIndex = -1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2271 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
|
2272 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2273 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2274 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2275 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2276 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2277 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2278 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2279 $Function: editCharFindNext |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2280 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2281 $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
|
2282 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
|
2283 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2284 $Returns: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2285 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2286 $Arguments: character - the character (or code) to print |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2287 |
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 /*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
|
2290 void editCharFindNext(char character) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2291 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2292 char *format = formatHandle; // SH - temporary format template |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2293 char formatchar; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2294 MfwEdt *edit = ((MfwHdr *) myHandle)->data; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2295 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
|
2296 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2297 TRACE_EVENT("editCharFindNext"); |
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 // Check for delimited field |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2300 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2301 if (*formatIndex>0) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2302 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2303 formatchar = format[*formatIndex-1]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2304 if ((formatchar>'0' && formatchar<='9') || formatchar=='*') |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2305 inField = 2; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2306 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2307 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2308 formatchar = format[*formatIndex]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2309 if ((formatchar>'0' && formatchar<='9') || formatchar=='*') |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2310 inField = 1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2311 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2312 // 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
|
2313 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2314 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
|
2315 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2316 TRACE_EVENT("End of string."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2317 return; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2318 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2319 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2320 if (character!=NULL) // First add the required character |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2321 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2322 edtChar(myHandle, character); // to the buffer |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2323 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2324 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2325 // Check for start of fixed input field |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2326 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2327 if (inField==1) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2328 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2329 TRACE_EVENT("Entering field."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2330 (*formatIndex)++; // Get us into the field... |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2331 *fieldIndex = 0; // ...and reset the field index |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2332 formatchar = *(format+*formatIndex); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2333 if (formatchar=='M') |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2334 upCase = TRUE; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2335 if (formatchar=='m') |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2336 upCase = FALSE; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2337 inField = 2; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2338 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2339 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2340 // 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
|
2341 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2342 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
|
2343 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2344 TRACE_EVENT("Move on in field."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2345 (*fieldIndex)++; // Increment the position in the field |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2346 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
|
2347 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2348 TRACE_EVENT("Exiting field."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2349 (*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
|
2350 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2351 return; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2352 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2353 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2354 // 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
|
2355 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2356 (*formatIndex)++; // Point to next character |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2357 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2358 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
|
2359 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2360 edtChar(myHandle,ecRight); // Skip over them |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2361 (*formatIndex)+=2; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2362 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2363 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2364 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
|
2365 *formatIndex = strlen(format); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2366 /***************************Go-lite Optimization changes Start***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2367 //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
|
2368 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
|
2369 /***************************Go-lite Optimization changes end***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2370 return; |
3
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 |
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 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2375 $Function: editFindPrev |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2376 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2377 $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
|
2378 moves the cursor there if possible |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2379 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2380 $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
|
2381 1 if the previous character has been found |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2382 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
|
2383 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2384 $Arguments: |
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 /*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
|
2388 int editFindPrev() |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2389 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2390 char *format = formatHandle; // SH - temporary format template |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2391 int editIndex; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2392 char formatchar; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2393 MfwEdt *edit = ((MfwHdr *) myHandle)->data; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2394 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2395 TRACE_EVENT("editFindPrev"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2396 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2397 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
|
2398 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2399 TRACE_EVENT("Exit - start of string found"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2400 /***************************Go-lite Optimization changes Start***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2401 //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
|
2402 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
|
2403 /***************************Go-lite Optimization changes end***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2404 return 2; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2405 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2406 // 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
|
2407 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2408 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
|
2409 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2410 formatchar = *(format+*formatIndex-1); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2411 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
|
2412 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2413 TRACE_EVENT("In delimited field."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2414 edtChar(myHandle,ecLeft); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2415 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
|
2416 (*fieldIndex)--; // Decrement the position in the field |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2417 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2418 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
|
2419 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2420 TRACE_EVENT("Getting out of field."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2421 (*formatIndex)--; // Get out of the field |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2422 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2423 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2424 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2425 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
|
2426 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2427 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
|
2428 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2429 TRACE_EVENT("Shorten string"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2430 return 3; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2431 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2432 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2433 return 1; // then we're done |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2434 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2435 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2436 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2437 // 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
|
2438 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2439 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
|
2440 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2441 while (editIndex>0) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2442 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2443 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
|
2444 editIndex -=2; // Look back a further 2 characters |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2445 else // If there's a non-fixed character |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2446 break; // then exit loop |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2447 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2448 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2449 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
|
2450 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2451 TRACE_EVENT("Exit - skipped over fixed character"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2452 /***************************Go-lite Optimization changes Start***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2453 //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
|
2454 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
|
2455 /***************************Go-lite Optimization changes end***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2456 return 2; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2457 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2458 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2459 formatchar = format[editIndex-1]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2460 if ((formatchar>'0' && formatchar<='9') || formatchar=='*') |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2461 (*fieldIndex)--; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2462 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2463 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
|
2464 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2465 while(*formatIndex>editIndex) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2466 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2467 if (edtChar(myHandle,ecLeft)==MfwResOk) // move cursor there |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2468 (*formatIndex)--; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2469 if (format[*formatIndex]=='\\') |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2470 (*formatIndex)--; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2471 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2472 TRACE_EVENT("Found new position."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2473 /***************************Go-lite Optimization changes Start***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2474 //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
|
2475 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
|
2476 /***************************Go-lite Optimization changes end***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2477 return 1; // Found new position |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2478 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2479 TRACE_EVENT("Position unchanged."); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2480 /***************************Go-lite Optimization changes Start***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2481 //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
|
2482 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
|
2483 /***************************Go-lite Optimization changes end***********************/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2484 return 0; // Position unchanged |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2485 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2486 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2487 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2488 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2489 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2490 $Function: editActivate |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2491 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2492 $Description: Activates the edit component |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2493 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2494 $Returns: none. |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2495 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2496 $Arguments: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2497 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2498 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2499 void editActivate (MfwHnd e, int AlphaMode) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2500 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2501 TRACE_FUNCTION("editActivate"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2502 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2503 myHandle = e; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2504 /*NM p028*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2505 if (!editTim) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2506 editTim = timCreate(0,1000,(MfwCb) editEventTim); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2507 editAlphaMode = ((AlphaMode != 0) && (AlphaMode != 4) && (AlphaMode != 5)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2508 editCalcMode = (AlphaMode == 4); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2509 editFormatMode = (AlphaMode == 6); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2510 editHiddenMode = FALSE; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2511 editAlphaLevel = KEY_PAD_MAX-1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2512 editAlphaKey = KCD_MAX; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2513 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2514 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2515 |
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 $Function: editHiddenActivate |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2519 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2520 $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
|
2521 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2522 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2523 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2524 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2525 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2526 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2527 void editHiddenActivate (char *buffer) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2528 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2529 TRACE_FUNCTION("editHiddenActivate"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2530 tmpBuf = buffer; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2531 editHiddenMode = 1; |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2532 return; |
3
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 /******************************************************************************* |
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 $Function: editDeactivate |
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 $Description: deactivates the edit component |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2540 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2541 $Returns: none. |
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 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2544 |
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 void editDeactivate (void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2547 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2548 //myHandle = 0; //SPR#1014 - DS - Commented out. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2549 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2550 if (editTim) { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2551 timStop(editTim); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2552 timDelete(editTim); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2553 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2554 editTim = 0; |
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 /******************************************************************************* |
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 $Function: activeEditor |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2559 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2560 $Description: deactivates the edit component |
3
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 $Returns: none. |
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 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2565 |
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 MfwHnd activeEditor (void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2568 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2569 return myHandle; |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2572 /******************************************************************************* |
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 $Function: setformatpointers |
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 $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
|
2577 can access the format string |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2578 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2579 $Returns: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2580 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2581 $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
|
2582 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2583 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2584 |
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 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
|
2587 { |
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 TRACE_FUNCTION("setFormatPointers"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2590 formatHandle = format; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2591 formatIndex = index; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2592 fieldIndex = index2; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2593 return; |
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 #endif /* NEW_EDITOR */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2597 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2598 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2599 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2600 $Function: MmiModuleSet |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2601 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2602 $Description: Set the status |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2603 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2604 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2605 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2606 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2607 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2608 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2609 void MmiModuleSet (int module) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2610 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2611 switch(module) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2612 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2613 case ModuleIdle: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2614 MmiModule = MmiModule & ModuleBattLow; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2615 MmiModule = MmiModule | ModuleIdle; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2616 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2617 case ModuleInCall: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2618 MmiModuleDel(ModuleIdle); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2619 MmiModule=MmiModule | ModuleInCall; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2620 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2621 case ModuleCall: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2622 MmiModuleDel(ModuleIdle); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2623 MmiModule=MmiModule | ModuleCall; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2624 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2625 case ModuleMenu: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2626 MmiModuleDel(ModuleIdle); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2627 MmiModule=MmiModule | ModuleMenu; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2628 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2629 case ModulePhon: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2630 MmiModuleDel(ModuleIdle); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2631 MmiModule=MmiModule | ModulePhon; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2632 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2633 case ModuleSms: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2634 MmiModuleDel(ModuleIdle); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2635 MmiModule=MmiModule | ModuleSms; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2636 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2637 case ModuleBattLow: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2638 MmiModule=MmiModule | ModuleBattLow; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2639 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2640 case ModuleSAT: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2641 MmiModuleDel(ModuleIdle); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2642 MmiModule=MmiModule | ModuleSAT; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2643 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2644 case ModuleAlarm: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2645 MmiModuleDel(ModuleIdle); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2646 MmiModule=MmiModule | ModuleAlarm; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2647 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2648 case ModuleFax: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2649 MmiModule=MmiModule | ModuleFax; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2650 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2651 case ModuleDialling: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2652 MmiModuleDel(ModuleIdle); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2653 MmiModule=MmiModule | ModuleDialling; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2654 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2655 default: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2656 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2657 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2658 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2659 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2660 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2661 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2662 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2663 /******************************************************************************* |
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 $Function: MmiModuleDel |
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 $Description: Delete the status |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2668 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2669 $Returns: none. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2670 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2671 $Arguments: |
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 void MmiModuleDel (int module) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2675 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2676 switch(module) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2677 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2678 case ModuleIdle: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2679 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2680 MmiModule = MmiModule & (~ModuleIdle); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2681 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2682 case ModuleInCall: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2683 MmiModule=MmiModule & (~ModuleInCall); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2684 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2685 case ModuleCall: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2686 MmiModule=MmiModule & (~ModuleCall); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2687 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2688 case ModuleMenu: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2689 MmiModule=MmiModule & (~ModuleMenu); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2690 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2691 case ModulePhon: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2692 MmiModule=MmiModule & (~ModulePhon); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2693 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2694 case ModuleSms: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2695 MmiModule=MmiModule & (~ModuleSms); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2696 break; |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2697 case ModuleBattLow: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2698 MmiModule=MmiModule & (~ModuleBattLow); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2699 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2700 case ModuleSAT: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2701 MmiModule=MmiModule & (~ModuleSAT); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2702 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2703 case ModuleAlarm: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2704 MmiModule=MmiModule & (~ModuleAlarm); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2705 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2706 case ModuleFax: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2707 MmiModule=MmiModule & (~ModuleFax); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2708 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2709 case ModuleDialling: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2710 MmiModule=MmiModule & (~ModuleDialling); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2711 default: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2712 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2713 } |
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 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2716 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2717 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2718 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2719 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2720 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2721 $Function: showGoodBye |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2722 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2723 $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
|
2724 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2725 $Returns: none |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2726 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2727 $Arguments: |
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 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2731 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2732 static void showGoodBye (T_MFW_HND win) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2733 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2734 T_DISPLAY_DATA display_info; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2735 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2736 TRACE_FUNCTION("showGoodBye ()"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2737 dlg_zeroDisplayData(&display_info); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2738 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
|
2739 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2740 /* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2741 * Call Icon |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2742 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2743 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2744 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
|
2745 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2746 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2747 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2748 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2749 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2750 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2751 $Function: goodbye_cb |
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 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2754 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2755 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2756 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2757 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2758 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2759 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2760 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2761 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2762 static void goodbye_cb (void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2763 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2764 TRACE_FUNCTION("goodbye_cb ()"); |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2765 nm_deregistration(); /* start deregistration procedure */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2766 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2767 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2768 #ifdef FF_MMI_AUDIO_PROFILE |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2769 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
|
2770 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2771 T_DISPLAY_DATA display_info; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2772 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2773 TRACE_FUNCTION("mmi_device_status_info"); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2774 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
|
2775 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
|
2776 info_dialog(parent,&display_info); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2777 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2778 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2779 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2780 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2781 #if 0 /* FreeCalypso */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2782 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2783 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2784 $Function: menuBootTimeMsmt |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2785 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2786 $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
|
2787 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2788 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2789 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2790 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2791 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2792 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2793 int menuBootTimeMsmt(MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2794 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2795 int boot_time[4]; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2796 T_AUI_EDITOR_DATA editor_data; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2797 T_MFW_HND win = (T_MFW_HND)bookCurrentWindow(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2798 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2799 memset(buffer,0,sizeof(buffer)); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2800 get_boot_time(&boot_time); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2801 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
|
2802 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
|
2803 AUI_edit_SetDefault(&editor_data); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2804 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
|
2805 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
|
2806 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
|
2807 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
|
2808 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
|
2809 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2810 AUI_edit_Start(win, &editor_data); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2811 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2812 return 1; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2813 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2814 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2815 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2816 /* ****************************************************************** */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2817 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2818 void AI_Power(SYS_UWORD8 power) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2819 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2820 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2821 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2822 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2823 void SIM_PowerOff (void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2824 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2825 TRACE_FUNCTION ("SIM_PowerOff()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2826 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2827 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2828 #ifdef MMI_POWER_MANAGEMENT_TEST |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2829 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2830 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2831 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2832 $Function: mmi_PowerManagement_screen_forever |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2833 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2834 $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
|
2835 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2836 $Returns: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2837 $Arguments: window, Idetifier, reason |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2838 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2839 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2840 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2841 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
|
2842 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2843 timStart( timer_handle ); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2844 SVC_SCN_EnablePM( 0 ); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2845 Screen_Update = 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2846 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2847 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2848 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2849 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2850 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2851 $Function: mmi_PowerManagement_screen_forever |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2852 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2853 $Description: Used to display Power Management running Screen |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2854 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2855 $Returns: 0 - Success |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2856 1 - Error |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2857 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2858 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2859 $Arguments: window, textId/TestString, color |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2860 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2861 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2862 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
|
2863 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2864 T_DISPLAY_DATA DisplayInfo; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2865 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
|
2866 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
|
2867 DisplayInfo.TextString = TextStr; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2868 return info_dialog(win, &DisplayInfo); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2869 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2870 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2871 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2872 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2873 $Function: mmi_PowerManagement |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2874 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2875 $Description: Used to test the power Management |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2876 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2877 $Returns: 0 - Success |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2878 1 - Error |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2879 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2880 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2881 $Arguments: menu, menu item |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2882 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2883 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2884 int mmi_PowerManagement(MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2885 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2886 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
|
2887 timStop( timer_handle ); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2888 dspl_Enable(1); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2889 Screen_Update = 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2890 SVC_SCN_EnablePM( 1 ); |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2891 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2892 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2893 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2894 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2895 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2896 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2897 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2898 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2899 /*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
|
2900 #ifdef FF_POWER_MANAGEMENT |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2901 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2902 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2903 $Function: screenUpdateOn |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2904 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2905 $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
|
2906 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2907 $Returns: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2908 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2909 $Arguments: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2910 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2911 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2912 int screenUpdateOn(MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2913 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2914 if(FFS_flashData.refresh!=1) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2915 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2916 /*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
|
2917 idleEvent(IdleUpdate); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2918 timStart(times); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2919 timStart(timer_handle);/*starting mfw timer also*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2920 FFS_flashData.refresh=1; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2921 flash_write(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2922 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2923 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
|
2924 return MFW_EVENT_CONSUMED; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2925 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2926 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2927 |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2928 $Function: mmi_PowerManagement |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2929 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2930 $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
|
2931 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2932 $Returns: |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2933 |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2934 $Arguments: menu, menu item |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2935 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2936 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2937 int screenUpdateOff(MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2938 { |
66
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2939 if(FFS_flashData.refresh!=0) |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2940 { |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2941 /*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
|
2942 timStop(times); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2943 timStop(timer_handle); /*stoping mfw timer also*/ |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2944 FFS_flashData.refresh=0; |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2945 flash_write(); |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2946 } |
74a034762083
mmiMain.c: white space initial preen
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
2947 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
|
2948 return MFW_EVENT_CONSUMED; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2949 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2950 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2951 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2952 |