comparison src/ui/bmi/mmiMain.h @ 3:67bfe9f274f6

src/ui: import of src/ui3 from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:33:10 +0000
parents
children 6724664925c9
comparison
equal deleted inserted replaced
2:3a14ee9a9843 3:67bfe9f274f6
1 #ifndef _DEF_MMI_MAIN_H_
2 #define _DEF_MMI_MAIN_H_
3
4 /*******************************************************************************
5
6 CONDAT (UK)
7
8 ********************************************************************************
9
10 This software product is the property of Condat (UK) Ltd and may not be
11 disclosed to any third party without the express permission of the owner.
12
13 ********************************************************************************
14
15 $Project name: Basic MMI
16 $Project code: BMI (6349)
17 $Module: MMI
18 $File: MmiMain.h
19 $Revision: 1.0
20
21 $Author: Condat(UK)
22 $Date: 25/10/00
23
24 ********************************************************************************
25
26 Description:
27
28 This provides the root mofule for the basic MMI
29
30 ********************************************************************************
31 $History: MmiMmi.h
32
33 25/10/00 Original Condat(UK) BMI version.
34
35 Jun 09, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar)
36 Description : CPHS Roaming indication feature implementation
37 Solution : As part of the implementation, in this file, type of GlobalIconStatus is changed
38
39 $End
40
41 *******************************************************************************/
42
43
44
45
46 /*******************************************************************************
47
48 Type definitions
49
50 *******************************************************************************/
51
52
53
54
55 #include "mfw_cphs.h"
56
57 #include "MmiResources.h"
58
59
60 #define PROMPT(x, y, a, id) dspl_TextOut(x, y, a|DSPL_TXTATTR_CURRENT_MODE, (char*)MmiRsrcGetText(id))
61 #define ALIGNED_PROMPT(x_a, y, a, id) displayAlignedPrompt(x_a, y, a, id)
62 #define GET_TEXT(id) MmiRsrcGetText( id )
63
64 #define ETRACE(str) \
65 { char buf[64];##str##;\
66 TRACE_EVENT(buf);}
67
68 #define FTRACE(str) \
69 { char buf[64];##str##;\
70 TRACE_EVENT(buf);}
71
72
73 /* typedefs */
74 typedef enum {
75 NM_UNDEFINED,
76 NM_FULL_SERVICE,
77 NM_LIMITED_SERVICE,
78 NM_NO_SERVICE,
79 NM_SEARCHING,
80 NM_NO_NETWORK
81 } MMI_NM_SERVICE;
82
83
84 typedef enum
85 {
86 LEFT,
87 RIGHT,
88 CENTER
89 } T_MMI_ALIGN;
90
91
92 typedef enum {
93 SIM_UNDEFINED,
94 SIM_AVAIL,
95 SIM_REJECTED,
96 SIM_NOT_AVAIL
97 } MMI_SIM_STATUS;
98
99 typedef enum {
100 TWELVE_HOUR,
101 TWENTYFOUR_HOUR
102 } ClockFormats;
103
104 /*MC SPR 1725 removed date and clock definition*/
105
106
107 #define MAX_LINE 14
108
109 #define POS_BEGIN 0
110 #define POS_END 1
111 #define MAX_LINE 14
112 #define EDITOR_SIZE 41
113
114 /* GLOBAL DATA */
115 extern UBYTE editControls [KCD_MAX];
116 extern LngInfo mainLngInfo; /* language control block */
117 extern MfwHnd mainMmiLng; /* global language handler */
118
119 /* PROTOTYPES */
120 void mainInit (UBYTE InitCause);
121 void mainExit (UBYTE InitCause);
122
123 void setClockFormat(UBYTE format);
124 // Issue Number : MMI-SPR-12159 on 07/04/04 by Rashmi C N and Deepa M D
125 // change by Sasken ( Rashmi C N and Deepa M D) on April 07th 2004
126 // Bug : The AM PM for 12 hour fomrat was not being shown
127 // Solution : Added the following function to get the current time format from flash
128 UBYTE getClockFormat(void); // RAVI
129
130 /*SPR 1725, removed getClockString(), Clockset() and DateSet() function headers*/
131 void showCLOCK(void);
132 void showDATE(void);
133 /*SPR 1442 obsolete function*/
134 //void truncateString(char* strDest,char* strOrig,unsigned int truncLength,int pos,char* trunChar);
135 void displayAlignedText( T_MMI_ALIGN x_alignment, USHORT y_lineNum, UBYTE attrib, char* string );
136 void displayAlignedPrompt( T_MMI_ALIGN x_alignment, USHORT y_lineNum, UBYTE attrib, int string_id);
137 void mainShutdown(void);
138
139 extern char stringTrace[50];
140
141 /* Battery and Signal Status */
142 #define GlobalNothingIconFlag 0x00
143 #define GlobalBatteryIconFlag 0x01
144 #define GlobalSignalIconFlag 0x02
145 #define GlobalSMSIconFlag 0x04
146 #define GlobalVoiceMailIconFlag 0x08
147 #define GlobalCallForwardingIconFlag 0x10
148 #define GlobalSilentRingerIconFlag 0x20
149 #define GlobalKeyplockIconFlag 0x40
150 #define GlobalRingerIconFlag 0x80
151 #define GlobalVibratorIconFlag 0x100
152 #define GlobalRingVibrIconFlag 0x200
153 #define GlobalAlarmIconFlag 0x400
154 #define GlobalCipheringActivIconFlag 0x800
155 #define GlobalCipheringDeactivIconFlag 0x1000
156 /* SH 18/01/02. Indication for GPRS */
157 #ifdef MMI_GPRS_ENABLED
158 #define GlobalGPRSOnIconFlag 0x2000
159 #endif
160 /* SPR877 - SH - Indication for Homezone */
161 #ifdef MMI_HOMEZONE_ENABLED
162 #define GlobalHomezoneIconFlag 0x4000
163 #endif
164
165 #ifdef MMI_TTY_ENABLED
166 #ifndef GlobalHomezoneIconFlag
167 #define GlobalHomezoneIconFlag 0x4000
168 #endif
169 #endif
170
171 /* SPR#1352 - SH - TTY indication */
172 #define GlobalTTYIconFlag 0x8000
173 /* end SH */
174
175 /* Jun 09, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar) */
176 #define GlobalRoamingIconFlag 0x10000
177
178 /* Jun 09, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar)
179 Description : CPHS Roaming indication feature implementation
180 Solution : As part of the implementation, in this file, type of GlobalIconStatus is changed */
181 extern U32 GlobalIconStatus;
182 extern T_MFW_CFLAG_STATUS DivertStatus;
183
184 /* It could be helpful to check the */
185 /* global status where the user is : */
186
187 /* It is also possible to be in several */
188 /* status ! */
189
190 #define ModuleIdle 0x001 /*in Idle Screen */
191 #define ModuleCall 0x002 /*in during a call */
192 #define ModuleInCall 0x004 /*in Incoming call */
193 #define ModuleMenu 0x008 /*in Menu */
194 #define ModulePhon 0x010 /*in Phonebook */
195 #define ModuleSms 0x020 /*in SMS */
196 #define ModuleBattLow 0x040 /*in Battery Status < 5% */
197 #define ModuleSAT 0x080 /*in Sim Toolkit, like Idle*/
198 #define ModuleAlarm 0x100 /*in Organiser Alarm */
199 #define ModuleFax 0x200 /*in Fax/Data */
200 #define ModuleDialling 0x400 /*in Dialling state */
201
202 extern int MmiModule;
203
204
205
206
207 /* PROTOTYPES */
208
209 void MmiModuleSet (int modul); /* Set the status where the user is */
210 void MmiModuleDel (int modul); /* Delete the status where the user was */
211
212
213
214
215 /* Settings status*/
216
217 #define SettingsAnyKeyAnswerOn 0x01
218 #define SettingsAutoAnswerOn 0x02
219 #define SettingsKeyPadLockOn 0x04
220 #define SettingsKeypadClick 0x08
221 #define SettingsKeypadDTMF 0x10
222 #define SettingsSilentMode 0x20
223 #define SettingsCBDisable 0x80 /* SPR 2470 0x80- disable CB display 0-display CB */
224 //extern USHORT settingsStatus;
225
226 #define GlobalBatteryLesser5 1
227 #define GlobalBatteryGreater5 2
228 #define GlobalBatteryFull 3
229
230 extern UBYTE globalBatteryMode; /* */
231
232
233 extern UBYTE globalBatteryPicNumber;
234 extern UBYTE globalSignalPicNumber;
235
236
237 #define GlobalTimeout1sec 0x03e8 /* 1 second for flash the battery icon */
238 #define GlobalTimeout2min 0x01d4c0 /* 2 min for battery beep */
239 #define GlobalTimeout15min 0x0dbba0 /* 15 min for battery beep */
240
241
242 void editActivate (MfwHnd e,int AlphaMode);
243 void editHiddenActivate (char *buffer);
244 void editDeactivate (void);
245 int editEventKey (MfwEvt e, MfwKbd *k);
246 MfwHnd activeEditor(void);
247
248 // sbh - functions for format mode (WAP)
249
250 void setFormatPointers (char *format, int *index, int *index2);
251 void editCharFindNext(char character);
252 int editFindPrev(void); // RAVI
253
254 /* Added to remove warning Aug - 11 */
255 #ifdef NEPTUNE_BOARD
256 extern UBYTE getcurrentSMSTone(void);
257 #endif /* NEPTUNE_BOARD */
258 /* End - remove warning Aug - 11 */
259
260 /*NM p032
261 this flag indicate when the TEST SIM
262 is inserted*/
263 extern UBYTE test_sim;
264
265 #endif