⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wgui_categories_util.c

📁 MTK6226修改平台UI的文件介绍
💻 C
📖 第 1 页 / 共 5 页
字号:
 *  void
 * RETURNS
 *  void
 * REMARKS
 *  Some functions should not be invoked after screen exit function.
 *  (e.g. BLT on layers that are already released.)
 *****************************************************************************/
void UI_common_screen_pre_exit(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#ifdef __MMI_TOUCH_SCREEN__
    mmi_pen_reset();
#endif 
    /* PMT VIKAS START 20051209 */
    gui_pre_cleanup();
    /* PMT VIKAS END 20051209 */
    if (!dm_is_activated())
    {
        dm_reset_context_ext();
    }
}


/*****************************************************************************
 * FUNCTION
 *  UI_common_screen_exit
 * DESCRIPTION
 *  Failsafe screen exit function *after* screen exit function
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void UI_common_screen_exit(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (ExitCategoryFunction != NULL)
    {
        ExitCategoryFunction();
    }
#ifdef __MMI_TOUCH_SCREEN__
    wgui_register_general_pen_handler();
    wgui_reset_list_item_selected_callback();
    wgui_reset_matrix_item_selected_callback();
#endif /* __MMI_TOUCH_SCREEN__ */ 
#ifdef __MMI_TOUCH_SCREEN__
    /* W06.04 Set gPenEditorGDIHandler to NULL when exiting screen */
    mmi_pen_editor_exit_screen();
#endif /* __MMI_TOUCH_SCREEN__ */ 

    gui_cleanup();

    /* PMT VIKAS START 20050720 */
#ifdef __MMI_UI_ANIMATED_TITLE_EFFECT__
    if (is_enable_animated_title_effect())
    {
        wgui_stop_animate_title();  /* stop move title */
    }
#endif /* __MMI_UI_ANIMATED_TITLE_EFFECT__ */ 
    /* PMT VIKAS END 20050720 */
    ClearHighlightHandler();
    gui_hide_animations();
    animation_handle = GDI_ERROR_HANDLE;
    if (MMI_title_icon_ani_handle != GDI_ERROR_HANDLE)
    {
        gdi_image_stop_animation(MMI_title_icon_ani_handle);
        MMI_title_icon_ani_handle = GDI_ERROR_HANDLE;
    }
    StopMyTimer(BLINKING_CURSOR);
#ifdef __MMI_THEMES_APPLICATION__
#ifndef __MMI_DOWNLOADABLE_THEMES_SUPPORT__
    UpdateUITheme();
#endif 
#endif /* __MMI_THEMES_APPLICATION__ */ 
    ExitCategoryFunction = MMI_dummy_function;
    RedrawCategoryFunction = MMI_dummy_function;
    GetCategoryHistory = dummy_get_history;
    GetCategoryHistorySize = dummy_get_history_size;

    /* set multilayer mask on/off */
#if defined (__GDI_MEMORY_PROFILE_2__)
    {
    #if defined(__MMI_SUBMENU_USE_MM_IMAGE__)
        gui_set_multilayer_mask(gui_get_multilayer_mask() | UI_MUL_BKG_MAINMENU | UI_MUL_BKG_SUBMENU);
        if (mmi_bootup_is_searching_or_idle_reached() == MMI_FALSE)
        {
            gui_set_multilayer_mask(gui_get_multilayer_mask() & (~UI_MUL_BKG_SUBMENU));
        }
        else
        {
            gui_set_multilayer_mask(gui_get_multilayer_mask() | UI_MUL_BKG_SUBMENU);
        }
    #elif defined(__MMI_UI_LIST_CACHE_BACKGROUND__)
        gui_set_multilayer_mask(gui_get_multilayer_mask() | UI_MUL_BKG_SUBMENU);
    #else 
        gui_set_multilayer_mask(gui_get_multilayer_mask() & (~UI_MUL_BKG_MAINMENU) & (~UI_MUL_BKG_SUBMENU));
    #endif 
    }
#endif /* defined (__GDI_MEMORY_PROFILE_2__) */ 

    /* free all layer to be base layer */
    gui_free_multilayer_screen();
    gui_set_entry_new_screen(MMI_TRUE);
    /* 092005 redraw status Calvin Start */
    if (wgui_is_wallpaper_on_bottom())
    {
        gOnFullScreen = MMI_LEAVE_BG_ON_BOTTOM_SCREEN;
        wgui_reset_wallpaper_on_bottom();   /* 041205 Calvin added to support wallpaper on bottom */
    }
    /* 092005 redraw status Calvin End */
    gdi_image_gif_reset();
    gui_reset_clip();
    gui_reset_text_clip();
    reset_softkeys();
#if defined(__MMI_MAINLCD_176X220__) || defined (__MMI_MAINLCD_240X320__)       /* 041205 Calvin modieid */
    if (gExitFullScreenCallBack != NULL)
    {
        gExitFullScreenCallBack();
        gExitFullScreenCallBack = NULL;
    }
#endif /* defined(__MMI_MAINLCD_176X220__) || defined (__MMI_MAINLCD_240X320__) */ 
    /* PMT VIKAS START 20050707 */
#ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
    is_button_bar_shuffled = 1;
    gui_set_softkey_coordinate();   /* Specially for Asyn events */
#endif /* __MMI_UI_DALMATIAN_SOFTKEYS__ */ 
    /* PMT VIKAS END 20050707 */

    /* PMT NEERAJ START 20050804 */
#ifdef __MMI_UI_TAB_PANE__
    ThemeAlarmCallBackUpdateUITheme();
#endif 
    /* PMT NEERAJ END 20050804 */

#ifdef __MMI_SCREEN_ROTATE__
    mmi_frm_reset_screen_rotation();
#endif 

    MMI_ASSERT(mmi_frm_scrmem_is_all_free());
}   /* end of UI_common_screen_exit */


/*****************************************************************************
 * FUNCTION
 *  reset_category_functions
 * DESCRIPTION
 *  Calls the reset functions of all MMI objects and category screens
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void reset_category_functions(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    reset_softkeys();
    reset_menu_shortcut_handler();
    reset_fixed_list();
    reset_fixed_matrix();
    reset_multitaps();
    reset_singleline_inputbox();
    reset_multiline_inputbox();
    ExitCategoryFunction = MMI_dummy_function;
    RedrawCategoryFunction = MMI_dummy_function;
}   /* end of reset_category_functions */

U32 category_screen_layout_flags;


/*****************************************************************************
 * FUNCTION
 *  SetCategoryScreenLayout
 * DESCRIPTION
 *  set the layout of category screen
 * PARAMETERS
 *  flags       [IN]        Vaule to set flags
 * RETURNS
 *  void
 *****************************************************************************/
void SetCategoryScreenLayout(U32 flags)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    category_screen_layout_flags = flags;
}   /* end of SetCategoryScreenLayout */

/***************************************************************************** 
* Start : Animation control
*****************************************************************************/


/*****************************************************************************
 * FUNCTION
 *  wgui_show_animation
 * DESCRIPTION
 *  Displays an animated icon that was set previously. If GIF library of
 *  pluto is enabled then it calls pluto animation function
 *  otherwise pixtel animation function
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void wgui_show_animation(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    gdi_handle lcd_h;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    gdi_lcd_get_active(&lcd_h);

    if (lcd_h == GDI_LCD_MAIN_LCD_HANDLE)
    {
        gdi_image_draw_animation(_MMI_animated_icon_x, _MMI_animated_icon_y, _MMI_animated_icon, NULL);
    }
    else if (lcd_h == GDI_LCD_SUB_LCD_HANDLE)
    {
        gdi_image_draw_animation(
            SUBLCD_MMI_animated_icon_x,
            SUBLCD_MMI_animated_icon_y,
            SUBLCD_MMI_animated_icon,
            NULL);
    }
}   /* end of wgui_show_animation */


/*****************************************************************************
 * FUNCTION
 *  wgui_show_transparent_animation
 * DESCRIPTION
 *  Displays an animated icon that was set previously, with transparency
 *  If GIF library of pluto is enabled then it calls pluto animation function
 *  otherwise pixtel animation function
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void wgui_show_transparent_animation(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    gdi_handle lcd_h;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    gdi_lcd_get_active(&lcd_h);

    if (lcd_h == GDI_LCD_MAIN_LCD_HANDLE)
    {
        gdi_image_draw_animation(_MMI_animated_icon_x, _MMI_animated_icon_y, _MMI_animated_icon, NULL);
    }
    else if (lcd_h == GDI_LCD_SUB_LCD_HANDLE)
    {
        gdi_image_draw_animation(
            SUBLCD_MMI_animated_icon_x,
            SUBLCD_MMI_animated_icon_y,
            SUBLCD_MMI_animated_icon,
            NULL);
    }
}   /* end of wgui_show_transparent_animation */


/*****************************************************************************
 * FUNCTION
 *  wgui_set_animation
 * DESCRIPTION
 *  Sets up the animated icon to be displayed in the category screens
 * PARAMETERS
 *  x           [IN]        X-coordinate of animation
 *  y           [IN]        Y-coordinate of animation
 *  img         [IN]        
 *  imag(?)     [IN]        Id of animation
 * RETURNS
 *  void
 *****************************************************************************/
void wgui_set_animation(S32 x, S32 y, MMI_ID_TYPE img)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    wgui_set_animation_image(x, y, get_image(img));
}   /* end of wgui_set_animation */


/*****************************************************************************
 * FUNCTION
 *  wgui_set_animation_y
 * DESCRIPTION
 *  Sets up the animated icon to be displayed in the category screens
 * PARAMETERS
 *  x           [IN]        Coordinates around which the icon is centered horizontally
 *  y           [IN]        Position from which the top of the icon is drawn
 *  img         [IN]        
 *  imag(?)     [IN]        Id of animation
 * RETURNS
 *  void
 *****************************************************************************/
void wgui_set_animation_y(S32 x, S32 y, MMI_ID_TYPE img)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    wgui_set_animation_image_y(x, y, get_image(img));
}   /* end of wgui_set_animation_y */


/*****************************************************************************
 * FUNCTION
 *  wgui_set_animation_image
 * DESCRIPTION
 *  Sets up the animated icon to be displayed in the category screens
 * PARAMETERS
 *  x           [IN]        Coordinates around which the icon is centered horizontally
 *  y           [IN]        Position from which of the icon is drawn centered.
 *  img         [IN]        
 *  imag(?)     [IN]        The icon to be displayed
 * RETURNS
 *  void
 *****************************************************************************/
void wgui_set_animation_image(S32 x, S32 y, PU8 img)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S32 width, height;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (UI_test_sub_LCD_graphics_context())
    {
        SUBLCD_MMI_animated_icon = img;
        if (SUBLCD_MMI_animated_icon == NULL)
        {
            return;
        }
        gui_measure_image(SUBLCD_MMI_animated_icon, &width, &height);
        SUBLCD_MMI_animated_icon_x = x - (width >> 1);
        SUBLCD_MMI_animated_icon_y = y - (height >> 1);
    }
    else
    {
        _MMI_animated_icon = img;
        if (_MMI_animated_icon == NULL)
        {
            return;
        }
        gui_measure_image(_MMI_animated_icon, &width, &height);
        _MMI_animated_icon_x = x - (width >> 1);
        _MMI_animated_icon_y = y - (height >> 1);
    }
}   /* end of wgui_set_animation_image */


/*****************************************************************************
 * FUNCTION
 *  wgui_set_animation_image_y
 * DESCRIPTION
 *  Sets up the animated icon to be displayed in the category screens
 * PARAMETERS
 *  x           [IN]        Coordinates around which the icon is centered horizontally
 *  y           [IN]        Position from which the top of the icon is drawn
 *  img         [IN]        
 *  imag(?)     [IN]        The icon to be displayed
 * RETURNS
 *  void
 *****************************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -