wgui_categories_idlescreen.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:211k
源码类别:
MTK
开发平台:
C/C++
- #if defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)
- gui_measure_image((PU8) GetImage((U16) (IMG_IDLE_MAINMENU_SHORCUT + i)), &image_width[i], &image_height[i]);
- total_width += image_width[i];
- touch_idle_shortcuts[i].height = image_height[i];
- touch_idle_shortcuts[i].width = image_width[i];
- #elif defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__)
- touch_idle_shortcuts[i].height = TOUCHPANEL_HW_SHORTCUT_AREA_HEIGHT;
- touch_idle_shortcuts[i].width = (S32)(LCD_WIDTH/MAX_IDLE_SCREEN_SHORTCUTS);
- #endif
- //KP Jerry modify on 2007-3-7 end
- }
- //KP Jerry modify on 2007-3-7 start
- #if defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)
- MMI_DBG_ASSERT(total_width >= 0 && total_width <= UI_device_width);
- #endif
- //KP Jerry modify on 2007-3-7 end
- //KP Jerry modify on 2007-3-7 start
- #if defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)
- //PMT HIMANSHU START 20050721
- // touch_idle_shortcuts[0].entryfn = NULL; /* Needs to be decided */
- touch_idle_shortcuts[0].entryfn = EntryMainMenuFromIdleScreen;
- /* PMT HIMANSHU END 20050721 */
- touch_idle_shortcuts[1].entryfn = EntryScrMessagesMenuList;
- touch_idle_shortcuts[2].entryfn = mmi_phb_entry_main_menu;
- touch_idle_shortcuts[3].entryfn = IdleScreenDigitHandler;
- #elif defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__)
- touch_idle_shortcuts[0].entryfn = EntryMainMenuFromIdleScreen;
- touch_idle_shortcuts[1].entryfn = mmi_phb_entry_main_menu;
- touch_idle_shortcuts[2].entryfn = EntryScrMessagesMenuList;
- touch_idle_shortcuts[3].entryfn = mmi_camera_entry_app_screen;
- touch_idle_shortcuts[4].entryfn = mmi_vdoply_entry_app;
- #endif
- //KP Jerry modify on 2007-3-7 end
- //KP Jerry modify on 2007-3-7 start
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__
- x_margin = (UI_device_width - total_width) / ((MAX_IDLE_SCREEN_SHORTCUTS - 1) + 2); /* Margin between shortcut Images,Leave margin on front and back also */
- x = x_margin;
- #endif
- //KP Jerry modify on 2007-3-7 end
- for (i = 0; i < MAX_IDLE_SCREEN_SHORTCUTS; i++)
- {
- //KP Jerry modify on 2007-3-7 start
- #if defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)
- touch_idle_shortcuts[i].x = x;
- touch_idle_shortcuts[i].y = UI_device_height - touch_idle_shortcuts[i].height;
- x += touch_idle_shortcuts[i].width + x_margin;
- #elif defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__)
- touch_idle_shortcuts[i].x = (i * ((S32)(LCD_WIDTH/MAX_IDLE_SCREEN_SHORTCUTS)));
- touch_idle_shortcuts[i].y = LCD_HEIGHT;
- #endif
- //KP Jerry modify on 2007-3-7 end
- }
- }
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ //KP Jerry add on 2007-3-7
- /*****************************************************************************
- * FUNCTION
- * display_touch_idle_screen_shortcuts
- * DESCRIPTION
- * This function is used to draw touch screen shortcuts
- * PARAMETERS
- * void
- * RETURNS
- * void
- * REMARKS
- * This routine is dependent on Order of Image Id's of Shortcut Item Images.
- * DON'T CHANGE THE ORDER OF IMAGE ID's
- *****************************************************************************/
- void display_touch_idle_screen_shortcuts(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, max_height;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //PMT HIMANSHU START 20050809
- // function is added for calculating the maximum height of idlescreen shortcut
- // max_height = touch_idle_shortcuts[0].height; /*In case Image's are of different height, Find the maximum height image*/
- gui_lock_double_buffer();
- for (i = 0; i < MAX_IDLE_SCREEN_SHORTCUTS; i++)
- {
- gui_show_image(
- touch_idle_shortcuts[i].x,
- touch_idle_shortcuts[i].y,
- get_image((MMI_ID_TYPE) (IMG_IDLE_MAINMENU_SHORCUT + i)));
- // if(max_height < touch_idle_shortcuts[i].height)
- // max_height = touch_idle_shortcuts[i].height;
- }
- max_height = max_touch_idle_screen_shortcut_height();
- /* PMT HIMANSHU END 20050809 */
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, UI_device_height - max_height, UI_device_width, UI_device_height);
- }
- /* PMT HIMANSHU START 20050809 */
- /*****************************************************************************
- * FUNCTION
- * max_touch_idle_screen_shortcut_height
- * DESCRIPTION
- * This function is used to find the maximum height of idlescreen shortcut
- * among them.
- * PARAMETERS
- * void
- * RETURNS
- * S32 max_height
- * REMARKS
- *
- *****************************************************************************/
- S32 max_touch_idle_screen_shortcut_height(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, max_height;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* In case Image's are of different height, Find the maximum height image */
- max_height = touch_idle_shortcuts[0].height;
- for (i = 0; i < MAX_IDLE_SCREEN_SHORTCUTS; i++)
- {
- if (max_height < touch_idle_shortcuts[i].height)
- {
- max_height = touch_idle_shortcuts[i].height;
- }
- }
- return (max_height);
- }
- #endif /*(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)*/ //KP Jerry add on 2007-3-7
- /* PMT HIMANSHU END 20050809 */
- #endif /* (__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) ||(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__)*/ //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2007-3-7
- /* ~] */
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /*****************************************************************************
- * FUNCTION
- * show_boundries_to_status_bar_at_bottom_idlescreen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void show_boundries_to_status_bar_at_bottom_idlescreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- c = gui_color(255, 255, 255);
- gui_draw_horizontal_line(0, UI_device_width - 1, UI_device_height - 1 - MMI_button_bar_height, c);
- gui_draw_horizontal_line(
- 0,
- UI_device_width - 1,
- UI_device_height - 1 - MMI_button_bar_height - MMI_status_bar_height - 2,
- c);
- gui_draw_horizontal_line(0, UI_device_width - 1, 0, c);
- #ifdef __MMI_MAINLCD_128X128__
- gui_draw_horizontal_line(0, UI_device_width - 1, MMI_status_bar_height + 2, c);
- #else
- gui_draw_horizontal_line(0, UI_device_width - 1, MMI_status_bar_height, c);
- #endif
- }
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory33Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory33Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifndef __GDI_MEMORY_PROFILE_2__
- gui_cancel_timer(cat33_animation_processor);
- #endif
- #ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- gui_push_clip();
- gui_set_clip(0, MMI_status_bar_height, UI_device_width - 1, MMI_status_bar_height + MMI_IDLESCREEN_BAR_HEIGHT - 1);
- #ifndef __MMI_UI_TECHNO_STATUS_ICON__
- if (PhnsetGetShowDateTimeStatus() == MMI_TRUE)
- #endif
- //KP Jerry modify on 2007-1-5 start
- #ifndef __MMI_UI_TECHNO_IDLESCREEN_BAR_HALF_TRANSPARENT_DISPLAY__
- gui_show_image(0, MMI_status_bar_height, get_image(idlescreen_bar_id));//070306 Alpha layer
- #else
- gui_reset_clip();
- gui_lock_double_buffer();
- gdi_draw_solid_rect(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1,GDI_COLOR_HALF_TRANSPARENT);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1);
- #endif
- //KP Jerry modify on 2007-1-5 end
- gui_pop_clip();
- #endif /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- #ifdef __GDI_MEMORY_PROFILE_2__
- update_mainlcd_dt_display();
- #else
- show_main_LCD_dt_display();
- #endif
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- MMI_title_string = NULL;
- MMI_title_icon = NULL;
- draw_title();
- arrange_status_icons();
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- #ifndef __MMI_IDLE_FULL_SCREEN__
- idle_screen_hide_status_icons_bar0();
- #endif
- in_idle_screen();
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- disable_statusbar_fill_background();
- #endif
- show_status_icons();
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- enable_statusbar_fill_background();
- refresh_fixed_status_icon(STATUS_ICON_SIGNAL_STRENGTH, 0);
- refresh_fixed_status_icon(STATUS_ICON_BATTERY_STRENGTH, 1);
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- is_button_bar_shuffled = 0;
- #endif
- #ifdef __MMI_UI_TECHNO_STATUS_ICON__
- refresh_fixed_status_icon(STATUS_ICON_SIGNAL_STRENGTH, 0);
- refresh_fixed_status_icon(STATUS_ICON_BATTERY_STRENGTH, 0);
- #endif /* __MMI_UI_TECHNO_STATUS_ICON__ */
- if (idle_screen_type == ANALOG_IDLE_SCREEN || idle_screen_type == DIGITAL_IDLE_SCREEN)
- {
- idle_screen_show_network_name();
- }
- else
- {
- idle_screen_show_network_details();
- }
- #ifdef __MMI_IDLE_FULL_SCREEN__
- on_idle_screen = 1;
- #endif
- set_on_idlescreen(1);
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- show_boundries_to_status_bar_at_bottom_idlescreen();
- #endif
- #if defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)
- if (mmi_bootup_get_active_flight_mode() == 0)
- {
- display_touch_idle_screen_shortcuts();
- }
- #endif /* defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) */
- register_hide_status_icon_bar(0, idle_screen_hide_status_icons_bar0);
- register_hide_status_icon_bar(1, idle_screen_hide_status_icons_bar1);
- #if(ENABLE_ANIMATED_WALLPAPERS)
- #ifndef __GDI_MEMORY_PROFILE_2__
- if (cat33_n_frames > 1 && idle_screen_wallpaper_ID != 0)
- {
- gui_start_timer(cat33_animation_delay, cat33_animation_processor);
- }
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- #endif /* (ENABLE_ANIMATED_WALLPAPERS) */
- show_fixed_matrix();
- gui_show_fixed_list_menu(&idle_list_menu);
- }
- /*****************************************************************************
- * FUNCTION
- * dm_category_33_controlled_area
- * DESCRIPTION
- * This function is used to draw the category controlled area of idle screen
- * PARAMETERS
- * coordinate [IN/OUT] Coordinates of category controlled area.
- * RETURNS
- * void
- *****************************************************************************/
- void dm_category_33_controlled_area(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- RedrawCategory33Screen();
- }
- #ifdef __MMI_TOUCH_SCREEN__
- /* [~PMT MANISH 20050623 */
- #if ( defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__) ) //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2006-11-2
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ //KP Jerry add on 2007-3-7
- /*****************************************************************************
- * FUNCTION
- * gui_idle_touch_screen_display_shorcut_item
- * DESCRIPTION
- * This function is Display individual shorcut item on Touch idle screen
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- * REMARKS
- *
- *****************************************************************************/
- void gui_idle_touch_screen_display_shorcut_item(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* PMT HIMANSHU START 20050726 */
- S32 x1, y1, x2, y2;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* PMT HIMANSHU END 20050726 */
- MMI_DBG_ASSERT(index >= 0 && index < MAX_IDLE_SCREEN_SHORTCUTS);
- /* PMT HIMANSHU START 20050726 */
- x1 = touch_idle_shortcuts[index].x;
- y1 = touch_idle_shortcuts[index].y;
- x2 = touch_idle_shortcuts[index].x + touch_idle_shortcuts[index].width - 1;
- y2 = touch_idle_shortcuts[index].y + touch_idle_shortcuts[index].height - 1;
- /* PMT HIMANSHU END 20050726 */
- gui_lock_double_buffer();
- /* PMT HIMANSHU START 20050726 */
- gui_push_clip();
- gui_set_clip(x1, y1, x2, y2);
- #ifdef __GDI_MEMORY_PROFILE_2__
- /* gui_fill_rectangle(x1, y1, x2, y2, wgui_transparent_color); */
- gdi_draw_solid_rect(x1, y1, x2, y2, GDI_COLOR_TRANSPARENT); /* 112205 transparent color Calvin */
- #else /* __GDI_MEMORY_PROFILE_2__ */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- /* gui_show_image(touch_idle_shortcuts[index].x,touch_idle_shortcuts[index].y,GetImage((U16)(IMG_IDLE_MAINMENU_SHORCUT+index))); */
- gui_show_image(x1, y1, (PU8) GetImage((U16) (IMG_IDLE_MAINMENU_SHORCUT + index)));
- gui_pop_clip();
- gui_unlock_double_buffer();
- /* gui_BLT_double_buffer(touch_idle_shortcuts[index].x,touch_idle_shortcuts[index].y,touch_idle_shortcuts[index].x+touch_idle_shortcuts[index].width,touch_idle_shortcuts[index].y+touch_idle_shortcuts[index].height); */
- gui_BLT_double_buffer(x1, y1, x2, y2);
- /* PMT HIMANSHU END 20050726 */
- }
- /*****************************************************************************
- * FUNCTION
- * gui_idle_touch_screen_display_pressed_shorcut_item
- * DESCRIPTION
- * This function is Display individual pressed shorcut item on Touch idle screen
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- * REMARKS
- *
- *****************************************************************************/
- void gui_idle_touch_screen_display_pressed_shorcut_item(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* PMT HIMANSHU START 20050726 */
- S32 x1, y1, x2, y2;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* PMT HIMANSHU END 20050726 */
- MMI_DBG_ASSERT(index >= 0 && index < MAX_IDLE_SCREEN_SHORTCUTS);
- /* PMT HIMANSHU START 20050726 */
- x1 = touch_idle_shortcuts[index].x;
- y1 = touch_idle_shortcuts[index].y;
- x2 = touch_idle_shortcuts[index].x + touch_idle_shortcuts[index].width - 1;
- y2 = touch_idle_shortcuts[index].y + touch_idle_shortcuts[index].height - 1;
- /* PMT HIMANSHU END 20050726 */
- gui_lock_double_buffer();
- /* PMT HIMANSHU START 20050726 */
- gui_push_clip();
- gui_set_clip(x1, y1, x2, y2);
- #ifdef __GDI_MEMORY_PROFILE_2__
- /* gui_fill_rectangle(x1, y1, x2, y2, wgui_transparent_color); */
- gdi_draw_solid_rect(x1, y1, x2, y2, GDI_COLOR_TRANSPARENT); /* 112205 transparent color Calvin */
- #else /* __GDI_MEMORY_PROFILE_2__ */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- /* gui_show_image(touch_idle_shortcuts[index].x,touch_idle_shortcuts[index].y,GetImage((U16)(IMG_IDLE_MAINMENU_SHORCUT_PRESSED+index))); */
- gui_show_image(x1, y1, (PU8) GetImage((U16) (IMG_IDLE_MAINMENU_SHORCUT_PRESSED + index)));
- gui_pop_clip();
- gui_unlock_double_buffer();
- /* gui_BLT_double_buffer(touch_idle_shortcuts[index].x,touch_idle_shortcuts[index].y,touch_idle_shortcuts[index].x+touch_idle_shortcuts[index].width,touch_idle_shortcuts[index].y+touch_idle_shortcuts[index].height); */
- gui_BLT_double_buffer(x1, y1, x2, y2);
- /* PMT HIMANSHU END 20050726 */
- }
- #endif /*(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)*/ //KP Jerry add on 2007-3-7
- /*****************************************************************************
- * FUNCTION
- * gui_idle_touch_screen_shortcut_translate_pen_position
- * DESCRIPTION
- * This function finds index of shorcut item on which pen event came
- * PARAMETERS
- * x [IN] Pen's x position
- * y [IN] Pen's y position
- * index [OUT] Index of selected item
- * RETURNS
- * void
- * REMARKS
- *
- *****************************************************************************/
- void gui_idle_touch_screen_shortcut_translate_pen_position(S32 x, S32 y, S32 *index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *index = -1;
- for (i = 0; i < MAX_IDLE_SCREEN_SHORTCUTS; i++)
- {
- if (x >= touch_idle_shortcuts[i].x && x <= touch_idle_shortcuts[i].x + touch_idle_shortcuts[i].width &&
- y >= touch_idle_shortcuts[i].y && y <= touch_idle_shortcuts[i].y + touch_idle_shortcuts[i].height)
- {
- *index = i;
- break;
- }
- }
- }
- #endif /*(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || (__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__)*/ //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2007-3-7
- /* ~] */
- /*****************************************************************************
- * FUNCTION
- * category33_pen_down_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- MMI_BOOL category33_pen_down_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 pos_x = point.x, pos_y = point.y, y2;
- MMI_BOOL ret = MMI_FALSE;;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_idle_restart_screensaver_timer();
- mmi_idle_restart_keypad_lock_timer();
- /* [~PMT MANISH 20050623 */
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__
- /* PMT HIMANSHU FLIGHT MODE START 20050926 */
- if (mmi_bootup_get_active_flight_mode() == 1)
- {
- y2 = UI_device_height - 1 - MMI_button_bar_height;
- }
- else
- /* PMT HIMANSHU FLIGHT MODE END 2005926 */
- {
- y2 = UI_device_height; /* N CASE IDLE SCREEN SHORTCUTS ARE DISPLAYED, BUTTON BAR IS NOT DISPLAYED */
- }
- #else /* __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ */
- y2 = UI_device_height - 1 - MMI_button_bar_height;
- #endif /* __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ */
- /* ~] */
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ //KP Jerry add on 2007-3-7
- if (pos_x > 0 && pos_x < UI_device_width - 1 && pos_y > MMI_content_y && pos_y < y2)
- #endif //KP Jerry add on 2007-3-7
- {
- ret = MMI_TRUE;
- /* [~PMT MANISH 20050623 */
- #if ( defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__) ) //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2007-3-7
- {
- S32 index;
- gui_idle_touch_screen_shortcut_translate_pen_position(pos_x, pos_y, &index);
- if (index >= 0 && index < MAX_IDLE_SCREEN_SHORTCUTS)
- {
- touch_idle_screen_highlighted_shortcut = index;
- touch_idle_screen_highlight_changed = 0;
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ //KP Jerry add on 2007-3-7
- gui_idle_touch_screen_display_pressed_shorcut_item(index);
- #endif //KP Jerry add on 2007-3-7
- }
- }
- #endif /*(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || (__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__)*/ //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2007-3-7
- /* ~] */
- }
- return ret;
- }
- S32 cat33_scr_lock_repeat = -1;
- /*****************************************************************************
- * FUNCTION
- * category33_pen_long_tap_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- MMI_BOOL category33_pen_long_tap_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 pos_x = point.x, pos_y = point.y;
- S32 width_third=0, height_third=0; //KP Jerry add on 2006-11-14
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //KP Jerry disable on 2006-11-14 start
- /*
- if (g_keylock_context.gKeyPadLockFlag == 0 && pos_x >= UI_device_width >> 2 &&
- pos_x <= UI_device_width - (UI_device_width < 2) && pos_y >= UI_device_height >> 2 &&
- pos_y <= UI_device_height - (MMI_button_bar_height >> 2))
- {
- cat33_scr_lock_repeat = 0;
- return MMI_TRUE;
- }
- */
- //KP Jerry disable on 2006-11-14 end
- //KP Jerry add on 2006-11-14 start
- //width_third=(S32)(LCD_WIDTH/3);
- //height_third=(S32)((LCD_HEIGHT-MMI_STATUS_BAR_HEIGHT-MMI_BUTTON_BAR_HEIGHT)/3);
- //bottom-right area
- #if !defined(__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__) || defined(__MMI_SLIDE__)
- /*
- if ( g_keylock_context.gKeyPadLockFlag==0
- && pos_x >= (LCD_WIDTH-width_third) && pos_x <= (LCD_WIDTH-1)
- && pos_y >= (LCD_HEIGHT-MMI_BUTTON_BAR_HEIGHT-height_third) && pos_y <= (LCD_HEIGHT-MMI_BUTTON_BAR_HEIGHT-1) )
- */
- {
- cat33_scr_lock_repeat=0;
- if (g_idle_context.IsOnIdleScreen)
- {
- IdleSetKeyPadLockFlag();
- }
- if (g_idle_context.IsOnSimErrorScreen) /* diamond, 2005/10/29, keypad lock in insert sim screen */
- {
- InsertSimSetKeyPadLockFlag();
- }
- return MMI_TRUE;
- }
- /*KP Jerry disable on 2007-1-5
- //Center area
- else if ( g_keylock_context.gKeyPadLockFlag==0
- && pos_x >= width_third && pos_x <= (LCD_WIDTH-width_third)
- && pos_y >= (MMI_STATUS_BAR_HEIGHT+height_third) && pos_y <= (LCD_HEIGHT-MMI_BUTTON_BAR_HEIGHT-height_third) )
- {
- cat33_scr_lock_repeat=0;
- EntryCalibrationSettingScr();
- return MMI_TRUE;
- }
- */
- #endif/*!__MMI_TOUCH_SCREEN_WITH_NUMERIC_KEY__*/
- //KP Jerry add on 2006-11-14 end
- return MMI_FALSE;
- }
- /*****************************************************************************
- * FUNCTION
- * category33_pen_repeat_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- MMI_BOOL category33_pen_repeat_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_idle_restart_screensaver_timer();
- mmi_idle_restart_keypad_lock_timer();
- return MMI_TRUE;
- }
- /* [~PMT MANISH 20050623 */
- #if ( defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__) ) //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2007-3-7
- /*****************************************************************************
- * FUNCTION
- * category33_pen_up_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- MMI_BOOL category33_pen_up_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 pos_x = point.x, pos_y = point.y, index;
- MMI_BOOL ret = MMI_TRUE;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_idle_touch_screen_shortcut_translate_pen_position(pos_x, pos_y, &index);
- if (index >= 0 && index < MAX_IDLE_SCREEN_SHORTCUTS)
- {
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ //KP Jerry add on 2007-3-7
- gui_idle_touch_screen_display_shorcut_item(index);
- #endif //KP Jerry add on 2007-3-7
- if (!touch_idle_screen_highlight_changed)
- {
- if (touch_idle_shortcuts[index].entryfn)
- {
- touch_idle_shortcuts[index].entryfn();
- }
- }
- }
- return ret;
- }
- /*****************************************************************************
- * FUNCTION
- * category33_pen_move_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- MMI_BOOL category33_pen_move_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 pos_x = point.x, pos_y = point.y, index;
- MMI_BOOL ret = MMI_TRUE;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_idle_touch_screen_shortcut_translate_pen_position(pos_x, pos_y, &index);
- if (index != touch_idle_screen_highlighted_shortcut)
- {
- touch_idle_screen_highlight_changed = 1;
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ //KP Jerry add on 2007-3-7
- /* Unpressed Image */
- gui_idle_touch_screen_display_shorcut_item(touch_idle_screen_highlighted_shortcut);
- #endif //KP Jerry add on 2007-3-7
- }
- if (index >= 0 && index < MAX_IDLE_SCREEN_SHORTCUTS)
- {
- touch_idle_screen_highlighted_shortcut = index;
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ //KP Jerry add on 2007-3-7
- /* Pressed Image */
- gui_idle_touch_screen_display_pressed_shorcut_item(index);
- #endif //KP Jerry add on 2007-3-7
- }
- return ret;
- }
- #endif /*(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || (__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__)*/ //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2007-3-7
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*****************************************************************************
- * FUNCTION
- * cat33_hide_lsk
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat33_hide_lsk(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_push_clip();
- gdi_layer_set_clip(
- MMI_softkeys[MMI_LEFT_SOFTKEY].x,
- MMI_softkeys[MMI_LEFT_SOFTKEY].y,
- MMI_softkeys[MMI_LEFT_SOFTKEY].x + MMI_softkeys[MMI_LEFT_SOFTKEY].width - 1,
- MMI_softkeys[MMI_LEFT_SOFTKEY].y + MMI_softkeys[MMI_LEFT_SOFTKEY].height - 1);
- #ifdef __GDI_MEMORY_PROFILE_2__
- gdi_draw_solid_rect(
- MMI_softkeys[MMI_LEFT_SOFTKEY].x,
- MMI_softkeys[MMI_LEFT_SOFTKEY].y,
- MMI_softkeys[MMI_LEFT_SOFTKEY].x + MMI_softkeys[MMI_LEFT_SOFTKEY].width - 1,
- MMI_softkeys[MMI_LEFT_SOFTKEY].y + MMI_softkeys[MMI_LEFT_SOFTKEY].height - 1,
- GDI_COLOR_TRANSPARENT);
- #else /* __GDI_MEMORY_PROFILE_2__ */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- gdi_layer_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * cat33_hide_rsk
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat33_hide_rsk(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_push_clip();
- gdi_layer_set_clip(
- MMI_softkeys[MMI_RIGHT_SOFTKEY].x,
- MMI_softkeys[MMI_RIGHT_SOFTKEY].y,
- MMI_softkeys[MMI_RIGHT_SOFTKEY].x + MMI_softkeys[MMI_RIGHT_SOFTKEY].width - 1,
- MMI_softkeys[MMI_RIGHT_SOFTKEY].y + MMI_softkeys[MMI_RIGHT_SOFTKEY].height - 1);
- #ifdef __GDI_MEMORY_PROFILE_2__
- gdi_draw_solid_rect(
- MMI_softkeys[MMI_RIGHT_SOFTKEY].x,
- MMI_softkeys[MMI_RIGHT_SOFTKEY].y,
- MMI_softkeys[MMI_RIGHT_SOFTKEY].x + MMI_softkeys[MMI_RIGHT_SOFTKEY].width - 1,
- MMI_softkeys[MMI_RIGHT_SOFTKEY].y + MMI_softkeys[MMI_RIGHT_SOFTKEY].height - 1,
- GDI_COLOR_TRANSPARENT);
- #else /* __GDI_MEMORY_PROFILE_2__ */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- gdi_layer_pop_clip();
- }
- #ifdef __MMI_WGUI_CSK_ENABLE__
- /*****************************************************************************
- * FUNCTION
- * cat33_hide_csk
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat33_hide_csk(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_push_clip();
- gdi_layer_set_clip(
- MMI_softkeys[MMI_CENTER_SOFTKEY].x,
- MMI_softkeys[MMI_CENTER_SOFTKEY].y,
- MMI_softkeys[MMI_CENTER_SOFTKEY].x + MMI_softkeys[MMI_CENTER_SOFTKEY].width - 1,
- MMI_softkeys[MMI_CENTER_SOFTKEY].y + MMI_softkeys[MMI_CENTER_SOFTKEY].height - 1);
- #ifdef __GDI_MEMORY_PROFILE_2__
- gdi_draw_solid_rect(
- MMI_softkeys[MMI_CENTER_SOFTKEY].x,
- MMI_softkeys[MMI_CENTER_SOFTKEY].y,
- MMI_softkeys[MMI_CENTER_SOFTKEY].x + MMI_softkeys[MMI_CENTER_SOFTKEY].width - 1,
- MMI_softkeys[MMI_CENTER_SOFTKEY].y + MMI_softkeys[MMI_CENTER_SOFTKEY].height - 1,
- GDI_COLOR_TRANSPARENT);
- #else /* __GDI_MEMORY_PROFILE_2__ */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- gdi_layer_pop_clip();
- }
- #endif /* __MMI_WGUI_CSK_ENABLE__ */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory33Screen
- * DESCRIPTION
- * Displays the Idle screen
- * PARAMETERS
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the Left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- /*
- * #ifdef MMI_ON_HARDWARE_P
- * extern kal_int32 L1T_GetFN( void );
- * #endif
- */
- void ShowCategory33Screen_ext(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- //dm_data_struct dm_data;//110606 compile warning
- /* 110105 status bar1 Calvin Start */
- #ifndef __MMI_UI_DALMATIAN_STATUSBAR__
- S32 status_bar1_y1;
- S32 status_bar1_y2;
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 110105 status bar1 Calvin End */
- GDI_LOCK;
- gui_lock_double_buffer();
- /* PMT VIKAS START 20051202 */
- set_on_idlescreen(1);
- //PMT VIKAS END 20051202
- //START VIJAY PMT 20060105
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- set_status_bar_at_bottom();
- #endif
- /* END VIJAY PMT 20060105 */
- #ifdef __MMI_IDLE_FULL_SCREEN__
- on_idle_screen = 1;
- //PMT VIKAS START 20050913
- //For implement dalmatian on style 1, 2 and 3.
- #if !(defined(__MMI_UI_DALMATIAN_SOFTKEYS__) && (defined(__MMI_MAINLCD_128X128__) || defined(__MMI_MAINLCD_128X160__)))
- disable_softkey_background();
- #endif
- /* PMT VIKAS END 20050913 */
- #endif /* __MMI_IDLE_FULL_SCREEN__ */
- cat33_frame_number = 0;
- MMI_menu_shortcut_number = -1;
- /* BUG SOFTKEYS START 20050902 */
- /* No need to set the default handlers for Left and Right Softkeys in case of
- Idlescreen Shortcuts. So passing the value 0 for string ID and icon ID. */
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__
- /* PMT HIMANSHU FLIGHT MODE START 20050926 */
- if (mmi_bootup_get_active_flight_mode() == 1)
- {
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- }
- else
- {
- /* PMT HIMANSHU FLIGHT MODE END 2005926 */
- change_left_softkey(0, 0);
- change_right_softkey(0, 0);
- /* PMT HIMANSHU FLIGHT MODE START 20050926 */
- }
- /* PMT HIMANSHU FLIGHT MODE END 2005926 */
- #else /* __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ */
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- #endif /* __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ */
- /* BUG SOFKEYS END 20050902 */
- SetupCategoryKeyHandlers();
- #ifdef __MMI_WGUI_CSK_ENABLE__
- // set_softkey_label(L"Dial",MMI_CENTER_SOFTKEY);
- // set_softkey_icon(NULL, MMI_CENTER_SOFTKEY);
- #endif /* __MMI_WGUI_CSK_ENABLE__ */
- /* No need to register the hide functions for Left and Right Sofkeys
- when Idle Screen Shortcuts are present. */
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__
- if(mmi_bootup_get_active_flight_mode() == 1)
- #endif
- {
- #if !defined(MT6205B) && !defined(MT6208)
- {
- register_hide_left_softkey(cat33_hide_lsk);
- register_hide_right_softkey(cat33_hide_rsk);
- #ifdef __MMI_WGUI_CSK_ENABLE__
- register_hide_softkey(cat33_hide_csk, MMI_CENTER_SOFTKEY);
- #endif
- }
- #else /* !defined(MT6205B) && !defined(MT6208) */
- {
- /* Because MT6205B does not have LCD layer support, clearing
- softkey background requires redrawing wallpaper, which is
- very slow */
- set_softkey_flags_on(UI_BUTTON_NO_SHIFT_BUTTON, MMI_LEFT_SOFTKEY);
- set_softkey_flags_on(UI_BUTTON_NO_SHIFT_BUTTON, MMI_RIGHT_SOFTKEY);
- #ifdef __MMI_WGUI_CSK_ENABLE__
- set_softkey_flags_on(UI_BUTTON_NO_SHIFT_BUTTON, MMI_CENTER_SOFTKEY);
- #endif
- }
- #endif /* !defined(MT6205B) && !defined(MT6208) */
- }
- register_hide_status_icon_bar(0, UI_dummy_function);
- register_hide_status_icon_bar(1, UI_dummy_function);
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- gui_register_button_shuffle(shuffle_draw_wallpaper); /* register the background drower */
- #endif /* __MMI_UI_DALMATIAN_SOFTKEYS__ */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- set_status_icon_bar_clip(
- 0,
- 0,
- MMI_title_height + STATUS_TITLE_GAP,
- MMI_STATUS_BAR_WIDTH - 1,
- MMI_title_height + STATUS_TITLE_GAP + MMI_SINGLE_STATUS_BAR_HEIGHT - 1);
- set_status_icon_bar_clip(
- 1,
- UI_device_width - MMI_STATUS_BAR_WIDTH,
- MMI_title_height + STATUS_TITLE_GAP + MMI_status_bar_height - MMI_SINGLE_STATUS_BAR_HEIGHT,
- UI_device_width - 1,
- MMI_title_height + STATUS_TITLE_GAP + MMI_status_bar_height - 1);
- #else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- set_status_icon_bar_clip(
- 0,
- 0,
- UI_device_height - 1 - MMI_button_bar_height - MMI_status_bar_height,
- UI_device_width - 1,
- UI_device_height - 1 - MMI_button_bar_height - 1);
- #else /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- set_status_icon_bar_clip(0, 0, 0, UI_device_width - 1, MMI_status_bar_height - 1);
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051010 */
- /* 110105 status bar1 Start */
- #ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- if (PhnsetGetShowDateTimeStatus() == MMI_TRUE)
- {
- status_bar1_y1 = MMI_status_bar_height + MMI_IDLESCREEN_BAR_HEIGHT;
- }
- else
- {
- status_bar1_y1 = MMI_status_bar_height;
- }
- #else /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- status_bar1_y1 = MMI_status_bar_height;
- #endif /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__
- if (mmi_bootup_get_active_flight_mode() == 1)
- {
- status_bar1_y2 = UI_device_height - MMI_softkey_height - 2;
- }
- else
- {
- status_bar1_y2 = UI_device_height - WGUI_TOUCH_IDLESCREEN_SHORTCUTS_HEIGHT - 2;
- }
- #else /* __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ */
- status_bar1_y2 = UI_device_height - MMI_softkey_height - 2;
- #endif /* __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ */
- /* 110105 status bar1 End */
- #ifdef __MMI_UI_TECHNO_STATUS_ICON__
- set_status_icon_bar_clip(1, 0, 0, 0, 0);
- arrange_status_icons();
- #else /* __MMI_UI_TECHNO_STATUS_ICON__ */
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- set_status_icon_bar_clip(
- 1,
- UI_device_width - 16,
- MMI_status_bar_height,
- UI_device_width - 1,
- UI_device_height - 1 - MMI_button_bar_height - MMI_status_bar_height - (STATUS_ICON_Y_GAP << 1) - 1);
- arrange_status_icons();
- #else /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- #ifdef __MMI_KLG__
- set_status_icon_bar_clip(1, UI_device_width - 16, status_bar1_y1, UI_device_width - 1, UI_device_height >> 1); /* 110105 status bar1 Calvin modified */
- #else
- set_status_icon_bar_clip(1, UI_device_width - 16, status_bar1_y1, UI_device_width - 1, status_bar1_y2); /* 110105 status bar1 Calvin modified */
- #endif
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051010 */
- #endif /* __MMI_UI_TECHNO_STATUS_ICON__ */
- /* PMT VIKAS END 20050707 */
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- show_status_icon_bar(0);
- show_status_icon_bar(1);
- switch (idle_screen_type)
- {
- case NORMAL_IDLE_SCREEN:
- /* PMT HIMANSHU START 20050625 */
- #ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- set_main_LCD_dt_date_hide_function(cat33_hide_date_display);
- analog_clock_initialize();
- set_main_LCD_dt_time_hide_function(dummy_dt_hide_function);
- /* PMT HIMANSHU START 20050721 */
- set_main_LCD_day_hide_function(cat33_hide_day_string_display);
- /* PMT HIMANSHU END 20050721 */
- #else /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- set_main_LCD_dt_date_hide_function(dummy_dt_hide_function);
- set_main_LCD_dt_time_hide_function(cat33_hide_time_display);
- #endif /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- //PMT HIMANSHU END
- //PMT VIKAS START 20051010
- #if defined(__MMI_KLG__) || defined(__MMI_UI_STATUS_BAR_AT_BOTTOM__)
- /* PMT VIKAS END 20051010 */
- set_dt_display(DT_IDLE_SCREEN_2);
- #else /* defined(__MMI_KLG__) || defined(__MMI_UI_STATUS_BAR_AT_BOTTOM__) */
- set_dt_display(DT_IDLE_SCREEN);
- #endif /* defined(__MMI_KLG__) || defined(__MMI_UI_STATUS_BAR_AT_BOTTOM__) */
- break;
- #ifdef __MMI_ANALOG_CLOCK__
- case ANALOG_IDLE_SCREEN:
- analog_clock_initialize();
- set_main_LCD_dt_date_hide_function(dummy_dt_hide_function);
- set_main_LCD_dt_time_hide_function(cat33_analog_clock_hide_dt_display);
- set_dt_display(DT_ANALOG_CLOCK_SC);
- break;
- #endif /* __MMI_ANALOG_CLOCK__ */
- #ifdef __MMI_DIGITAL_CLOCK__
- case DIGITAL_IDLE_SCREEN:
- set_main_LCD_dt_date_hide_function(dummy_dt_hide_function);
- set_main_LCD_dt_time_hide_function(cat33_digital_clock_hide_dt_display);
- set_dt_display(DT_DIGITAL_CLOCK_SC1);
- break;
- #endif /* __MMI_DIGITAL_CLOCK__ */
- }
- gui_unlock_double_buffer();
- /* [~PMT MANISH 20050624 */
- #if ( defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__) ) //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2007-3-7
- /* PMT HIMANSHU FLIGHT MODE START 20051021 */
- /* clear the memory of touch_idle_shortcuts when the Flight Mode is ON. */
- if (mmi_bootup_get_active_flight_mode() == 0)
- {
- setup_touch_idle_screen_shortcuts();
- }
- else
- /* PMT HIMANSHU FLIGHT MODE END 20051021 */
- {
- memset(touch_idle_shortcuts, 0, sizeof(idle_touch_screen_shortcut) * MAX_IDLE_SCREEN_SHORTCUTS);
- }
- #endif /*(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || (__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__)*/ //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2007-3-7
- /* ~] */
- #if (defined __MMI_TOUCH_SCREEN__)
- wgui_register_category_screen_control_area_pen_handlers(category33_pen_down_handler, MMI_PEN_EVENT_DOWN);
- wgui_register_category_screen_control_area_pen_handlers(category33_pen_repeat_handler, MMI_PEN_EVENT_REPEAT);
- /* [~PMT MANISH 20050623 In case of touch idle screen unlock creates problem TEMP ONLY, FIX LATER AFTER DISCUSSION WITH LEO */
- #ifndef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__
- wgui_register_category_screen_control_area_pen_handlers(category33_pen_long_tap_handler, MMI_PEN_EVENT_LONG_TAP);
- #endif //KP Jerry add on 2007-3-7
- #if ( defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__) ) //KP Jerry add on 2007-3-7
- /* PMT HIMANSHU FLIGHT MODE START 20051021 */
- /* remove the pen handler registration for UP and MOVE event, when the Flight
- Mode is ON. */
- if (mmi_bootup_get_active_flight_mode() == 0)
- {
- wgui_register_category_screen_control_area_pen_handlers(category33_pen_up_handler, MMI_PEN_EVENT_UP);
- wgui_register_category_screen_control_area_pen_handlers(category33_pen_move_handler, MMI_PEN_EVENT_MOVE);
- }
- /* PMT HIMANSHU FLIGHT MODE END 20051021 */
- #endif /* __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ */
- /* ~] */
- #endif /* (defined __MMI_TOUCH_SCREEN__) */
- gdi_layer_push_and_set_active(GDI_LAYER_MAIN_BASE_LAYER_HANDLE);
- gdi_layer_set_source_key(TRUE, GDI_COLOR_TRANSPARENT);
- gdi_layer_clear(GDI_COLOR_TRANSPARENT);
- gdi_layer_pop_and_restore_active();
- GDI_UNLOCK;
- }
- void ShowCategory33Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- U8 i,h_flag=0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 110105 status bar1 Calvin End */
- ShowCategory33Screen_ext(
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- history_buffer);
- create_fixed_icontext_menuitems();
- associate_fixed_icontext_matrix();
- for(i=0;i<6;i++)
- add_fixed_icontext_item((unsigned short*)GetString(STR_GLOBAL_OK),(unsigned char*)GetImage(gIndexIconsImageList[i]));
- MMI_current_menu_type = MATRIX_MENU;
- configure_fixed_matrix(34,34,6,1);
- resize_fixed_matrix(240,36);
- move_fixed_matrix(0,76);
- register_fixed_matrix_highlight_handler(standard_matrix_highlight_handler);
- gui_set_fixed_matrix_menu_theme(&MMI_fixed_matrix_menu, current_UI_theme->fixed_matrix_menu_theme);
- gui_set_fixed_icontext_menuitem_theme(&MMI_fixed_icontext_menuitem,current_UI_theme->fixed_icontext_menuitem_theme);
- MMI_fixed_matrix_menu.flags |= UI_MATRIX_MENU_DISABLE_PEN | UI_MATRIX_MENU_DISABLE_SCROLLBAR | UI_MATRIX_MENU_DISABLE_BACKGROUND|UI_MATRIX_MENU_LOOP;
- gui_set_fixed_matrix_menu_theme(&MMI_fixed_matrix_menu, current_UI_theme->fixed_matrix_menu_theme);
- gui_set_fixed_icontext_menuitem_theme(&MMI_fixed_icontext_menuitem, current_UI_theme->fixed_icontext_menuitem_theme);
- MMI_fixed_icontext_menuitem.flags |= UI_MENUITEM_DISABLE_TEXT_DISPLAY | UI_MENUITEM_CENTER_ICON_X | UI_MENUITEM_CENTER_ICON_Y;
- SetKeyHandler(fixed_matrix_goto_next_item, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(fixed_matrix_goto_previous_item, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- h_flag = set_matrix_menu_category_history(MMI_CATEGORY33_ID, history_buffer);
- if (h_flag)
- {
- gui_fixed_matrix_menu_goto_item(&MMI_fixed_matrix_menu,MMI_fixed_matrix_menu.highlighted_item);
- }
- else
- {
- gui_fixed_matrix_menu_goto_item(&MMI_fixed_matrix_menu, highlighted_item);
- }
- gui_create_fixed_icontext_menuitem(&idle_list_menu_common_item, 108,30);
- for( i=0; i<6; i++)
- idle_list_menu_item_pointers[i]=(void*)&idle_list_menu_item_list[i];
- for(i=0;i<6;i++)
- idle_list_menu_item_list[i].item_text=get_string(STR_GLOBAL_OK);;
- for(i=0;i<6;i++)
- idle_list_menu_item_list[i].item_icon = (unsigned char*)GetImage(gIndexIconsImageList[i]);
- /* Association with a fixed list menu */
- gui_create_fixed_list_menu(&idle_list_menu,0,112,240,320);
- idle_list_menu.n_items=6;
- idle_list_menu.items=idle_list_menu_item_pointers;
- idle_list_menu.common_item_data=&idle_list_menu_common_item;
- idle_list_menu.flags |= UI_LIST_MENU_DISABLE_BACKGROUND | UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER | UI_LIST_MENU_DISABLE_SCROLLBAR;
- idle_list_menu_common_item.text_x = 36;
- gui_set_fixed_list_menu_item_functions(
- &idle_list_menu,
- gui_show_fixed_icontext_menuitem, // Display function
- gui_measure_fixed_icontext_menuitem, // Measure function
- gui_highlight_fixed_icontext_menuitem, // Highlight function
- gui_remove_highlight_fixed_icontext_menuitem, // Remove highlight function
- UI_fixed_menuitem_dummy_hide_function,
- resize_fixed_icontext_list_menuitems);
- GDI_LOCK;
- ExitCategoryFunction = ExitCategory33Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = IDLE_SCREEN_ID;
- dm_data.s32CatId = MMI_CATEGORY33_ID;
- dm_data.s32flags = 0;
- #ifdef __MMI_TOUCH_IDLESCREEN_SHORTCUTS__
- if (mmi_bootup_get_active_flight_mode() == 0)
- {
- dm_data.s32flags |= DM_NO_SOFTKEY;
- }
- #endif /* __MMI_TOUCH_IDLESCREEN_SHORTCUTS__ */
- dm_setup_data(&dm_data);
- dm_register_category_controlled_callback(dm_category_33_controlled_area);
- dm_redraw_category_screen();
- GDI_UNLOCK;
- }
- extern void leave_idle_screen(void);
- /*****************************************************************************
- * FUNCTION
- * ExitCategory33Screen
- * DESCRIPTION
- * Exits the Idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory33Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- leave_idle_screen();
- /* START VIJAY PMT 20060105 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- reset_status_bar_at_bottom();
- #endif
- //END VIJAY PMT 20060105
- //PMT VIKAS START 20050707
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- /* PMT VIKAS START 20050817 */
- MMI_title_y = MMI_TITLE_Y;
- /* PMT VIKAS END 20050817 */
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- gui_register_button_shuffle(shuffle_draw_white); /* register the background drower */
- #endif
- /* PMT VIKAS END 20050707 */
- #ifdef __MMI_IDLE_FULL_SCREEN__
- on_idle_screen = 0;
- #endif
- //MTK Leo end
- //PMT VIKAS START 20051202
- set_on_idlescreen(0);
- /* PMT VIKAS END 20051202 */
- if (extra_scrolling_text)
- {
- gui_scrolling_text_stop(extra_scrolling_text);
- extra_scrolling_text = NULL;
- }
- /* 110206 digital clock Start */
- extra_text_x1 = -1;
- extra_text_y1 = -1;
- extra_text_x2 = -1;
- extra_text_y2 = -1;
- /* 110206 digital clock End */
- gui_cancel_timer(cat33_animation_processor);
- #if defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__)
- if (animation_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(animation_handle);
- animation_handle = GDI_ERROR_HANDLE;
- }
- #endif /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- close_status_icons();
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- close_shuffle(); /* to close the continous shuffling */
- #endif
- /* PMT VIKAS END 20050707 */
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- register_hide_status_icon_bar(0, MMI_dummy_function);
- #endif
- /* PMT VIKAS END 20050707 */
- register_hide_status_icon_bar(1, MMI_dummy_function);
- close_main_LCD_dt_display();
- reset_softkeys();
- enable_softkey_background();
- /* PMT HIMANSHU START 20050625 */
- #ifdef __MMI_UI_TECHNO_STATUS_ICON__
- arrange_status_icons();
- #endif
- //PMT HIMANSHU END
- //PMT VIKAS START 20051010
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- set_status_icon_bar_clip(0, 0, 0, UI_device_width - 1, MMI_status_bar_height - 1);
- #if defined(__MMI_KLG__)
- set_status_icon_bar_clip(
- 1,
- UI_device_width - 16,
- MMI_status_bar_height,
- UI_device_width - 1,
- UI_device_height >> 1);
- #else /* defined(__MMI_KLG__) */
- set_status_icon_bar_clip(
- 1,
- UI_device_width - 16,
- MMI_status_bar_height,
- UI_device_width - 1,
- UI_device_height - MMI_softkey_height - 2);
- #endif /* defined(__MMI_KLG__) */
- arrange_status_icons();
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051010 */
- MMI_fixed_matrix_menu.flags &= ~UI_MATRIX_MENU_DISABLE_PEN;
- reset_fixed_matrix();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- /*****************************************************************************
- * FUNCTION
- * shuffle_draw_wallpaper
- * DESCRIPTION
- * Function for draw wallpaper background in shuffle at idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void shuffle_draw_wallpaper(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- draw_wallpaper();
- #if defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__)
- {
- U16 keyCode, keyType;
- GetkeyInfo(&keyCode, &keyType);
- if (keyType == KEY_EVENT_DOWN)
- {
- if (animation_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(animation_handle);
- animation_handle = GDI_ERROR_HANDLE;
- }
- }
- }
- #endif /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- }
- #endif /* __MMI_UI_DALMATIAN_SOFTKEYS__ */
- #if defined(__MMI_UI_DALMATIAN_STATUSBAR__) || defined(__MMI_UI_DALMATIAN_SOFTKEYS__)
- /*****************************************************************************
- * FUNCTION
- * start_shuffle
- * DESCRIPTION
- * Function for start the shuffle of status & button bar at idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void start_shuffle(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- shuffle_status_bars();
- #endif
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- gui_register_button_shuffle(shuffle_draw_wallpaper);
- gui_call_shuffle();
- if (is_button_bar_shuffled == 1)
- {
- is_button_bar_shuffled = 0;
- }
- else
- {
- is_button_bar_shuffled = 1;
- }
- #endif /* __MMI_UI_DALMATIAN_SOFTKEYS__ */
- gui_start_timer(BAR_SHUFFLE_TIMER, start_shuffle);
- }
- /*****************************************************************************
- * FUNCTION
- * close_shuffle
- * DESCRIPTION
- * Function for close down the shuffle of status & button bar at idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void close_shuffle(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_cancel_timer(start_shuffle);
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- is_status_bar_shuffled = 0; /* To reset the shuffle indicator for status bar */
- #endif
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- is_button_bar_shuffled = 0; /* for button bar */
- #endif
- }
- #endif /* defined(__MMI_UI_DALMATIAN_STATUSBAR__) || defined(__MMI_UI_DALMATIAN_SOFTKEYS__) */
- /* PMT VIKAS END 20050707 */
- #ifdef __MMI_ANALOG_CLOCK__
- gdi_handle cat86_anim_handle; /* 072605 Calvin added */
- /*****************************************************************************
- * FUNCTION
- * cat86_hide_analog_clock_display
- * DESCRIPTION
- * hide function of analog clock of categor 86
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- void cat86_hide_analog_clock_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- x1 = 0;
- y1 = (MMI_title_y + MMI_title_height);
- x2 = UI_device_width - 1;
- y2 = UI_device_height - MMI_button_bar_height;
- gui_set_clip(x1, y1, x2, y2);
- /* 072605 Calvin modified */
- #ifdef __GDI_MEMORY_PROFILE_2__
- gdi_draw_solid_rect(x1, y1, x2, y2, GDI_COLOR_TRANSPARENT);
- #else
- gui_show_image(cat86_image_x, cat86_image_y, cat86_image);
- #endif
- /* 072605 Calvin end */
- redraw_status_icon_bar(1);
- if (display_network_name)
- {
- idle_screen_show_network_name();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * DrawCate86CategoryControlArea
- * DESCRIPTION
- * Draws the category86 category control area
- * PARAMETERS
- * coordinate [?]
- * RETURNS
- * void
- *****************************************************************************/
- void DrawCate86CategoryControlArea(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- RedrawCategory86Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory86Screen
- * DESCRIPTION
- * Redraws the category86 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory86Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- // __CUSTPACK_MULTIBIN Calvin BEGIN
- //cat86_image=(PU8)GetImage(ANALOG_CLOCK); //051305 Calvin removed to showcategory86screen
- // __CUSTPACK_MULTIBIN Calvin END
- /* 072605 Calvin Start */
- /* 072605 Calvin End */
- /*
- * if(status_icon == 1) show_status_icons();
- * else if(status_icon==2)
- * {
- * draw_title();
- * show_title_status_icon();
- * }
- */
- show_main_LCD_dt_display();
- if (display_network_name)
- {
- idle_screen_show_network_name();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory86Screen
- * DESCRIPTION
- * Displays the Idle screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * img_id [IN]
- * network_string [IN] Service provider name
- * history_buffer [IN] History buffer
- * show_network_name [IN] If network name display on the screen
- * RETURNS
- * void
- *****************************************************************************/
- /* __CUSTPACK_MULTIBIN Calvin BEGIN */
- void ShowCategory86Screen(U16 title, U16 title_icon, U16 left_softkey, U16 left_softkey_icon, U16 right_softkey, U16 right_softkey_icon, U16 img_id, U8 *network_string, U8 *history_buffer, U8 show_network_name) /* 051305 Calvin modified */
- /* __CUSTPACK_MULTIBIN Calvin END */
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- U16 btn_prev_item_id = 0, btn_next_item_id = 0; /* 010206 Calvin */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- UI_UNUSED_PARAMETER(network_string);
- gui_lock_double_buffer();
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- ShowStatusIconsTitle();
- #endif
- /* PMT VIKAS END 20050707 */
- /*
- * if((title==0) && (title_icon==0))
- * { status_icon=1;
- * register_hide_status_icon_bar(0,idle_screen_hide_status_icons_bar0);
- * register_hide_status_icon_bar(1,idle_screen_hide_status_icons_bar1);
- * set_status_icon_bar_clip(0,0,0,UI_device_width-1,MMI_status_bar_height-1);
- * // 070905 Calvin Start
- * #ifdef __MMI_KLG__
- * set_status_icon_bar_clip(1,UI_device_width-16,MMI_status_bar_height,UI_device_width-1,UI_device_height>>1);
- * #else
- * set_status_icon_bar_clip(1,UI_device_width-16,MMI_status_bar_height,UI_device_width-1,UI_device_height-MMI_softkey_height-2);
- * #endif
- * // 070905 Calvin End
- * show_status_icon_bar(0);
- * show_status_icon_bar(1);
- * }
- * else if(!((title==0xffff) && (title_icon==0xffff)))
- * {
- * status_icon=2;
- * MMI_title_string=(UI_string_type)get_string(title);
- * MMI_title_icon=(PU8)get_image(title_icon);
- * }
- */
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- display_network_name = show_network_name;
- /* 080405 Calvin Start */
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- dm_get_scr_bg_image(&idle_scr_bg_ID, &idle_scr_bg_filename, &idle_scr_bg_x, &idle_scr_bg_y, &idle_scr_bg_opacity);
- dm_set_scr_bg_image(img_id, NULL, -1, -1, (U8)current_MMI_theme->bg_opacity_full);//120406 warning remove
- #else /* __MMI_WALLPAPER_ON_BOTTOM__ */
- dm_add_image(get_image(img_id), NULL, NULL);
- wgui_set_wallpaper_on_bottom(MMI_TRUE);
- #ifndef __GDI_MEMORY_PROFILE_2__//062106 cat128
- cat86_image_x = cat86_image_y = 0;
- cat86_image = get_image(img_id);
- #endif
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- /* 080405 Calvin End */
- //PMT HIMANSHU START 20050815
- //check if the title bar buttons are enabled for the particular screen.
- if (wgui_is_touch_title_bar_buttons())
- {
- btn_prev_item_id = dm_add_button(
- NULL,
- get_image(LEFT_RED_ARROW),
- get_image(LEFT_RED_ARROW),
- cat129_clear_icon_bg);
- btn_next_item_id = dm_add_button(
- NULL,
- get_image(RIGHT_RED_ARROW),
- get_image(RIGHT_RED_ARROW),
- cat129_clear_icon_bg);
- title_bg_id = IMAGE_VIEW_TITLEBAR_BG;
- }
- /* PMT HIMANSHU END 20050815 */
- analog_clock_initialize();
- set_main_LCD_dt_date_hide_function(dummy_dt_hide_function);
- set_main_LCD_dt_time_hide_function(cat86_hide_analog_clock_display);
- set_dt_display(DT_ANALOG_CLOCK_SC);
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategory86Screen;
- /* PMT HIMANSHU START 20050809 */
- #if defined(__MMI_TOUCH_SCREEN__)
- if (wgui_is_touch_title_bar_buttons())
- {
- //BUG IMAGE VIEW START 20050917
- // register the handler for pen event down istead of pen event up.
- dm_register_button_functions(btn_prev_item_id, KEY_EVENT_UP, gMMI_touch_title_button1_down_handler);
- dm_register_button_functions(btn_next_item_id, KEY_EVENT_UP, gMMI_touch_title_button2_down_handler);
- /* BUG IMAGE VIEW END 20050917 */
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- /* PMT HIMANSHU END 20050809 */
- dm_setup_category_functions(dm_redraw_category_screen, dummy_get_history, dummy_get_history_size);
- dm_register_category_controlled_callback(DrawCate86CategoryControlArea);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY86_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory86Screen
- * DESCRIPTION
- * Exits the Idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory86Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- register_hide_status_icon_bar(1, MMI_dummy_function);
- close_status_icons();
- close_main_LCD_dt_display();
- reset_softkeys();
- /* PMT HIMANSHU START 20050815 */
- title_bg_id = 0;
- wgui_reset_touch_title_bar_buttons();
- /* PMT HIMANSHU END 20050815 */
- /* 071205 Calvin Start */
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- /* 011206 wallpaper Calvin */
- if (wgui_is_wallpaper_change())
- {
- U8 dummy_opacity;
- dm_get_scr_bg_image(&idle_scr_bg_ID, &idle_scr_bg_filename, &idle_scr_bg_x, &idle_scr_bg_y, &dummy_opacity);
- dm_set_scr_bg_image(idle_scr_bg_ID, idle_scr_bg_filename, idle_scr_bg_x, idle_scr_bg_y, idle_scr_bg_opacity);
- wgui_reset_wallpaper_change();
- }
- else
- {
- dm_set_scr_bg_image_no_draw(
- idle_scr_bg_ID,
- idle_scr_bg_filename,
- idle_scr_bg_x,
- idle_scr_bg_y,
- idle_scr_bg_opacity);
- }
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- /* 071205 Calvin End */
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- #endif /* __MMI_ANALOG_CLOCK__ */
- extern gdi_handle animation_handle;
- /*----------------------------------------------------------------------------/
- Function: RedrawCategory106Screen
- Description: redarw category 106
- Input Parameters: noen
- Output Parameters: none
- Returns: none
- -----------------------------------------------------------------------------*/
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory106Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory106Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 SScallbackID;
- PU8 image;
- color c = gui_color(0, 0, 0);
- gdi_handle h;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- c.alpha = 100;
- gui_lock_double_buffer();
- gui_reset_clip();
- clear_screen();
- gui_fill_rectangle(0, 0, UI_device_width - 1, UI_device_height - 1, c);
- if (ScreenSaverName == NULL)
- {
- wgui_show_animation();
- }
- else
- {
- S32 n_frames = 0;
- S32 width, height;
- GDI_RESULT ret;
- gdi_image_gif_get_frame_count_file((S8*) ScreenSaverName, &n_frames);
- gdi_image_get_dimension_file((S8*) ScreenSaverName, &width, &height);
- if (n_frames > 1)
- {
- ret = gdi_image_draw_animation_file(
- (UI_device_width - width) >> 1,
- (UI_device_height - height) >> 1,
- (S8*) ScreenSaverName,
- &h);
- }
- else
- {
- /* The orignal implementation seems just to fill whole screen */
- S32 disp_width = UI_device_width /* x2-x1 */ ;
- S32 disp_height = UI_device_height /* y2-y1 */ ;
- S32 offset_x = 0, offset_y = 0;
- S32 img_width = 0, img_heigth = 0;
- gdi_image_get_dimension_file((S8*) ScreenSaverName, &img_width, &img_heigth);
- if ((disp_width >= img_width) && (disp_height >= img_heigth))
- {
- /* align preview window at the center of screen */
- offset_x = (disp_width - img_width) >> 1;
- offset_y = (disp_height - img_heigth) >> 1;
- /* set clip region as content region */
- /* gdi_layer_set_clip(0, (MMI_title_y+MMI_title_height), UI_device_width-1, (MMI_title_y+MMI_title_height)+MMI_content_height-1); */
- ret = gdi_image_draw_file(offset_x, offset_y, (PS8) ScreenSaverName);
- }
- else
- {
- S32 resized_offset_x;
- S32 resized_offset_y;
- S32 resized_width;
- S32 resized_height;
- U16 img_type;
- gdi_image_util_fit_bbox(
- disp_width,
- disp_height,
- img_width,
- img_heigth,
- &resized_offset_x,
- &resized_offset_y,
- &resized_width,
- &resized_height);
- img_type = gdi_image_get_type_from_file((PS8) ScreenSaverName);
- if (img_type == GDI_IMAGE_TYPE_JPG_FILE)
- {
- ret = gdi_image_draw_resized_file(
- resized_offset_x,
- resized_offset_y,
- resized_width,
- resized_height,
- (PS8) ScreenSaverName);
- }
- else
- {
- ret = gdi_image_draw_file(offset_x, offset_y, (PS8) ScreenSaverName);
- }
- }
- }
- if (ret < 0 && ret != GDI_GIF_ERR_OUT_OF_CLIP_REGION && ret != GDI_BMP_ERR_OUT_OF_CLIP_REGION)
- {
- PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "RedrawCategory106Screen():[$$$]ret:%d [$$$]n", ret));
- SScallbackID = PhnsetScreenSaverBadFileCallBack();
- image = get_image((MMI_ID_TYPE) SScallbackID);
- gui_measure_image(image, &width, &height);
- gdi_image_draw_animation(
- (UI_device_width - width) >> 1,
- (UI_device_height - height) >> 1,
- image,
- &animation_handle);
- /* gui_show_animated_image((UI_device_width-width)>>1,(UI_device_height-height)>>1,image); */
- }
- /*
- * gdi_image_get_dimension_file((S8*)ScreenSaverName,&width,&height);
- * if ( gdi_image_draw_animation_file ((UI_device_width-width)>>1,(UI_device_height-height)>>1,(S8*)ScreenSaverName,&h) <0 )
- * {
- * SScallbackID = PhnsetScreenSaverBadFileCallBack();
- * image = get_image((MMI_ID_TYPE)SScallbackID);
- * gui_measure_image(image,&width,&height);
- * gui_show_animated_image((UI_device_width-width)>>1,(UI_device_height-height)>>1,image);
- * }
- */
- }
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory106Screen
- * DESCRIPTION
- * Shows an animated icon
- * PARAMETERS
- * icon_screensaver [IN]
- * filename [?]
- * history_buffer [IN] History buffer
- * MMI_ID_TYPE(?) [IN] Animated/Non Animated Icon
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory106Screen(U16 icon_screensaver, U8 *filename, U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 screensaver_icon;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- entry_full_screen();
- gui_lock_double_buffer();
- clear_category_screen_key_handlers();
- screen_saver_type = NORMAL_SCREEN_SAVER;
- if (icon_screensaver != 0)
- {
- screensaver_icon = (PU8) get_image(icon_screensaver);
- wgui_set_animation((UI_device_width >> 1), (UI_device_height >> 1), icon_screensaver);
- ScreenSaverName = NULL;
- }
- else
- {
- ScreenSaverName = filename;
- }
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategory106Screen;
- RedrawCategoryFunction = RedrawCategory106Screen;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- RedrawCategory106Screen();
- }
- /* MTK Leo end */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory106Screen
- * DESCRIPTION
- * Exits the category106 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory106Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (animation_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(animation_handle);
- }
- /* gui_hide_animations(); */
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- gdi_handle cat128_anim_handle; /* 072605 Calvin added */
- /*****************************************************************************
- * FUNCTION
- * category128_hide_dt_display
- * DESCRIPTION
- * hide date function of category128
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- void category128_hide_dt_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- x1 = 0;
- x2 = UI_device_width - 1;
- #if defined(__MMI_MAINLCD_176X220__) || defined (__MMI_MAINLCD_240X320__) /* 041205 Calvin modieid */
- y1 = MMI_title_y + MMI_title_height;
- #else
- y1 = MMI_status_bar_height;
- #endif
- y2 = UI_device_height - MMI_button_bar_height;
- gui_set_clip(x1, y1, x2, y2);
- /* 072605 Calvin modified */
- #ifdef __GDI_MEMORY_PROFILE_2__
- gdi_draw_solid_rect(x1, y1, x2, y2, GDI_COLOR_TRANSPARENT);
- #else
- gui_show_image(cat128_image_x, cat128_image_y, cat128_image);
- #endif
- /* 072605 Calvin end */
- if (status_icon)
- {
- redraw_status_icon_bar(1);
- }
- gui_reset_clip();
- if (display_network_name && (disp_network_screeen_saver == 1))
- {
- idle_screen_show_network_name();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * DrawCate128CategoryControlArea
- * DESCRIPTION
- * Draws the category128 category control area
- * PARAMETERS
- * coordinate [IN/OUT] Coordinates of category controlled area.
- * RETURNS
- * void
- *****************************************************************************/
- void DrawCate128CategoryControlArea(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- RedrawCategory128Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory128Screen
- * DESCRIPTION
- * Redraws the category128 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory128Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* gui_lock_double_buffer();//071205 Calvin removed */
- gui_set_clip(0, (MMI_title_y + MMI_title_height), UI_device_width - 1, UI_device_height - MMI_button_bar_height);
- if (display_network_name && (disp_network_screeen_saver == 1))
- {
- idle_screen_show_network_name();
- }
- show_main_LCD_dt_display();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory128Screen
- * DESCRIPTION
- * Exits the category128 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory128Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- reset_softkeys();
- register_hide_status_icon_bar(1, MMI_dummy_function);
- close_status_icons();
- close_main_LCD_dt_display();
- reset_multiline_inputbox();
- /* PMT HIMANSHU START 20050815 */
- title_bg_id = 0;
- wgui_reset_touch_title_bar_buttons();
- /* PMT HIMANSHU END 20050815 */
- /* 071205 Calvin Start */
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- /* 011206 wallpaper Calvin */
- if (wgui_is_wallpaper_change())
- {
- U8 dummy_opacity;
- dm_get_scr_bg_image(&idle_scr_bg_ID, &idle_scr_bg_filename, &idle_scr_bg_x, &idle_scr_bg_y, &dummy_opacity);
- dm_set_scr_bg_image(idle_scr_bg_ID, idle_scr_bg_filename, idle_scr_bg_x, idle_scr_bg_y, idle_scr_bg_opacity);
- wgui_reset_wallpaper_change();
- }
- else
- {
- dm_set_scr_bg_image_no_draw(
- idle_scr_bg_ID,
- idle_scr_bg_filename,
- idle_scr_bg_x,
- idle_scr_bg_y,
- idle_scr_bg_opacity);
- }
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- /* 071205 Calvin End */
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory128Screen
- * DESCRIPTION
- * Displays the Category128 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * screen_img [IN] Image id
- * date_flag [IN]
- * time_flag [IN]
- * service_provider [IN] Service provider name id
- * history_buffer [IN] History buffer
- * show_network_name [IN] If network name display on the screen
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory128Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 screen_img,
- U8 date_flag,
- U8 time_flag,
- U8 service_provider,
- U8 *history_buffer,
- U8 show_network_name)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- /* PMT HIMANSHU START 20050815 */
- U16 btn_prev_item_id = 0, btn_next_item_id = 0; /* 010206 Calvin */
- /* PMT HIMANSHU END 20050815 */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- gui_lock_double_buffer();
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- display_network_name = show_network_name;
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- ShowStatusIconsTitle();
- #endif
- /* PMT VIKAS END 20050707 */
- /*
- * if((title==0) && (title_icon==0))
- * { status_icon=1;
- * register_hide_status_icon_bar(0,idle_screen_hide_status_icons_bar0);
- * register_hide_status_icon_bar(1,idle_screen_hide_status_icons_bar1);
- * set_status_icon_bar_clip(0,0,0,UI_device_width-1,MMI_status_bar_height-1);
- * // 070905 Calvin Start
- * #ifdef __MMI_KLG__
- * set_status_icon_bar_clip(1,UI_device_width-16,MMI_status_bar_height,UI_device_width-1,UI_device_height>>1);
- * #else
- * set_status_icon_bar_clip(1,UI_device_width-16,MMI_status_bar_height,UI_device_width-1,UI_device_height-MMI_softkey_height-2);
- * #endif
- * // 070905 Calvin End
- * show_status_icon_bar(0);
- * show_status_icon_bar(1);
- * }
- * else if(!((title==0xffff) && (title_icon==0xffff)))
- * {
- * status_icon=2;
- * MMI_title_string=(UI_string_type)get_string(title);
- * MMI_title_icon=(PU8)get_image(title_icon);
- * }
- */
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- /* 080405 Calvin Start */
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- dm_get_scr_bg_image(&idle_scr_bg_ID, &idle_scr_bg_filename, &idle_scr_bg_x, &idle_scr_bg_y, &idle_scr_bg_opacity);
- dm_set_scr_bg_image(screen_img, NULL, -1, -1, (U8)current_MMI_theme->bg_opacity_full);//120406 warning remove
- #else /* __MMI_WALLPAPER_ON_BOTTOM__ */
- dm_add_image(get_image(screen_img), NULL, NULL);
- wgui_set_wallpaper_on_bottom(MMI_TRUE);
- #ifndef __GDI_MEMORY_PROFILE_2__//062106 cat128
- cat128_image_x = cat128_image_y = 0;
- cat128_image = get_image(screen_img);
- #endif
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- /* 080405 Calvin End */
- //PMT HIMANSHU START 20050815
- //check if the title bar buttons are enabled for the particular screen.
- if (wgui_is_touch_title_bar_buttons())
- {
- btn_prev_item_id = dm_add_button(
- NULL,
- get_image(LEFT_RED_ARROW),
- get_image(LEFT_RED_ARROW),
- cat129_clear_icon_bg);
- btn_next_item_id = dm_add_button(
- NULL,
- get_image(RIGHT_RED_ARROW),
- get_image(RIGHT_RED_ARROW),
- cat129_clear_icon_bg);
- title_bg_id = IMAGE_VIEW_TITLEBAR_BG;
- }
- /* PMT HIMANSHU END 20050815 */
- set_main_LCD_dt_date_hide_function(dummy_dt_hide_function);
- set_main_LCD_dt_time_hide_function(category128_hide_dt_display);
- if (date_flag == 1 && time_flag == 1)
- {
- set_dt_display(DT_DIGITAL_CLOCK_SC1);
- }
- else if (date_flag == 1)
- {
- set_dt_display(DT_DIGITAL_CLOCK_SC2);
- }
- else if (time_flag == 1)
- {
- set_dt_display(DT_DIGITAL_CLOCK_SC3);
- }
- if (service_provider == 1)
- {
- disp_network_screeen_saver = 1;
- }
- else
- {
- disp_network_screeen_saver = 0;
- }
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategory128Screen;
- /* PMT HIMANSHU START 20050809 */
- #if defined(__MMI_TOUCH_SCREEN__)
- if (wgui_is_touch_title_bar_buttons())
- {
- //BUG IMAGE VIEW START 20050917
- // register the handler for pen event down istead of pen event up.
- dm_register_button_functions(btn_prev_item_id, KEY_EVENT_UP, gMMI_touch_title_button1_down_handler);
- dm_register_button_functions(btn_next_item_id, KEY_EVENT_UP, gMMI_touch_title_button2_down_handler);
- /* BUG IMAGE VIEW END 20050917 */
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- /* PMT HIMANSHU END 20050809 */
- dm_setup_category_functions(dm_redraw_category_screen, dummy_get_history, dummy_get_history_size);
- dm_register_category_controlled_callback(DrawCate128CategoryControlArea);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY128_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory131Screen
- * DESCRIPTION
- * Exits the category131 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory131Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- close_main_LCD_dt_display();
- }
- /* store the strat x postition of category131 image,strat y postition of category131 image,image width,image height */
- S32 cat131_image_x, cat131_image_y, cat131_image_width, cat131_image_height;
- /* store image id of category131 image */
- PU8 cat131_image;
- /*****************************************************************************
- * FUNCTION
- * cat131_hide_analog_clock_display
- * DESCRIPTION
- * hide function of category131 for analog clock
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- void cat131_hide_analog_clock_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- x1 = 16;
- y1 = (MMI_title_y + MMI_title_height);
- x2 = UI_device_width - 16;
- y2 = UI_device_height - MMI_button_bar_height;
- gui_set_clip(x1, y1, x2, y2);
- gdi_image_draw(cat131_image_x, cat131_image_y, (U8*) cat131_image);
- }
- /*****************************************************************************
- * FUNCTION
- * cat131_hide_digital_clock_display
- * DESCRIPTION
- * hide function of category131 for digital clock
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- void cat131_hide_digital_clock_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- x1 = 0;
- y1 = 0;
- x2 = UI_device_width - 1;
- y2 = UI_device_height - 1;
- gui_set_clip(x1, y1, x2, y2);
- gdi_image_draw(cat131_image_x, cat131_image_y, (U8*) cat131_image);
- }
- /*****************************************************************************
- * FUNCTION
- * DrawCate131CategoryControlArea
- * DESCRIPTION
- * Draws the category131 category control area
- * PARAMETERS
- * coordinate [IN/OUT] Coordinates of category controlled area.
- * RETURNS
- * void
- *****************************************************************************/
- void DrawCate131CategoryControlArea(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- RedrawCategory131Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory131Screen
- * DESCRIPTION
- * Redraws the category131 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory131Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- clear_screen_with_color(UI_COLOR_BLACK);
- #ifndef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- #ifdef __MMI_ANALOG_CLOCK__
- if (screen_saver_type == ANALOG_SCREEN_SAVER)
- {
- cat131_image = get_image(IMG_ID_DISPCHAR_ANALOG_CLK);
- }
- #endif /* __MMI_ANALOG_CLOCK__ */
- #ifdef __MMI_DIGITAL_CLOCK__
- if (screen_saver_type == DIGITAL_SCREEN_SAVER)
- {
- cat131_image = get_image(IMG_ID_DISPCHAR_DIGITAL_CLK);
- }
- #endif /* __MMI_DIGITAL_CLOCK__ */
- #endif /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- gui_measure_image(cat131_image, &cat131_image_width, &cat131_image_height);
- cat131_image_x = (UI_device_width >> 1) - (cat131_image_width >> 1);
- cat131_image_y = (UI_device_height >> 1) - (cat131_image_height >> 1);
- gdi_image_draw(cat131_image_x, cat131_image_y, (U8*) cat131_image);
- show_main_LCD_dt_display();
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory131Screen
- * DESCRIPTION
- * show analog or digital clock screen saver depends icon_screensaver value
- * PARAMETERS
- * icon_screensaver [IN] Id of the image
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory131Screen(U16 icon_screensaver, U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- entry_full_screen();
- gui_lock_double_buffer();
- clear_category_screen_key_handlers();
- if (screen_saver_type == ANALOG_SCREEN_SAVER)
- {
- #ifdef __MMI_ANALOG_CLOCK__
- analog_clock_initialize();
- set_main_LCD_dt_date_hide_function(dummy_dt_hide_function);
- set_main_LCD_dt_time_hide_function(cat131_hide_analog_clock_display);
- set_dt_display(DT_ANALOG_CLOCK_SC);
- #endif /* __MMI_ANALOG_CLOCK__ */
- }
- else if (screen_saver_type == DIGITAL_SCREEN_SAVER)
- {
- #ifdef __MMI_DIGITAL_CLOCK__
- set_main_LCD_dt_date_hide_function(dummy_dt_hide_function);
- set_main_LCD_dt_time_hide_function(cat131_hide_digital_clock_display);
- set_dt_display(DT_DIGITAL_CLOCK_SC1);
- #endif /* __MMI_DIGITAL_CLOCK__ */
- }
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategory131Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dummy_get_history, dummy_get_history_size);
- dm_register_category_controlled_callback(DrawCate131CategoryControlArea);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY131_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- #ifdef __MMI_LCD_PARTIAL_ON__
- /*****************************************************************************
- * FUNCTION
- * Category161ChangeTime
- * DESCRIPTION
- * change the time of category161
- * PARAMETERS
- * t [IN] Time
- * RETURNS
- * void
- *****************************************************************************/
- void Category161ChangeTime(UI_time *t)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- cat161_time = *t;
- }
- #if defined(__MMI_MAINLCD_176X220__) || defined (__MMI_MAINLCD_240X320__) /* 041205 Calvin modieid */
- #define CAT161_ICON_GAP (3)
- #else
- #define CAT161_ICON_GAP (2)
- #endif
- extern stFontAttribute wgui_dialer_box_f1;
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory161Screen
- * DESCRIPTION
- * Redraws the category161 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory161Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c;
- S32 twidth, theight;
- S32 y_round, partial_on_height = UI_LCD_PARTIAL_ON_HEIGHT;
- S32 x1, x2, y1, y2, y2_last = 0; /* 010206 Calvin */
- S32 text_x;
- S32 icon_width, icon_height;
- int icon_index, num_icon_displayed;
- U8 timestr[64];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- #if defined(BLACK_BACKLIGHT)
- c.r = c.g = c.b = 0;
- #elif defined(BLUE_BACKLIGHT)
- c.r = c.g = 0;
- c.b = 255;
- #elif defined(WHITE_BACKLIGHT)
- c.r = c.g = c.b = 255;
- #else
- c.r = c.g = c.b = 255;
- #endif
- c.alpha = 100;
- #ifndef WIN32
- y_round = lcd_partial_display_align_line(MAIN_LCD);
- if (y_round > 1 && (partial_on_height % y_round) != 0)
- {
- partial_on_height += (y_round - (partial_on_height % y_round));
- }
- #endif /* WIN32 */
- y_round = UI_device_height / partial_on_height;
- x1 = 0;
- y1 = (cat161_time.nMin % y_round) * partial_on_height;
- x2 = UI_device_width - 1;
- y2 = y1 + partial_on_height - 1;
- if (cat161_last_y_offset >= 0 && cat161_last_y_offset != y1)
- {
- y2_last = cat161_last_y_offset + partial_on_height - 1;
- }
- /* Dialing font has only english characters */
- time_string(&cat161_time, (UI_string_type) timestr, DT_IDLE_SCREEN_ENGLISH_ONLY);
- gui_push_clip();
- gui_push_text_clip();
- gui_set_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
- gui_set_text_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
- if (cat161_last_y_offset >= 0 && cat161_last_y_offset != y1)
- {
- gui_fill_rectangle(x1, cat161_last_y_offset, x2, y2_last, c);
- }
- gui_fill_rectangle(x1, y1, x2, y2, c);
- gui_set_font(&wgui_dialer_box_f1);
- gui_measure_string((UI_string_type) timestr, &twidth, &theight);
- text_x = (UI_device_width - twidth) >> 1;
- if (MMI_status_icons_partial_display_n_icons > 0)
- {
- gui_measure_image(MMI_status_icons[0].icon_data, &icon_width, &icon_height);
- if ((CAT161_ICON_GAP + (icon_width + CAT161_ICON_GAP) * MMI_status_icons_partial_display_n_icons)
- * 2 + twidth > UI_device_width)
- {
- /* Do not center the text */
- num_icon_displayed = (UI_device_width - twidth - (CAT161_ICON_GAP * 2)) / (icon_width + CAT161_ICON_GAP);
- if (num_icon_displayed > MMI_status_icons_partial_display_n_icons)
- {
- num_icon_displayed = MMI_status_icons_partial_display_n_icons;
- }
- text_x = CAT161_ICON_GAP + (icon_width + CAT161_ICON_GAP) * num_icon_displayed;
- }
- else
- {
- text_x = (UI_device_width - twidth) >> 1;
- num_icon_displayed = MMI_status_icons_partial_display_n_icons;
- }
- for (icon_index = 0; icon_index < num_icon_displayed; icon_index++)
- {
- if (icon_height > partial_on_height)
- {
- break; /* Abnormal case */
- }
- gui_show_transparent_image(
- CAT161_ICON_GAP + (CAT161_ICON_GAP + icon_width) * icon_index,
- y1 + ((partial_on_height - icon_height) >> 1),
- MMI_status_icons[MMI_status_icons_list_partial_display[icon_index]].icon_data,
- 0);
- }
- }
- #if defined(BLACK_BACKLIGHT)
- gui_set_text_color(gui_color(255, 255, 255));
- #else
- gui_set_text_color(gui_color(0, 0, 0));
- #endif
- if (r2lMMIFlag)
- {
- gui_move_text_cursor((text_x + twidth - 1), y1 + ((partial_on_height - theight) >> 1));
- }
- else
- {
- gui_move_text_cursor(text_x, y1 + ((partial_on_height - theight) >> 1));
- }
- gui_print_text((UI_string_type) timestr);
- gui_set_font(&MMI_medium_font);
- gui_pop_text_clip();
- gui_pop_clip();
- gui_unlock_double_buffer();
- /* Try to reduce the BLT region in order to save computation power */
- if (cat161_last_y_offset == -1) /* First time */
- {
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- else
- {
- if (cat161_last_y_offset != y1)
- {
- gui_BLT_double_buffer(x1, cat161_last_y_offset, x2, y2_last);
- }
- gui_BLT_double_buffer(x1, y1, x2, y2);
- }
- cat161_last_y_offset = y1;
- #ifndef WIN32
- lcd_partial_on(MAIN_LCD, y1, y2);
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory161Screen
- * DESCRIPTION
- * Displays the category161 screen
- * PARAMETERS
- * t [IN] Time
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory161Screen(UI_time *t)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c;
- cat161_time = *t;
- cat161_last_y_offset = -1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if defined(BLACK_BACKLIGHT)
- c.r = c.g = c.b = 0;
- #elif defined(BLUE_BACKLIGHT)
- c.r = c.g = 0;
- c.b = 255;
- #elif defined(WHITE_BACKLIGHT)
- c.r = c.g = c.b = 255;
- #else
- c.r = c.g = c.b = 255;
- #endif
- c.alpha = 100;
- entry_full_screen();
- gui_lock_double_buffer();
- gui_push_clip();
- gui_set_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
- /* Delay filling white until RedrawCategory161Screen. We do not redraw the whole screen for each update. */
- gui_fill_rectangle(0, 0, UI_device_width - 1, UI_device_height - 1, c);
- gui_pop_clip();
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategory161Screen;
- RedrawCategoryFunction = RedrawCategory161Screen;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- RedrawCategory161Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory161Screen
- * DESCRIPTION
- * Exits the category161 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory161Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifndef WIN32
- lcd_partial_off(MAIN_LCD);
- #endif
- /* Because partial display is text on white background,
- it looks weird if new popup comes and we don't clear background here. */
- #if defined(BLACK_BACKLIGHT)
- gdi_layer_clear(GDI_COLOR_BLACK);
- #elif defined(BLUE_BACKLIGHT)
- gdi_layer_clear(GDI_COLOR_BLUE);
- #elif defined(WHITE_BACKLIGHT)
- gdi_layer_clear(GDI_COLOR_WHITE);
- #else
- gdi_layer_clear(GDI_COLOR_WHITE);
- #endif
- leave_full_screen();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- #endif /* __MMI_LCD_PARTIAL_ON__ */
- /* PMT VIKAS START 20050720 */
- #ifdef __MMI_UI_ANIMATED_TITLE_EFFECT__
- /*****************************************************************************
- * FUNCTION
- * show_network_detail_on_animated_highlighter_on_idlescreen
- * DESCRIPTION
- * Handle title text on idlescreen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void show_network_detail_on_animated_highlighter_on_idlescreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (idle_screen_type == ANALOG_IDLE_SCREEN || idle_screen_type == DIGITAL_IDLE_SCREEN)
- {
- idle_screen_show_network_name();
- }
- else
- {
- idle_screen_show_network_details();
- }
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- enable_statusbar_fill_background();
- refresh_fixed_status_icon(STATUS_ICON_SIGNAL_STRENGTH, 0);
- refresh_fixed_status_icon(STATUS_ICON_BATTERY_STRENGTH, 1);
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- }
- #endif /* __MMI_UI_ANIMATED_TITLE_EFFECT__ */
- /* PMT VIKAS END 20050720 */
- void EntryPopupMatrix()
- {
- ChangeLeftSoftkey(STR_GLOBAL_YES, 0);
- ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
- EntryNewScreen(6400, NULL, NULL, NULL);
- clear_screen();
- ShowCategoryPopupMatrixScreen();
- //RedrawCategoryFunction = NULL
- }
- void ShowCategoryPopupMatrixScreen()
- {
- dm_data_struct dm_data;
- S32 i;
- gui_lock_double_buffer();
- gdi_draw_round_rect(1,1,40,156,GDI_COLOR_WHITE,GDI_COLOR_BLACK,1);
- create_fixed_icontext_menuitems();
- associate_fixed_icontext_matrix();
- for (i = 0; i < 6; i++)
- {
- add_fixed_icontext_item(get_string(IMG_GLOBAL_OK), get_image(gIndexIconsImageList[i]));
- }
- MMI_current_menu_type = MATRIX_MENU;
- register_fixed_matrix_loop_keys();
- configure_fixed_matrix(34, 34, 1, 6);
- resize_fixed_matrix(34,152);
- move_fixed_matrix(8,8);
- register_fixed_matrix_highlight_handler(standard_matrix_highlight_handler);
- gui_set_fixed_matrix_menu_theme(&MMI_fixed_matrix_menu, current_UI_theme->fixed_matrix_menu_theme);
- gui_set_fixed_icontext_menuitem_theme(&MMI_fixed_icontext_menuitem,current_UI_theme->fixed_icontext_menuitem_theme);
- MMI_fixed_matrix_menu.flags |= UI_MATRIX_MENU_DISABLE_PEN | UI_MATRIX_MENU_DISABLE_SCROLLBAR | UI_MATRIX_MENU_DISABLE_BACKGROUND|UI_MATRIX_MENU_LOOP;
- gui_set_fixed_matrix_menu_theme(&MMI_fixed_matrix_menu, current_UI_theme->fixed_matrix_menu_theme);
- gui_set_fixed_icontext_menuitem_theme(&MMI_fixed_icontext_menuitem, current_UI_theme->fixed_icontext_menuitem_theme);
- MMI_fixed_icontext_menuitem.flags |= UI_MENUITEM_DISABLE_TEXT_DISPLAY | UI_MENUITEM_CENTER_ICON_X | UI_MENUITEM_CENTER_ICON_Y;
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategoryPopupMatrixScreen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32flags = 0;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY_POPUP_MATRIX;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- void ExitCategoryPopupMatrixScreen()
- {
- MMI_fixed_matrix_menu.flags &= ~UI_MATRIX_MENU_DISABLE_PEN;
- reset_fixed_matrix();
- }
- void EntryPopupList()
- {
- ChangeLeftSoftkey(STR_GLOBAL_YES, 0);
- ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
- EntryNewScreen(6700, NULL, NULL, NULL);
- ShowCategoryPopupListScreen();
- show_fixed_list();
- }
- void ShowCategoryPopupListScreen()
- {
- dm_data_struct dm_data;
- U8 i;
- gui_lock_double_buffer();
- create_fixed_icontext_menuitems();
- resize_fixed_list(240, 150);
- associate_fixed_icontext_list();
- MMI_disable_title_shortcut_display = 1;
- for (i = 0; i < 6; i++)
- {
- add_fixed_icontext_item((unsigned short*)get_string(STR_GLOBAL_OK), (unsigned char*)get_image(gIndexIconsImageList[i]));
- }
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_LOOP | UI_LIST_MENU_DISABLE_SCROLLBAR;
- MMI_fixed_list_menu.highlighted_item = 0;
- register_fixed_list_keys();
- resize_fixed_icontext_menuitems(142, 30);
- set_fixed_icontext_positions(36, 0, 1, 0);
- resize_fixed_list(146,150);
- move_fixed_list(1,140);
- fixed_list_goto_item_no_redraw(0);
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategoryPopupListScreen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32flags = 0;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY_POPUP_LIST;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- void ExitCategoryPopupListScreen()
- {
- MMI_disable_title_shortcut_display = 0;
- disable_menu_shortcut_box_display = 0;
- reset_fixed_list();
- }