comparison src/ui/bmi/mmiLists.c @ 92:c0052fe355d3

src/ui/bmi/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 08 Nov 2020 06:39:16 +0000
parents 67bfe9f274f6
children 65f0ce5bd32f
comparison
equal deleted inserted replaced
91:c3d28a37caad 92:c0052fe355d3
1 /******************************************************************************* 1 /*******************************************************************************
2 2
3 CONDAT (UK) 3 CONDAT (UK)
4 4
5 ******************************************************************************** 5 ********************************************************************************
6 6
7 This software product is the property of Condat (UK) Ltd and may not be 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. 8 disclosed to any third party without the express permission of the owner.
9 9
10 ******************************************************************************** 10 ********************************************************************************
11 11
12 $Project name: Basic MMI 12 $Project name: Basic MMI
13 $Project code: BMI (6349) 13 $Project code: BMI (6349)
14 $Module: MMI 14 $Module: MMI
15 $File: MmiLists.c 15 $File: MmiLists.c
16 $Revision: 1.0 16 $Revision: 1.0
17 17
18 $Author: Condat(UK) 18 $Author: Condat(UK)
19 $Date: 22/02/01 19 $Date: 22/02/01
20 20
21 ******************************************************************************** 21 ********************************************************************************
22 22
23 Description: 23 Description:
24 24
25 25
26 26
27 ******************************************************************************** 27 ********************************************************************************
28 28
29 $History: MmiLists.c 29 $History: MmiLists.c
30 30
33 Solution: Hang-up key is mapped properly while going back from audio list window. 33 Solution: Hang-up key is mapped properly while going back from audio list window.
34 34
35 Mar 30, 2007 REF: OMAPS00122691 x0039928 35 Mar 30, 2007 REF: OMAPS00122691 x0039928
36 Description: COMBO: No melody heard on parsing over different volums in tones menu 36 Description: COMBO: No melody heard on parsing over different volums in tones menu
37 Solution: E_MELODY_START event is sent to play the melody. 37 Solution: E_MELODY_START event is sent to play the melody.
38 38
39 xrashmic 8 Sep 2006, OMAPS00091618 39 xrashmic 8 Sep 2006, OMAPS00091618
40 Removed redundant code introduced during integration 40 Removed redundant code introduced during integration
41 41
42 June 19, 2006 REF: DRT OMAPS00076378 x0012849 : Jagannatha 42 June 19, 2006 REF: DRT OMAPS00076378 x0012849 : Jagannatha
43 Description: MIDI files should play while browsing 43 Description: MIDI files should play while browsing
44 Solution: Event will be generated upon press of Menu up and down key. 44 Solution: Event will be generated upon press of Menu up and down key.
45 45
46 June 05, 2006 REF:OMAPS00060424 x0045876 46 June 05, 2006 REF:OMAPS00060424 x0045876
47 Description: Header Toggling 47 Description: Header Toggling
48 Solution: Implemented the toggling of header when displaying the length text in SELECT ITEM and SET UP MENU 48 Solution: Implemented the toggling of header when displaying the length text in SELECT ITEM and SET UP MENU
49 49
50 May 18, 2006 REF: DRT OMAPS00076438 xdeepadh 50 May 18, 2006 REF: DRT OMAPS00076438 xdeepadh
51 Description: Scrolling not implemented in Imageviewer 51 Description: Scrolling not implemented in Imageviewer
52 Solution: The support for scrolling has been provided. 52 Solution: The support for scrolling has been provided.
53 53
54 May 03, 2006 REF: DRT OMAPS00076439 xdeepadh 54 May 03, 2006 REF: DRT OMAPS00076439 xdeepadh
55 Description: Image viewer back not working 55 Description: Image viewer back not working
56 Solution: The Preview List will be repopulated, when the list window is 56 Solution: The Preview List will be repopulated, when the list window is
57 resumed. 57 resumed.
58 58
59 May 03, 2006 REF: DRT OMAPS00076376 xdeepadh 59 May 03, 2006 REF: DRT OMAPS00076376 xdeepadh
60 Description: File Viewer-N5.12 issues (very unstable) 60 Description: File Viewer-N5.12 issues (very unstable)
61 Solution: The keys are blocked until the view or preview is completed. 61 Solution: The keys are blocked until the view or preview is completed.
62 62
63 Dec 22, 2005 REF: ENH xdeepadh 63 Dec 22, 2005 REF: ENH xdeepadh
64 Description: Image Viewer Application 64 Description: Image Viewer Application
65 Solution: Implemeted the Image Viewer to view the jpeg images 65 Solution: Implemeted the Image Viewer to view the jpeg images
66 66
67 xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357 67 xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
68 Using the MenuSelect Key for requesting the help info in STK menu. Storing the info that 68 Using the MenuSelect Key for requesting the help info in STK menu. Storing the info that
69 MenuSelectKey was pressed in a list view. 69 MenuSelectKey was pressed in a list view.
70 70
71 May 24, 2005 REF: CRR 29358 x0021334 71 May 24, 2005 REF: CRR 29358 x0021334
72 Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response 72 Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response
73 Fix: The implementation is now based on timer. After the specified timeout period 73 Fix: The implementation is now based on timer. After the specified timeout period
74 the control comes back to SAT main menu, if there is no selection done by the user. 74 the control comes back to SAT main menu, if there is no selection done by the user.
75 75
76 25/10/00 Original Condat(UK) BMI version. 76 25/10/00 Original Condat(UK) BMI version.
77 77
78 $End 78 $End
79 79
80 *******************************************************************************/ 80 *******************************************************************************/
81 81
82 #define ENTITY_MFW 82 #define ENTITY_MFW
185 #ifndef MFW_EVENT_PASSED 185 #ifndef MFW_EVENT_PASSED
186 #define MFW_EVENT_PASSED 0 186 #define MFW_EVENT_PASSED 0
187 #endif 187 #endif
188 188
189 /* START: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 189 /* START: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
190 MfwHnd g_win; 190 MfwHnd g_win;
191 191
192 extern MfwHnd g_title_timer; 192 extern MfwHnd g_title_timer;
193 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 193 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
194 194
195 extern MfwRect menuArea; /* menus display area */ 195 extern MfwRect menuArea; /* menus display area */
227 static void listsIcons_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter); 227 static void listsIcons_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter);
228 228
229 229
230 /******************************************************************************* 230 /*******************************************************************************
231 231
232 $Function: listIconsDisplayListMenu 232 $Function: listIconsDisplayListMenu
233 233
234 $Description: Creates a list menu from data stored in NVRAM. 234 $Description: Creates a list menu from data stored in NVRAM.
235 235
236 $Returns: none. 236 $Returns: none.
237 237
238 $Arguments: 238 $Arguments:
239 239
240 *******************************************************************************/ 240 *******************************************************************************/
241 MfwHnd winIconsLists; 241 MfwHnd winIconsLists;
242 T_MFW listIconsDisplayListMenu (MfwHnd Parent, ListMenuData *Data, ListCbFunc cbFunc,int inUnicode) 242 T_MFW listIconsDisplayListMenu (MfwHnd Parent, ListMenuData *Data, ListCbFunc cbFunc,int inUnicode)
243 { 243 {
244 // UBYTE i; // RAVI - Not Used. 244 // UBYTE i; // RAVI - Not Used.
262 if (!ListData) 262 if (!ListData)
263 { 263 {
264 /* cq12719. if insufficient memory for listdata then delete window and Free allocated memory.16-03-04.MZ */ 264 /* cq12719. if insufficient memory for listdata then delete window and Free allocated memory.16-03-04.MZ */
265 if(NULL != winLists) 265 if(NULL != winLists)
266 winDelete(winLists); 266 winDelete(winLists);
267 267
268 TRACE_EVENT ("(ListIconsWinInfo *)ALLOC_MEMORY fails"); 268 TRACE_EVENT ("(ListIconsWinInfo *)ALLOC_MEMORY fails");
269 return LISTS_FAIL; 269 return LISTS_FAIL;
270 } 270 }
271 271
272 ListData->mmi_control.dialog = (T_DIALOG_FUNC)lists_exec_cb; 272 ListData->mmi_control.dialog = (T_DIALOG_FUNC)lists_exec_cb;
297 /* SPR#2492 - DS - Do not overwrite mode settings unless mode is zero */ 297 /* SPR#2492 - DS - Do not overwrite mode settings unless mode is zero */
298 if (ListData->MenuListsAttr.mode == 0x0000) /* Mode not yet setup */ 298 if (ListData->MenuListsAttr.mode == 0x0000) /* Mode not yet setup */
299 ListData->MenuListsAttr.mode = MNU_LEFT | MNU_LIST | MNU_CUR_LINE; 299 ListData->MenuListsAttr.mode = MNU_LEFT | MNU_LIST | MNU_CUR_LINE;
300 else 300 else
301 ListData->MenuListsAttr.mode |= Data->Attr->mode; 301 ListData->MenuListsAttr.mode |= Data->Attr->mode;
302 302
303 ListData->MenuListsAttr.font = Data->Font; 303 ListData->MenuListsAttr.font = Data->Font;
304 ListData->MenuListsAttr.items = Data->List; 304 ListData->MenuListsAttr.items = Data->List;
305 ListData->MenuListsAttr.nItems = Data->ListLength; 305 ListData->MenuListsAttr.nItems = Data->ListLength;
306 306
307 /* START: x0045876, 05-June-2006 (OMAPS00060424 - Header Toggle) */ 307 /* START: x0045876, 05-June-2006 (OMAPS00060424 - Header Toggle) */
308 ListData->MenuListsAttr.header_toggle = Data->Attr->header_toggle; 308 ListData->MenuListsAttr.header_toggle = Data->Attr->header_toggle;
316 */ 316 */
317 ListData->MenuData = Data; /* copy contents */ 317 ListData->MenuData = Data; /* copy contents */
318 ListData->MenuData->listCol = COLOUR_LIST_XX; //Set-up colour 318 ListData->MenuData->listCol = COLOUR_LIST_XX; //Set-up colour
319 ListData->MenuData->Attr = &ListData->MenuListsAttr; /* copy data*/ 319 ListData->MenuData->Attr = &ListData->MenuListsAttr; /* copy data*/
320 ListData->MenuLists = mnuCreate(winLists, &ListData->MenuListsAttr, 320 ListData->MenuLists = mnuCreate(winLists, &ListData->MenuListsAttr,
321 E_MNU_SELECT | E_MNU_ESCAPE| E_MNU_POSTDRAW, 321 E_MNU_SELECT | E_MNU_ESCAPE| E_MNU_POSTDRAW,
322 (MfwCb)listsIconsListCbMenu); 322 (MfwCb)listsIconsListCbMenu);
323 ListData->MenuData->win = winLists; 323 ListData->MenuData->win = winLists;
324 Data->win = winLists; 324 Data->win = winLists;
325 mnuScrollMode(ListData->MenuLists,0); 325 mnuScrollMode(ListData->MenuLists,0);
326 if (Data->Strings) 326 if (Data->Strings)
327 mnuLang (ListData->MenuLists,0); 327 mnuLang (ListData->MenuLists,0);
328 else 328 else
329 mnuLang (ListData->MenuLists,mainMmiLng); 329 mnuLang (ListData->MenuLists,mainMmiLng);
330 330
335 } 335 }
336 mnuChooseVisibleItem(ListData->MenuLists, Data->ListPosition-1); 336 mnuChooseVisibleItem(ListData->MenuLists, Data->ListPosition-1);
337 mnuUnhide(ListData->MenuLists); 337 mnuUnhide(ListData->MenuLists);
338 displaySoftKeys(ListData->MenuData->LeftSoftKey,ListData->MenuData->RightSoftKey); 338 displaySoftKeys(ListData->MenuData->LeftSoftKey,ListData->MenuData->RightSoftKey);
339 winShow(winLists); 339 winShow(winLists);
340 340
341 } 341 }
342 } 342 }
343 return Status; 343 return Status;
344 } 344 }
345 345
386 mnuUp(data->MenuLists); 386 mnuUp(data->MenuLists);
387 { 387 {
388 MenuHandle = mfwControl(data->MenuLists); 388 MenuHandle = mfwControl(data->MenuLists);
389 data->MenuData->Reason = LISTS_REASON_SCROLL; 389 data->MenuData->Reason = LISTS_REASON_SCROLL;
390 data->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level]; 390 data->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level];
391 data->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; 391 data->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level];
392 // Send event to indicate that the user has scrolled list items 392 // Send event to indicate that the user has scrolled list items
393 SEND_EVENT(data->Parent, LISTS_REASON_SCROLL, 0, NULL); 393 SEND_EVENT(data->Parent, LISTS_REASON_SCROLL, 0, NULL);
394 } 394 }
395 395
396 break; 396 break;
397 case KCD_MNUDOWN: /* highlight next entry */ 397 case KCD_MNUDOWN: /* highlight next entry */
398 mnuDown(data->MenuLists); 398 mnuDown(data->MenuLists);
399 { 399 {
400 MenuHandle = mfwControl(data->MenuLists); 400 MenuHandle = mfwControl(data->MenuLists);
401 data->MenuData->Reason = LISTS_REASON_SCROLL; 401 data->MenuData->Reason = LISTS_REASON_SCROLL;
402 data->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level]; 402 data->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level];
403 data->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; 403 data->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level];
404 // Send event to indicate that the user has scrolled list items 404 // Send event to indicate that the user has scrolled list items
405 SEND_EVENT(data->Parent, LISTS_REASON_SCROLL, 0, NULL); 405 SEND_EVENT(data->Parent, LISTS_REASON_SCROLL, 0, NULL);
406 } 406 }
407 break; 407 break;
408 case KCD_MNUSELECT: 408 case KCD_MNUSELECT:
409 //xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357 409 //xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
410 //Menu Select Key was pressed, storing this for future use. 410 //Menu Select Key was pressed, storing this for future use.
411 data->MenuData->selectKey = TRUE; 411 data->MenuData->selectKey = TRUE;
412 //Break is delibrately not used here. The control should pass through the KCD_LEFT case. 412 //Break is delibrately not used here. The control should pass through the KCD_LEFT case.
413 case KCD_LEFT: /* activate this entry */ 413 case KCD_LEFT: /* activate this entry */
414 MenuHandle = mfwControl(data->MenuLists); 414 MenuHandle = mfwControl(data->MenuLists);
415 data->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level]; 415 data->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level];
416 mnuSelect(data->MenuLists); 416 mnuSelect(data->MenuLists);
423 data->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */ 423 data->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */
424 424
425 /* SPR998 - SH - check if callback exists before calling it! */ 425 /* SPR998 - SH - check if callback exists before calling it! */
426 if (data->Callback) 426 if (data->Callback)
427 data->Callback(data->Parent, data->MenuData); 427 data->Callback(data->Parent, data->MenuData);
428 428
429 if (data->MenuData->autoDestroy) 429 if (data->MenuData->autoDestroy)
430 { 430 {
431 /* START: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 431 /* START: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
432 if (data->MenuListsAttr.header_toggle) 432 if (data->MenuListsAttr.header_toggle)
433 { 433 {
450 MenuHandle = mfwControl(data->MenuLists); 450 MenuHandle = mfwControl(data->MenuLists);
451 data->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level]; 451 data->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level];
452 data->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */ 452 data->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */
453 /*NM, p023 end */ 453 /*NM, p023 end */
454 data->Callback(data->Parent, data->MenuData); 454 data->Callback(data->Parent, data->MenuData);
455 //July 10, 2007 REF: DRT OMAPS00135679 x0073106 455 //July 10, 2007 REF: DRT OMAPS00135679 x0073106
456 /*if (data->MenuData->autoDestroy) 456 /*if (data->MenuData->autoDestroy)
457 {*/ 457 {*/
458 /* START: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 458 /* START: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
459 if (data->MenuListsAttr.header_toggle) 459 if (data->MenuListsAttr.header_toggle)
460 { 460 {
480 return MFW_EVENT_CONSUMED; 480 return MFW_EVENT_CONSUMED;
481 } 481 }
482 482
483 /******************************************************************************* 483 /*******************************************************************************
484 484
485 $Function: listsWinEvent 485 $Function: listsWinEvent
486 486
487 $Description: window event handler 487 $Description: window event handler
488 488
489 $Returns: none. 489 $Returns: none.
490 490
491 $Arguments: 491 $Arguments:
492 492
493 *******************************************************************************/ 493 *******************************************************************************/
494 static int listsIconsWinEvent(MfwEvt e, MfwWin *w) 494 static int listsIconsWinEvent(MfwEvt e, MfwWin *w)
495 { 495 {
496 ListIconsWinInfo * ListData = (ListIconsWinInfo *)w->user; 496 ListIconsWinInfo * ListData = (ListIconsWinInfo *)w->user;
497 497
498 TRACE_FUNCTION("listsIconsWinEvent() start"); 498 TRACE_FUNCTION("listsIconsWinEvent() start");
499 TRACE_EVENT_P1("ListData->Parent %x",ListData->Parent); 499 TRACE_EVENT_P1("ListData->Parent %x",ListData->Parent);
500 switch (e) 500 switch (e)
501 { 501 {
502 case E_WIN_VISIBLE: 502 case E_WIN_VISIBLE:
503 SEND_EVENT(ListData->Parent,LISTS_REASON_VISIBLE,0,(void*)ListData); 503 SEND_EVENT(ListData->Parent,LISTS_REASON_VISIBLE,0,(void*)ListData);
504 break; 504 break;
505 case MfwWinResume: 505 case MfwWinResume:
506 SEND_EVENT(ListData->Parent,LISTS_REASON_RESUME,0,(void*)ListData); 506 SEND_EVENT(ListData->Parent,LISTS_REASON_RESUME,0,(void*)ListData);
507 break; 507 break;
508 case MfwWinSuspend: 508 case MfwWinSuspend:
509 SEND_EVENT(ListData->Parent,LISTS_REASON_SUSPEND,0,(void*)ListData); 509 SEND_EVENT(ListData->Parent,LISTS_REASON_SUSPEND,0,(void*)ListData);
510 break; 510 break;
511 } 511 }
512 return MFW_EVENT_CONSUMED; 512 return MFW_EVENT_CONSUMED;
513 } 513 }
514 /*a0393213 lint warning removal - This function is not used currently. So it's put under the flag. If it is required just remove the flag.*/ 514 /*a0393213 lint warning removal - This function is not used currently. So it's put under the flag. If it is required just remove the flag.*/
515 #ifdef MMI_LINT_WARNING_REMOVAL 515 #ifdef MMI_LINT_WARNING_REMOVAL
554 #endif 554 #endif
555 555
556 556
557 /******************************************************************************* 557 /*******************************************************************************
558 558
559 $Function: listsListCbMenu 559 $Function: listsListCbMenu
560 560
561 $Description: List menu handler. (mfw callback function) 561 $Description: List menu handler. (mfw callback function)
562 562
563 $Returns: none. 563 $Returns: none.
564 564
565 $Arguments: 565 $Arguments:
566 566
567 *******************************************************************************/ 567 *******************************************************************************/
568 int listsIconsListCbMenu(MfwEvt EventCode, MfwMnu *MenuHandle) 568 int listsIconsListCbMenu(MfwEvt EventCode, MfwMnu *MenuHandle)
569 { 569 {
570 int Status = LISTS_OK; 570 int Status = LISTS_OK;
571 T_MFW_HND win = mfw_parent (mfw_header()); 571 T_MFW_HND win = mfw_parent (mfw_header());
589 ListData->MenuData->Reason = LISTS_REASON_BACK; 589 ListData->MenuData->Reason = LISTS_REASON_BACK;
590 /*NM, p023*/ 590 /*NM, p023*/
591 ListData->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level]; 591 ListData->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level];
592 ListData->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */ 592 ListData->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */
593 /*NM, p023*/ 593 /*NM, p023*/
594 594
595 /* SPR998 - SH - check if callback exists before calling it! */ 595 /* SPR998 - SH - check if callback exists before calling it! */
596 if (ListData->Callback) 596 if (ListData->Callback)
597 ListData->Callback(ListData->Parent, ListData->MenuData); 597 ListData->Callback(ListData->Parent, ListData->MenuData);
598 598
599 break; 599 break;
600 case E_MNU_POSTDRAW: 600 case E_MNU_POSTDRAW:
601 { 601 {
602 T_MFW_WIN * winIconsLists_data = ((T_MFW_HDR *)winIconsLists)->data; 602 T_MFW_WIN * winIconsLists_data = ((T_MFW_HDR *)winIconsLists)->data;
603 ListIconsWinInfo* winIconsListsData = (ListIconsWinInfo *)winIconsLists_data->user; 603 ListIconsWinInfo* winIconsListsData = (ListIconsWinInfo *)winIconsLists_data->user;
604 winIconsListsData->ExitReason = LISTS_REASON_DRAWCOMPLETE; 604 winIconsListsData->ExitReason = LISTS_REASON_DRAWCOMPLETE;
605 winIconsListsData->MenuData->Reason = LISTS_REASON_DRAWCOMPLETE; 605 winIconsListsData->MenuData->Reason = LISTS_REASON_DRAWCOMPLETE;
606 winIconsListsData->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level]; 606 winIconsListsData->MenuData->CursorPosition = MenuHandle->lCursor[MenuHandle->level];
607 winIconsListsData->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */ 607 winIconsListsData->MenuData->ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */
608 winIconsListsData->MenuData->lineHeight= MenuHandle->lineHeight; 608 winIconsListsData->MenuData->lineHeight= MenuHandle->lineHeight;
633 tim_delete(g_title_timer); 633 tim_delete(g_title_timer);
634 g_title_timer = NULL; 634 g_title_timer = NULL;
635 } 635 }
636 } 636 }
637 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 637 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
638 638
639 winDelete (win); 639 winDelete (win);
640 FREE_MEMORY ((void*) ListData, sizeof (ListIconsWinInfo)); 640 FREE_MEMORY ((void*) ListData, sizeof (ListIconsWinInfo));
641 641
642 } 642 }
643 643
644 /******************************************************************************* 644 /*******************************************************************************
645 645
646 $Function: listDisplayListMenu 646 $Function: listDisplayListMenu
647 647
648 $Description: Creates a list menu from data stored in NVRAM. 648 $Description: Creates a list menu from data stored in NVRAM.
649 649
650 $Returns: none. 650 $Returns: none.
651 651
652 $Arguments: 652 $Arguments:
653 653
654 *******************************************************************************/ 654 *******************************************************************************/
655 T_MFW listDisplayListMenu (MfwHnd Parent, ListMenuData *Data, ListCbFunc cbFunc,int inUnicode) 655 T_MFW listDisplayListMenu (MfwHnd Parent, ListMenuData *Data, ListCbFunc cbFunc,int inUnicode)
656 { 656 {
657 // UBYTE i; // RAVI - Not Used. 657 // UBYTE i; // RAVI - Not Used.
658 MfwWin * win; 658 MfwWin * win;
675 if (!ListData) 675 if (!ListData)
676 { 676 {
677 /* cq12719. if insufficient memory for listdata then delete window and Free allocated memory.16-03-04.MZ */ 677 /* cq12719. if insufficient memory for listdata then delete window and Free allocated memory.16-03-04.MZ */
678 if(NULL != winLists) 678 if(NULL != winLists)
679 winDelete(winLists); 679 winDelete(winLists);
680 680
681 TRACE_EVENT ("(ListWinInfo *)ALLOC_MEMORY fails"); 681 TRACE_EVENT ("(ListWinInfo *)ALLOC_MEMORY fails");
682 return LISTS_FAIL; 682 return LISTS_FAIL;
683 } 683 }
684 684
685 ListData->mmi_control.dialog = (T_DIALOG_FUNC)lists_exec_cb; 685 ListData->mmi_control.dialog = (T_DIALOG_FUNC)lists_exec_cb;
710 /* SPR#2492 - DS - Do not overwrite mode settings unless mode is zero */ 710 /* SPR#2492 - DS - Do not overwrite mode settings unless mode is zero */
711 if (ListData->MenuListsAttr.mode == 0x0000) /* Mode not yet setup */ 711 if (ListData->MenuListsAttr.mode == 0x0000) /* Mode not yet setup */
712 ListData->MenuListsAttr.mode = MNU_LEFT | MNU_LIST | MNU_CUR_LINE; 712 ListData->MenuListsAttr.mode = MNU_LEFT | MNU_LIST | MNU_CUR_LINE;
713 else 713 else
714 ListData->MenuListsAttr.mode |= Data->Attr->mode; 714 ListData->MenuListsAttr.mode |= Data->Attr->mode;
715 715
716 ListData->MenuListsAttr.font = Data->Font; 716 ListData->MenuListsAttr.font = Data->Font;
717 ListData->MenuListsAttr.items = Data->List; 717 ListData->MenuListsAttr.items = Data->List;
718 ListData->MenuListsAttr.nItems = Data->ListLength; 718 ListData->MenuListsAttr.nItems = Data->ListLength;
719 719
720 /* START: x0045876, 05-June-2006 (OMAPS00060424 - Header Toggle) */ 720 /* START: x0045876, 05-June-2006 (OMAPS00060424 - Header Toggle) */
721 ListData->MenuListsAttr.header_toggle = Data->Attr->header_toggle; 721 ListData->MenuListsAttr.header_toggle = Data->Attr->header_toggle;
729 */ 729 */
730 ListData->MenuData = *Data; /* copy contents */ 730 ListData->MenuData = *Data; /* copy contents */
731 ListData->MenuData.listCol = COLOUR_LIST_XX; //Set-up colour 731 ListData->MenuData.listCol = COLOUR_LIST_XX; //Set-up colour
732 ListData->MenuData.Attr = &ListData->MenuListsAttr; /* copy data*/ 732 ListData->MenuData.Attr = &ListData->MenuListsAttr; /* copy data*/
733 ListData->MenuLists = mnuCreate(winLists, &ListData->MenuListsAttr, 733 ListData->MenuLists = mnuCreate(winLists, &ListData->MenuListsAttr,
734 E_MNU_SELECT | E_MNU_ESCAPE, 734 E_MNU_SELECT | E_MNU_ESCAPE,
735 (MfwCb)listsListCbMenu); 735 (MfwCb)listsListCbMenu);
736 ListData->MenuData.win = winLists; 736 ListData->MenuData.win = winLists;
737 Data->win = winLists; 737 Data->win = winLists;
738 mnuScrollMode(ListData->MenuLists,1); 738 mnuScrollMode(ListData->MenuLists,1);
739 if (Data->Strings) 739 if (Data->Strings)
740 mnuLang (ListData->MenuLists,0); 740 mnuLang (ListData->MenuLists,0);
741 else 741 else
742 mnuLang (ListData->MenuLists,mainMmiLng); 742 mnuLang (ListData->MenuLists,mainMmiLng);
743 743
757 } 757 }
758 758
759 759
760 /******************************************************************************* 760 /*******************************************************************************
761 761
762 $Function: listsKeyEvent 762 $Function: listsKeyEvent
763 763
764 $Description: Keyboard event handler 764 $Description: Keyboard event handler
765 765
766 $Returns: none. 766 $Returns: none.
767 767
768 $Arguments: 768 $Arguments:
769 769
770 *******************************************************************************/ 770 *******************************************************************************/
771 static int listsKeyEvent (MfwEvt e, MfwKbd *k) 771 static int listsKeyEvent (MfwEvt e, MfwKbd *k)
772 /* list keyboard event handler */ 772 /* list keyboard event handler */
773 { 773 {
774 T_MFW_HND win = mfwParent(mfw_header()); 774 T_MFW_HND win = mfwParent(mfw_header());
813 /* This event will be used to play the selected file. */ 813 /* This event will be used to play the selected file. */
814 814
815 if(getMelodyListStatus()== TRUE) 815 if(getMelodyListStatus()== TRUE)
816 { 816 {
817 MenuHandle = mfwControl(data->MenuLists); 817 MenuHandle = mfwControl(data->MenuLists);
818 818
819 data->MenuData.Reason = LISTS_REASON_SCROLL; 819 data->MenuData.Reason = LISTS_REASON_SCROLL;
820 data->MenuData.CursorPosition = MenuHandle->lCursor[MenuHandle->level]; 820 data->MenuData.CursorPosition = MenuHandle->lCursor[MenuHandle->level];
821 data->MenuData.ListPosition = MenuHandle->lCursor[MenuHandle->level]; 821 data->MenuData.ListPosition = MenuHandle->lCursor[MenuHandle->level];
822 SEND_EVENT(data->Parent,E_START_MELODY,0,(void*)data); 822 SEND_EVENT(data->Parent,E_START_MELODY,0,(void*)data);
823 } 823 }
824 824
825 if(getScrollStatus() == TRUE) 825 if(getScrollStatus() == TRUE)
826 { 826 {
827 // Send event to indicate that the user has scrolled list items 827 // Send event to indicate that the user has scrolled list items
828 SEND_EVENT(data->Parent, LISTS_REASON_SCROLL, 0, NULL); 828 SEND_EVENT(data->Parent, LISTS_REASON_SCROLL, 0, NULL);
829 } 829 }
830 break; 830 break;
831 case KCD_MNUDOWN: /* highlight next entry */ 831 case KCD_MNUDOWN: /* highlight next entry */
832 mnuDown(data->MenuLists); 832 mnuDown(data->MenuLists);
833 //GW Not needed? winShow(win); 833 //GW Not needed? winShow(win);
835 /* This event will be used to play the selected file. */ 835 /* This event will be used to play the selected file. */
836 836
837 if(getMelodyListStatus()== TRUE) 837 if(getMelodyListStatus()== TRUE)
838 { 838 {
839 MenuHandle = mfwControl(data->MenuLists); 839 MenuHandle = mfwControl(data->MenuLists);
840 840
841 data->MenuData.Reason = LISTS_REASON_SCROLL; 841 data->MenuData.Reason = LISTS_REASON_SCROLL;
842 data->MenuData.CursorPosition = MenuHandle->lCursor[MenuHandle->level]; 842 data->MenuData.CursorPosition = MenuHandle->lCursor[MenuHandle->level];
843 data->MenuData.ListPosition = MenuHandle->lCursor[MenuHandle->level]; 843 data->MenuData.ListPosition = MenuHandle->lCursor[MenuHandle->level];
844 SEND_EVENT(data->Parent,E_START_MELODY,0,(void*)data); 844 SEND_EVENT(data->Parent,E_START_MELODY,0,(void*)data);
845 } 845 }
846 846
847 if(getScrollStatus() == TRUE) 847 if(getScrollStatus() == TRUE)
848 { 848 {
849 // Send event to indicate that the user has scrolled list items 849 // Send event to indicate that the user has scrolled list items
850 SEND_EVENT(data->Parent, LISTS_REASON_SCROLL, 0, NULL); 850 SEND_EVENT(data->Parent, LISTS_REASON_SCROLL, 0, NULL);
851 } 851 }
852 break; 852 break;
853 case KCD_MNUSELECT: 853 case KCD_MNUSELECT:
854 //xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357 854 //xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
855 //Menu Select Key was pressed, storing this for future use. 855 //Menu Select Key was pressed, storing this for future use.
856 data->MenuData.selectKey = TRUE; 856 data->MenuData.selectKey = TRUE;
857 //Break is delibrately not used here. The control should pass through the KCD_LEFT case. 857 //Break is delibrately not used here. The control should pass through the KCD_LEFT case.
858 case KCD_LEFT: /* activate this entry */ 858 case KCD_LEFT: /* activate this entry */
859 mnuSelect(data->MenuLists); 859 mnuSelect(data->MenuLists);
860 MenuHandle = mfwControl(data->MenuLists); 860 MenuHandle = mfwControl(data->MenuLists);
861 if ((MenuHandle != NULL) && // Marcus: Issue 1810: 12/03/2003 861 if ((MenuHandle != NULL) && // Marcus: Issue 1810: 12/03/2003
873 data->MenuData.ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */ 873 data->MenuData.ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */
874 874
875 /* SPR998 - SH - check if callback exists before calling it! */ 875 /* SPR998 - SH - check if callback exists before calling it! */
876 if (data->Callback) 876 if (data->Callback)
877 data->Callback(data->Parent, &data->MenuData); 877 data->Callback(data->Parent, &data->MenuData);
878 878
879 if (data->MenuData.autoDestroy) 879 if (data->MenuData.autoDestroy)
880 { 880 {
881 /* START: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 881 /* START: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
882 if (data->MenuListsAttr.header_toggle) 882 if (data->MenuListsAttr.header_toggle)
883 { 883 {
929 return MFW_EVENT_CONSUMED; 929 return MFW_EVENT_CONSUMED;
930 } 930 }
931 931
932 /******************************************************************************* 932 /*******************************************************************************
933 933
934 $Function: listsWinEvent 934 $Function: listsWinEvent
935 935
936 $Description: window event handler 936 $Description: window event handler
937 937
938 $Returns: none. 938 $Returns: none.
939 939
940 $Arguments: 940 $Arguments:
941 941
942 *******************************************************************************/ 942 *******************************************************************************/
943 static int listsWinEvent(MfwEvt e, MfwWin *w) 943 static int listsWinEvent(MfwEvt e, MfwWin *w)
944 { 944 {
945 ListWinInfo * ListData = (ListWinInfo *)w->user; 945 ListWinInfo * ListData = (ListWinInfo *)w->user;
946 946
947 TRACE_FUNCTION("listsWinEvent()"); 947 TRACE_FUNCTION("listsWinEvent()");
948 948
949 switch (e) 949 switch (e)
950 { 950 {
951 case E_WIN_VISIBLE: 951 case E_WIN_VISIBLE:
952 SEND_EVENT(ListData->Parent,LISTS_REASON_VISIBLE,0,(void*)ListData); 952 SEND_EVENT(ListData->Parent,LISTS_REASON_VISIBLE,0,(void*)ListData);
953 break; 953 break;
954 case MfwWinResume: 954 case MfwWinResume:
955 SEND_EVENT(ListData->Parent,LISTS_REASON_RESUME,0,(void*)ListData); 955 SEND_EVENT(ListData->Parent,LISTS_REASON_RESUME,0,(void*)ListData);
956 break; 956 break;
957 case MfwWinSuspend: 957 case MfwWinSuspend:
958 SEND_EVENT(ListData->Parent,LISTS_REASON_SUSPEND,0,(void*)ListData); 958 SEND_EVENT(ListData->Parent,LISTS_REASON_SUSPEND,0,(void*)ListData);
959 break; 959 break;
960 } 960 }
961 return MFW_EVENT_CONSUMED; 961 return MFW_EVENT_CONSUMED;
962 } 962 }
963 963
964 static void lists_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) 964 static void lists_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
1002 1002
1003 1003
1004 1004
1005 /******************************************************************************* 1005 /*******************************************************************************
1006 1006
1007 $Function: listsListCbMenu 1007 $Function: listsListCbMenu
1008 1008
1009 $Description: List menu handler. (mfw callback function) 1009 $Description: List menu handler. (mfw callback function)
1010 1010
1011 $Returns: none. 1011 $Returns: none.
1012 1012
1013 $Arguments: 1013 $Arguments:
1014 1014
1015 *******************************************************************************/ 1015 *******************************************************************************/
1016 int listsListCbMenu(MfwEvt EventCode, MfwMnu *MenuHandle) 1016 int listsListCbMenu(MfwEvt EventCode, MfwMnu *MenuHandle)
1017 { 1017 {
1018 int Status = LISTS_OK; 1018 int Status = LISTS_OK;
1019 T_MFW_HND win = mfw_parent (mfw_header()); 1019 T_MFW_HND win = mfw_parent (mfw_header());
1039 ListData->MenuData.Reason = LISTS_REASON_BACK; 1039 ListData->MenuData.Reason = LISTS_REASON_BACK;
1040 /*NM, p023*/ 1040 /*NM, p023*/
1041 ListData->MenuData.CursorPosition = MenuHandle->lCursor[MenuHandle->level]; 1041 ListData->MenuData.CursorPosition = MenuHandle->lCursor[MenuHandle->level];
1042 ListData->MenuData.ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */ 1042 ListData->MenuData.ListPosition = MenuHandle->lCursor[MenuHandle->level]; /* True cursor position in list menu. */
1043 /*NM, p023*/ 1043 /*NM, p023*/
1044 1044
1045 /* SPR998 - SH - check if callback exists before calling it! */ 1045 /* SPR998 - SH - check if callback exists before calling it! */
1046 if (ListData->Callback) 1046 if (ListData->Callback)
1047 ListData->Callback(ListData->Parent, &ListData->MenuData); 1047 ListData->Callback(ListData->Parent, &ListData->MenuData);
1048 break; 1048 break;
1049 1049
1050 default: 1050 default:
1051 Status = LISTS_FAIL; 1051 Status = LISTS_FAIL;
1052 TRACE_EVENT("Activation 77 error"); 1052 TRACE_EVENT("Activation 77 error");
1053 break; 1053 break;
1054 } 1054 }
1055 1055
1056 /* 1056 /*
1057 * Free all allocated memory and handler 1057 * Free all allocated memory and handler
1087 tim_delete(g_title_timer); 1087 tim_delete(g_title_timer);
1088 g_title_timer = NULL; 1088 g_title_timer = NULL;
1089 } 1089 }
1090 } 1090 }
1091 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ 1091 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
1092 1092
1093 winDelete (win); 1093 winDelete (win);
1094 FREE_MEMORY ((void*) ListData, sizeof (ListWinInfo)); 1094 FREE_MEMORY ((void*) ListData, sizeof (ListWinInfo));
1095 1095
1096 } 1096 }
1097 1097