comparison src/ui3/bmi/MmiSoftKeys.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: Softkeys
15 $File: MmiSoftkeys.c
16 $Revision: 1.0
17
18 $Author: Condat(UK)
19 $Date: 22/02/01
20
21 ********************************************************************************
22
23 Description:
24
25
26
27 ********************************************************************************
28
29 $History:
30
31 xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
32 To display '?' to indicate to the user that help is available for a STK menu
33
34 25/10/00 Original Condat(UK) BMI version.
35
36 $End
37
38 *******************************************************************************/
39
40
41 /*******************************************************************************
42
43 Include Files
44
45 *******************************************************************************/
46
47 #define ENTITY_MFW
48
49 /* includes */
50 #include <string.h>
51 #include <stdio.h>
52 #include <stdlib.h>
53
54
55 #if defined (NEW_FRAME)
56
57 #include "typedefs.h"
58 #include "vsi.h"
59 #include "pei.h"
60 #include "custom.h"
61 #include "gsm.h"
62
63 #else
64
65 #include "STDDEFS.H"
66 #include "custom.h"
67 #include "gsm.h"
68 #include "vsi.h"
69
70 #endif
71 #include "mfw_sys.h"
72 #include "prim.h"
73
74 #include "mfw_mfw.h"
75 #include "mfw_win.h"
76 #include "mfw_kbd.h"
77 #include "mfw_lng.h"
78 #include "mfw_phb.h"
79 #include "mfw_nm.h"
80 #include "dspl.h"
81
82 #include "ksd.h"
83 #include "psa.h"
84
85
86 #include "MmiMmi.h"
87 #include "MmiMain.h"
88
89 #include "MmiUserData.h"
90 #include "MmiSoftKeys.h"
91 #include "MmiResources.h"
92
93 #include "mmiColours.h"
94
95 typedef struct
96 {
97 MfwHnd leftKeyHandler;
98 MfwHnd rightKeyHandler;
99
100 LangTxt leftKeyLabel;
101 LangTxt rightKeyLabel;
102 } SoftKeysData, *SoftKeys;
103
104
105 #ifdef LSCREEN
106 #define HorizontalOffset 4
107 #else
108 #define HorizontalOffset 1
109 #endif
110 #define LeftMargin (HorizontalOffset)
111 #define RightMargin (HorizontalOffset)
112
113 #define ALLOC_MEMORY mfwAlloc
114 #define FREE_MEMORY mfwFree
115
116 static U8 softKeyFont = 0;
117 /* x0039928 - Lint warning fix
118 static UBYTE softKeysDisplayAttibutes = DSPL_TXTATTR_NORMAL; */
119
120
121 /*
122 * Change the <font> and <displayAttibutes> for _all_ softkeys.
123 * All consecutive calls of softKeysUpdate() will reflect the change.
124 * Returns SOFTKEYS_CHANGED when everything went fine,
125 * or SOFTKEYS_FAILURE on failure.
126 */
127 SoftKeysResult softKeysAttributes( U8 font, UBYTE displayAttibutes)
128 {
129 if( font == (U8)-1 )
130 {
131 return SOFTKEYS_FAILURE;
132 }
133
134 softKeyFont = font;
135 /* x0039928 - Lint warning fix
136 softKeysDisplayAttibutes = displayAttibutes; */
137
138 return SOFTKEYS_CHANGED;
139 }
140
141
142 /*
143 * Creates the softkeys for <window>, which will display the
144 * <leftKeyLabel> and <rightKeyLabel> in the softkey area
145 * on the screen, and invoke <leftKeyCallBack> or <rightKeyCallBack>
146 * when the approrpiate key is pressed. Returns SOFTKEYS_CREATED when
147 * everything went fine, or SOFTKEYS_FAILURE on failure.
148 */
149 SoftKeysResult softKeysHndCreate( MfwHnd window, SoftKeysSetup *setup)
150 {
151 if( window == NULL || setup == NULL )
152 {
153 return SOFTKEYS_FAILURE;
154 }
155
156 return softKeysWinCreate( (MfwWin *)((MfwHdr *)window)->data, setup);
157 }
158
159
160 SoftKeysResult softKeysWinCreate( MfwWin *window, SoftKeysSetup *setup)
161 {
162 SoftKeys newKeys;
163
164 if( window == NULL || setup == NULL )
165 {
166 return SOFTKEYS_FAILURE;
167 }
168
169 newKeys = (SoftKeys)ALLOC_MEMORY(sizeof(SoftKeysData));
170
171 if( newKeys == NULL )
172 {
173 return SOFTKEYS_FAILURE;
174 }
175
176 if( userDataWinSet( window, UD_SOFTKEYS, (void *)newKeys) == NULL )
177 {
178 FREE_MEMORY( (void *)newKeys, sizeof(SoftKeysData));
179
180 return SOFTKEYS_FAILURE;
181 }
182
183 newKeys->leftKeyHandler = kbdCreate( NULL, KEY_LEFT,
184 setup->leftKeyCallBack);
185 newKeys->rightKeyHandler = kbdCreate( NULL, KEY_RIGHT,
186 setup->rightKeyCallBack);
187
188 newKeys->leftKeyLabel = setup->leftKeyLabel;
189 newKeys->rightKeyLabel = setup->rightKeyLabel;
190
191 if( newKeys->leftKeyHandler == NULL || newKeys->rightKeyHandler == NULL )
192 {
193 kbdDelete(newKeys->leftKeyHandler);
194 kbdDelete(newKeys->rightKeyHandler);
195
196 userDataWinDelete( window, UD_SOFTKEYS);
197
198 FREE_MEMORY( (void *)newKeys, sizeof(SoftKeysData));
199
200 return SOFTKEYS_FAILURE;
201 }
202
203 return SOFTKEYS_CREATED;
204 }
205
206
207 /*
208 * Change the setup of the softkeys for <window>. Use TxtNull if you
209 * don't want to change a ...Label, and NULL if you don't want to change
210 * a ...CallBack. Returns SOFTKEYS_CHANGED when everything went fine,
211 * or SOFTKEYS_FAILURE on failure.
212 */
213 SoftKeysResult softKeysHndSet( MfwHnd window, SoftKeysSetup *changes)
214 {
215 if( window == NULL || changes == NULL )
216 {
217 return SOFTKEYS_FAILURE;
218 }
219
220 return softKeysWinSet( (MfwWin *)((MfwHdr *)window)->data, changes);
221 }
222
223
224 SoftKeysResult softKeysWinSet( MfwWin *window, SoftKeysSetup *changes)
225 {
226 SoftKeys softKeys = (SoftKeys)userDataWinGet( window, UD_SOFTKEYS);
227
228 if( window == NULL || softKeys == NULL || changes == NULL )
229 {
230 return SOFTKEYS_FAILURE;
231 }
232
233 if( changes->leftKeyCallBack != NULL )
234 {
235 MfwHnd NewKeyHandler = kbdCreate( NULL, KEY_LEFT,
236 changes->leftKeyCallBack);
237
238 if( NewKeyHandler == NULL )
239 {
240 return SOFTKEYS_FAILURE;
241 }
242 else
243 {
244 kbdDelete(softKeys->leftKeyHandler);
245
246 softKeys->leftKeyHandler = NewKeyHandler;
247 }
248 }
249
250 if( changes->rightKeyCallBack != NULL )
251 {
252 MfwHnd NewKeyHandler = kbdCreate( NULL, KEY_LEFT,
253 changes->rightKeyCallBack);
254
255 if( NewKeyHandler == NULL )
256 {
257 return SOFTKEYS_FAILURE;
258 }
259 else
260 {
261 kbdDelete(softKeys->rightKeyHandler);
262
263 softKeys->rightKeyHandler = NewKeyHandler;
264 }
265 }
266
267 if( changes->leftKeyLabel != TxtNull )
268 {
269 softKeys->leftKeyLabel = changes->leftKeyLabel;
270 }
271
272 if( changes->rightKeyLabel != TxtNull )
273 {
274 softKeys->rightKeyLabel = changes->rightKeyLabel;
275 }
276
277 return SOFTKEYS_CHANGED;
278 }
279
280
281 /*
282 * You will need to call this whenever <window> is updated.
283 */
284 void softKeysHndUpdate(MfwHnd window)
285 {
286 if( window == NULL )
287 {
288 return;
289 }
290
291 softKeysWinUpdate((MfwWin *)((MfwHdr *)window)->data);
292 }
293
294
295 void softKeysWinUpdate(MfwWin *window)
296 {
297 SoftKeys softKeys = (SoftKeys)userDataWinGet( window, UD_SOFTKEYS);
298 U8 oldFont = dspl_SelectFontbyID(softKeyFont);
299
300 if( window == NULL || softKeys == NULL )
301 {
302 return;
303 }
304
305 PROMPT( LeftMargin,Mmi_layout_line(LAST_LINE_TOP), 0, softKeys->leftKeyLabel);
306
307 dspl_SelectFontbyID(oldFont);
308 }
309
310
311 /*
312 * Deletes the softkeys for <window>.
313 */
314 void softkeysHndDelete(MfwHnd window)
315 {
316 if( window == NULL )
317 {
318 return;
319 }
320
321 softkeysWinDelete((MfwWin *)((MfwHdr *)window)->data);
322 }
323
324
325 void softkeysWinDelete(MfwWin *window)
326 {
327 SoftKeys softKeys = (SoftKeys)userDataWinDelete( window, UD_SOFTKEYS);
328
329 if( window == NULL || softKeys == NULL )
330 {
331 return;
332 }
333
334 kbdDelete(softKeys->leftKeyHandler);
335 kbdDelete(softKeys->rightKeyHandler);
336
337 FREE_MEMORY( (void *)softKeys, sizeof(SoftKeysData));
338 }
339 typedef struct {
340 char* str;
341 int posX;
342 int posY;
343 } T_SK_DATA;
344 typedef struct {
345 T_SK_DATA lsk;
346 T_SK_DATA rsk;
347 MfwRect* rect;
348 } T_SK_DSPL_STRUCT;
349
350 /*******************************************************************************
351
352 $Function:
353
354 $Description:
355
356 $Returns:
357
358 $Arguments:
359
360 $History
361 GW 28/11/02 -
362
363 *******************************************************************************/
364 static void softKeys_displayAll(T_SK_DSPL_STRUCT* sk_data , int format, unsigned int colIndex )
365 {
366 resources_setSKColour(colIndex);
367 // #ifdef COLOURDISPLAY
368 dspl_Clear( sk_data->rect->px,
369 sk_data->rect->py,
370 sk_data->rect->px+sk_data->rect->sx-1,
371 sk_data->rect->py+sk_data->rect->sy-1);
372 /* Line height must be less than rect.sy */
373 // #endif
374 if (sk_data->lsk.str!= NULL)
375 dspl_TextOut(sk_data->lsk.posX, sk_data->lsk.posY,DSPL_TXTATTR_CURRENT_MODE, sk_data->lsk.str);
376 if (sk_data->rsk.str!= NULL)
377 dspl_TextOut(sk_data->rsk.posX, sk_data->rsk.posY,DSPL_TXTATTR_CURRENT_MODE, sk_data->rsk.str);
378 resources_restoreMnuColour();
379 }
380
381 /*******************************************************************************
382
383 $Function:
384
385 $Description:
386
387 $Returns:
388
389 $Arguments:
390
391 $History
392 GW 28/11/02 -
393
394 *******************************************************************************/
395 void softKeys_displayStrXY(char* leftSoftKey_str,char* rightSoftKey_str, int format, unsigned int colIndex, MfwRect* rect )
396 {
397 MfwRect defRect;
398
399 T_SK_DSPL_STRUCT sk_data;
400 sk_data.lsk.str = leftSoftKey_str;
401 sk_data.rsk.str = rightSoftKey_str;
402 if (rect != NULL)
403 sk_data.rect = rect;
404 else
405 {
406 Mmi_layout_softkeyArea( &defRect );
407 sk_data.rect = &defRect;
408 }
409 sk_data.lsk.posY = sk_data.rect->py + (sk_data.rect->sy-Mmi_layout_line_height())/2;
410 sk_data.rsk.posY = sk_data.lsk.posY;
411 sk_data.lsk.posX = sk_data.rect->px+LeftMargin;
412 sk_data.rsk.posX = sk_data.rect->px+sk_data.rect->sx-RightMargin-dspl_GetTextExtent(sk_data.rsk.str, 0);
413
414 softKeys_displayAll( &sk_data , format, colIndex);
415 }
416 /*******************************************************************************
417
418 $Function:
419
420 $Description:
421
422 $Returns:
423
424 $Arguments:
425
426 $History
427 GW 28/11/02 -
428
429 *******************************************************************************/
430 void softKeys_displayStr(char* leftSoftKey_str,char* rightSoftKey_str, int format, int unsigned colIndex)
431 {
432 softKeys_displayStrXY(leftSoftKey_str, rightSoftKey_str,format,colIndex, NULL);
433 }
434
435 /*******************************************************************************
436
437 $Function:
438
439 $Description:
440
441 $Returns:
442
443 $Arguments:
444
445 $History
446 GW 28/11/02 -
447
448 *******************************************************************************/
449 void softKeys_displayId(int leftSoftKey,int rightSoftKey, int format, unsigned int colIndex)
450 {
451 char *lsk,*rsk;
452 lsk = MmiRsrcGetText(leftSoftKey);
453 rsk = MmiRsrcGetText(rightSoftKey);
454 softKeys_displayStrXY(lsk,rsk,format,colIndex,NULL);
455 }
456
457 /*******************************************************************************
458
459 $Function:
460
461 $Description:
462
463 $Returns:
464
465 $Arguments:
466
467 $History
468 GW 28/11/02 -
469
470 *******************************************************************************/
471 //Old function - replace with calls to 'softKeys_displayId'
472 //GW 28/11/02 - Removed commented out code
473 void displaySoftKeys(int leftSoftKey,int rightSoftKey)
474 {
475 char *lsk,*rsk;
476 lsk = MmiRsrcGetText(leftSoftKey);
477 rsk = MmiRsrcGetText(rightSoftKey);
478 softKeys_displayStrXY(lsk,rsk,0, COLOUR_LIST_SUBMENU, NULL);
479 }
480
481 /*******************************************************************************
482
483 $Function:
484
485 $Description:
486
487 $Returns:
488
489 $Arguments:
490
491 $History
492 GW 28/11/02 -
493
494 *******************************************************************************/
495 void displaySoftKeysXY(int leftSoftKey,int rightSoftKey,int lskX,int rskX, int lpos)
496 {
497 char *lsk,*rsk;
498 MfwRect rect;
499
500 lsk = MmiRsrcGetText(leftSoftKey);
501 rsk = MmiRsrcGetText(rightSoftKey);
502 rect.px = lskX;
503 rect.py = lpos;
504 rect.sx = rskX-lskX;
505 rect.sy = Mmi_layout_softkeyHeight();
506 softKeys_displayStrXY(lsk, rsk, 0,COLOUR_LIST_MAIN, &rect);
507
508
509
510 }
511
512
513 /*******************************************************************************
514
515 $Function: displaySoftKeys_edition
516
517 $Description:
518
519 $Returns:
520
521 $Arguments:
522
523 $History
524
525 *******************************************************************************/
526 void displaySoftKeys_edition(int leftSoftKey,int index, int rightSoftKey)
527 {
528 char *lsk,*rsk, *ind;
529 USHORT lpos;
530
531 lsk = MmiRsrcGetText(leftSoftKey);
532 ind = MmiRsrcGetText(index);
533 rsk = MmiRsrcGetText(rightSoftKey);
534 lpos = Mmi_layout_line(SECOND_LAST_LINE_TOP);
535
536 dspl_TextOut(LeftMargin,lpos, 0,lsk);
537
538 dspl_TextOut( 5 + dspl_GetTextExtent(lsk, (USHORT)strlen(lsk)) ,lpos, 0, ind);
539
540 dspl_TextOut((mmiScrX-1)-RightMargin-dspl_GetTextExtent(rsk, (USHORT)strlen(rsk)),lpos ,0, rsk);
541 }
542
543
544 /*******************************************************************************
545
546 $Function: displayCustSoftKeys
547
548 $Description: Display softkeys with text strings instead of text ID's
549
550 $Returns: None
551
552 $Arguments: LeftSoftKey - char array to be displayed at the bottom-left of the display
553 or NULL if no string is to be displayed
554 RightSoftKey- char array to be displayed at the bottom-right of the display
555 or NULL if no string is to be displayed
556
557 $History
558 GW 28/11/02 -
559
560 *******************************************************************************/
561 // SH - 25/5/01
562 // This function provided for WAP, to allow the printing of custom softkeys
563 // from strings provided.
564
565 void displayCustSoftKeys(char *LeftSoftKey, char *RightSoftKey)
566 {
567 softKeys_displayStrXY(LeftSoftKey,RightSoftKey,0,COLOUR_LIST_MAIN, NULL);
568 }
569
570
571 /*******************************************************************************
572
573 $Function: displayHelpSymbol
574
575 $Description: Displaying '?' to indicate to the user that help is available for a menu
576 xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
577
578 $Returns: None
579
580 $Arguments: None
581 *******************************************************************************/
582 void displayHelpSymbol(void)
583 {
584 MfwRect defRect, rect;
585
586 /* x0045876, 14-Aug-2006 (WR - "line_height" & "sk_data" was declared but never referenced) */
587 /* U16 line_height;
588 T_SK_DSPL_STRUCT sk_data; */
589 Mmi_layout_softkeyArea( &defRect );
590 rect.px = defRect.sx >> 1;
591 rect.py = defRect.py + 4;
592 resources_setSKColour(COLOUR_LIST_XX);
593 //Display the symbol in the center between the softkeys
594 dspl_TextOut(rect.px, rect.py, DSPL_TXTATTR_CURRENT_MODE, "?");
595 resources_restoreMnuColour();
596
597 }
598
599
600 #define ICON_WIDTH 20
601 #define ICON_HEIGHT 19
602
603 static const unsigned char camera[] =
604 {
605 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
606 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x6D,0x6D,
607 0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x00,0xFF,0xFF,0x00,0x92,0x92,0x92,0x92,0x92,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
608 0x00,0x92,0x00,0xFF,0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,
609 0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,
610 0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,0xFF,0xFF,0x00,0x00,0xDB,0xDB,0x00,0xFF,0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,
611 0xFF,0xFF,0xFF,0x00,0xDB,0xDB,0x00,0xFF,0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xDB,0x00,0xFF,0xFF,0x00,0x92,0x6D,
612 0x00,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xDB,0x00,0xFF,0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,0xFF,0xFF,0xFF,0x00,
613 0xDB,0xDB,0x00,0xFF,0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,0xFF,0xFF,0x00,0x00,0xDB,0xDB,0x00,0xFF,0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,
614 0xDB,0xDB,0xDB,0xDB,0x00,0x00,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,0xFF,0x00,0x92,0x6D,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,
615 0xFF,0x00,0x92,0x92,0x92,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
616 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
617 };
618 /*******************************************************************************
619
620 $Function: displayCameraIcon
621
622 $Description: Displaying Camera icon to indicate to the user that user can use the
623 menu select key to capture the image.
624
625 $Returns: None
626
627 $Arguments: None
628 *******************************************************************************/
629 void displayCameraIcon(void)
630 {
631 MfwRect rect;
632
633 rect.px = (SCREEN_SIZE_X - ICON_WIDTH)/2;
634 rect.py = ((SCREEN_SIZE_Y - ICON_HEIGHT) -((Mmi_layout_softkeyHeight() -ICON_HEIGHT)/2));
635 rect.sx = ICON_WIDTH;
636 rect.sy = ICON_HEIGHT;
637
638 resources_setSKColour(COLOUR_LIST_XX);
639 //Display the symbol in the center between the softkeys
640 dspl_BitBlt2(rect.px, rect.py, rect.sx,rect.sy,(char *)camera, 0,BMP_FORMAT_256_COLOUR);
641 resources_restoreMnuColour();
642
643 }
644 #ifdef FF_MMI_FILEMANAGER
645 #define MENU_ICON_WIDTH 20
646 #define MENU_ICON_HEIGHT 20
647 static const unsigned char updowncenter[] =
648 {
649 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,
650 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
651 0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
652 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
653 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
654 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,
655 0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
656 0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,
657 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
658 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
659 0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,
660 0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
661 0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
662 };
663 static const unsigned char leftrightupdown[] =
664 {
665 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,
666 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
667 0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,
668 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,
669 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x25,0x25,
670 0x25,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
671 0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
672 0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,
673 0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
674 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,
675 0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,
676 0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
677 0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
678 };
679 static const unsigned char updownplay[] =
680 {
681 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,
682 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
683 0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
684 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
685 0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
686 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,
687 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
688 0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,
689 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
690 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
691 0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,
692 0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
693 0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
694 };
695
696 static const unsigned char updownstop[] =
697 {
698 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,
699 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
700 0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
701 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
702 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
703 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,
704 0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
705 0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,
706 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
707 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
708 0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,
709 0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
710 0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
711 };
712 static const unsigned char wait[] =
713 {
714 0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
715 0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,
716 0x25,0x25,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x00,0x25,
717 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,
718 0x00,0x25,0x00,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x00,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
719 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x25,
720 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
721 0x25,0x25,0x25,0x00,0x00,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,
722 0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x00,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,
723 0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x25,
724 0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x00,0x25,0x00,0x25,0x25,0x25,0x25,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x00,
725 0x25,0x00,0x25,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x00,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
726 0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x25,
727 };
728 /*******************************************************************************
729
730 $Function: displayCameraIcon
731
732 $Description: Displaying Camera icon to indicate to the user that user can use the
733 menu select key to capture the image.
734
735 $Returns: None
736
737 $Arguments: None
738 *******************************************************************************/
739 void displayMenuKeys(T_MENU_KEY key)
740 {
741 MfwRect rect;
742 char * buf = NULL;
743 rect.px = (SCREEN_SIZE_X - ICON_WIDTH)/2;
744 rect.py = ((SCREEN_SIZE_Y - ICON_HEIGHT) -((Mmi_layout_softkeyHeight() -MENU_ICON_HEIGHT)/2));
745 rect.sx = MENU_ICON_WIDTH;
746 rect.sy = MENU_ICON_HEIGHT;
747 resources_setSKColour(COLOUR_LIST_XX);
748 //Display the symbol in the center between the softkeys
749 switch(key)
750 {
751 case MENU_KEY_ALL:
752 buf = (char *)leftrightupdown;
753 break;
754 case MENU_KEY_UP_DOWN_CENTER:
755 buf = (char *)updowncenter;
756 break;
757 case MENU_KEY_UP_DOWN_PLAY:
758 buf = (char *)updownplay;
759 break;
760 case MENU_KEY_UP_DOWN_STOP:
761 buf = (char *)updownstop;
762 break;
763 case MENU_KEY_WAIT:
764 buf = (char *)wait;
765 break;
766 }
767 dspl_Clear(rect.px, rect.py, rect.px+rect.sx-1,rect.py+rect.sy-1);
768 dspl_BitBlt2(rect.px, rect.py, rect.sx,rect.sy,buf, 0,ICON_TYPE_256_COL);
769 resources_restoreMnuColour();
770 dspl_Enable(1);
771
772 }
773 #endif
774
775