comparison src/ui3/bmi/MmiMenu.c @ 420:e8ddbb0837ed

src/ui3: initial import of TCS3/LoCosto BMI & MFW code
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Jan 2018 03:09:00 +0000
parents
children
comparison
equal deleted inserted replaced
419:59143cd42ec7 420:e8ddbb0837ed
1 /*******************************************************************************
2
3 CONDAT (UK)
4
5 ********************************************************************************
6
7 This software product is the property of Condat (UK) Ltd and may not be
8 disclosed to any third party without the express permission of the owner.
9
10 ********************************************************************************
11
12 $Project name: Basic MMI
13 $Project code: BMI (6349)
14 $Module: Menus
15 $File: MmiMenu.c
16 $Revision: 1.0
17
18 $Author: Condat(UK)
19 $Date: 25/10/00
20
21 ********************************************************************************
22
23 Description:
24
25 This provides the implementation of the main menu handling for the basic
26 MMI
27
28 ********************************************************************************
29 $History: MmiMenu.c
30
31 25/10/00 Original Condat(UK) BMI version.
32
33 $End
34
35 *******************************************************************************/
36
37
38 /*******************************************************************************
39
40 Include files
41
42 *******************************************************************************/
43
44 #define ENTITY_MFW
45
46 /* includes */
47 #include <string.h>
48 #include <stdio.h>
49 #include <stdlib.h>
50
51 #if defined (NEW_FRAME)
52
53 #include "typedefs.h"
54 #include "vsi.h"
55 #include "pei.h"
56 #include "custom.h"
57 #include "gsm.h"
58
59 #else
60
61 #include "STDDEFS.H"
62 #include "custom.h"
63 #include "gsm.h"
64 #include "vsi.h"
65
66 #endif
67 #include "mfw_sys.h"
68
69 #include "prim.h"
70
71
72 #include "mfw_mfw.h"
73 #include "mfw_win.h"
74 #include "mfw_kbd.h"
75 #include "mfw_lng.h"
76 /* SPR#1428 - SH - New Editor changes */
77 #ifndef NEW_EDITOR
78 #include "mfw_edt.h"
79 #endif
80 #include "mfw_icn.h"
81 #include "mfw_mnu.h"
82 #include "mfw_phb.h"
83 #include "mfw_sim.h"
84 #include "mfw_nm.h"
85 #include "mfw_tim.h"
86 #include "mfw_sms.h"
87 #include "mfw_icn.h"
88 #include "mfw_sat.h"
89
90 #include "dspl.h"
91
92 #include "ksd.h"
93 #include "psa.h"
94
95
96 #include "MmiMmi.h"
97 #include "MmiMain.h"
98 #include "MmiStart.h"
99
100 #include "MmiDummy.h"
101 #include "MmiDialogs.h"
102 #include "MmiLists.h"
103 #include "mmiSmsBroadcast.h"
104
105 #include "MmiMenu.h"
106 #include "MmiSimToolkit.h"
107
108
109 #include "MmiSounds.h"
110 #include "MmiSettings.h"
111 #include "MmiServices.h"
112 #include "MmiPins.h"
113 #include "Mmiicons.h"
114 #include "MmiNetwork.h"
115 #include "MmiUserData.h"
116 #include "MmiSoftKeys.h"
117 #include "MmiTimeDate.h"
118 #include "MmiIdle.h"
119
120
121 #include "cus_aci.h"
122
123 #include "prim.h"
124 #ifndef PCM_2_FFS
125 #include "pcm.h"
126 #endif
127
128 /*******************************************************************************
129
130 Private definitions
131
132 *******************************************************************************/
133
134
135 /* next define used for code that might be removed
136 */
137 #define KEEP 0
138
139
140
141
142 /*******************************************************************************
143
144 Global Data Elements
145
146 *******************************************************************************/
147
148 /* Menus display area
149 */
150
151
152
153 /*******************************************************************************
154
155 Module Global Data Elements
156
157 *******************************************************************************/
158
159 MfwHnd MenuWin = (MfwHnd) 0;
160
161 static MfwHnd win=0; /* our window */
162
163 /* x0039928 -Lint warning removal
164 static MfwHnd kbd;
165 static MfwHnd kbdLong; */
166
167
168 static SimMenuFunc SimCallback;
169 static MfwHnd SimWindow;
170
171 /* x0039928 - Lint warning removal
172 static MmiState nextState;
173 static BOOL fromHotKey;
174 static BOOL flagHotKey;
175
176 static const int OperatorIndex = 1;
177 */
178
179 /*******************************************************************************
180
181 Local function prototypes
182
183 *******************************************************************************/
184
185 /*******************************************************************************
186
187 $Function: menuSimItemCallback
188
189 $Description: invokes the SimCallback function if it is allocated
190
191 $Returns: MfwResOk, always
192
193 $Arguments: m, menu being activated, i, item in menu
194
195 *******************************************************************************/
196
197 int menuSimItemCallback( MfwMnu* m, MfwMnuItem* i)
198 {
199 if( SimCallback != NULL )
200 SimCallback(SimWindow);
201
202 return MfwResOk;
203 }
204
205
206
207
208 /*******************************************************************************
209
210 Public Routines
211
212 *******************************************************************************/
213
214 /*******************************************************************************
215
216 $Function: item_flag_none
217
218 $Description: Attribut function for menu entries. This function shall
219 be used for all cases of no specific attributes (default)
220
221 $Returns: zero always
222
223 $Arguments: m, ma, mi - not used
224
225 *******************************************************************************/
226
227 USHORT item_flag_none( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi )
228 {
229 return 0;
230 }
231
232 //xpradipg - Aug 4:changes for WAP2.0 Menu
233 #if defined (FF_WAP) && defined (FF_GPF_TCPIP)
234 USHORT item_flag_WAP_2_0( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi )
235 {
236 return (HTTP_Selected()?0:1);
237 }
238 #endif
239 /*******************************************************************************
240
241 $Function: item_flag_hide
242
243 $Description: Attribut function for menu entries. This function shall
244 be used for all cases of hiding menu entries.
245
246 $Returns: MNU_ITEM_HIDE always
247
248 $Arguments: m, ma, mi - not used
249
250 *******************************************************************************/
251
252 USHORT item_flag_hide( T_MFW_MNU *m, T_MFW_MNU_ATTR *ma, T_MFW_MNU_ITEM *mi )
253 {
254 return MNU_ITEM_HIDE;
255 }
256
257
258
259
260
261
262
263 /*******************************************************************************
264
265 $Function: menuIsFocussed
266
267 $Description: Returns 1 if the menu window has the focus, else returns 0.
268
269 $Returns: Returns 1 if the menu window has the focus, else returns 0.
270
271 $Arguments: None
272
273 *******************************************************************************/
274
275 int menuIsFocussed( void )
276 {
277 return winIsFocussed( win );
278 }
279
280
281
282
283
284
285
286
287
288 /*******************************************************************************
289
290 $Function: menuEnableSimMenu
291
292 $Description: Unhides the SIM toolkit menu item, using <label> as the label.
293 If <label> is 0, the default label is used. If the SIM toolkit
294 menu item is invoked by the user, <simCallback> gets called
295 with argument <window>, unless <simCallback> is 0.
296
297 $Returns: None
298
299 $Arguments: label, simCallBack, simWindow as indicated above
300
301 *******************************************************************************/
302
303 void menuEnableSimMenu( char *label, SimMenuFunc simCallback, MfwHnd simWindow )
304 {
305
306 TRACE_FUNCTION("menuEnableSimMenu");
307
308 SimCallback = simCallback;
309
310 /* parameter to callback
311 */
312 SimWindow = simWindow;
313 }
314
315
316
317
318
319
320 /*******************************************************************************
321
322 $Function: menuDisableSimMenu
323
324 $Description: Hides the SIM toolkit menu item
325
326 $Returns: None
327
328 $Arguments: None
329
330 *******************************************************************************/
331
332 void menuDisableSimMenu(void)
333 {
334 TRACE_FUNCTION("menuDisableSimMenu");
335 }
336
337 /*******************************************************************************
338
339 End Of File
340
341 *******************************************************************************/
342