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

📄 wgui_status_icons.c

📁 MTK6226修改平台UI的文件介绍
💻 C
📖 第 1 页 / 共 5 页
字号:
#endif 
    /* PMT HIMANSHU END */

#if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
    cy = y2 - y1 + 1;
#else 
    cy = (y2 - y1 + 1) >> 1;
#endif 

    /* PMT HIMANSHU START 20050625 */
#if defined(__MMI_UI_TECHNO_STATUS_ICON__)

    /* PMT VIKAS START 20051202 */
    if (is_on_idlescreen() == 1)
        /* PMT VIKAS END 20051202 */
    {
        MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].x = 1;
        MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y = MMI_status_bar_height
            + MMI_IDLESCREEN_BAR_HEIGHT - 2 - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height;

        MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x = MAIN_LCD_device_width
            - 1 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width;
        MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].y = MMI_status_bar_height
            + MMI_IDLESCREEN_BAR_HEIGHT - 2 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height;
    }
    else if (GetActiveScreenId() == MAIN_MENU_SCREENID)
    {
        MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].x = 1;
        MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y = MMI_status_bar_height
            + MMI_title_height - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height - 1;
        MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x = MAIN_LCD_device_width
            - 1 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width;
        MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].y = MMI_status_bar_height
            + MMI_title_height - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height - 1;
    }
    else
    {
    #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
        MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].x = 1;
        MMI_status_icons[0].y = cy - MMI_status_icons[0].height;
        MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x = MAIN_LCD_device_width
            - 1 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width;
        MMI_status_icons[1].y = cy + 1 - MMI_status_icons[1].height;
        x2 = MMI_status_icons[MMI_status_icons_list1[1]].x - STATUS_ICON_X_GAP;
    #else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
        MMI_status_icons[0].y = cy - (MMI_status_icons[0].height >> 1);
        MMI_status_icons[1].y = cy - (MMI_status_icons[1].height >> 1);
    #endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
    }
    /* PMT VIKAS START 20050707 */
#elif defined(__MMI_UI_DALMATIAN_STATUSBAR__)
#if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
    // set the position of signal strength icon.
    //PMT VIKAS START 20051202
    if (is_on_idlescreen() == 1)
        /* PMT VIKAS END 20051202 */
    {
        MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y =
            (MMI_title_height >> 1) - (MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height >> 1);
    }
    else
    {
        MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y = cy - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height;
    }
#else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
    /* PMT VIKAS START 20051202 */
    if (is_on_idlescreen() == 1)
        /* PMT VIKAS END 20051202 */
    {
        MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y =
            (MMI_title_height >> 1) - (MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height >> 1);
    }
    else
    {
        MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y = cy - (MMI_status_icons[0].height >> 1);
    }
#endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
    /* PMT VIKAS END 20050707 */
#else 
#if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
    /* PMT VIKAS START 20051010 */
#ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
    /* START VIJAY PMT 20060105 */
    if (whether_status_bar_at_bottom())
        /* END VIJAY PMT 20060105 */
    {
        MMI_status_icons[0].y =
            UI_device_height - MMI_button_bar_height - 1 - (MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height + 2);
        MMI_status_icons[1].y =
            UI_device_height - MMI_button_bar_height - 1 - (MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height + 2);
    }
    else
#endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */ 
    {
        MMI_status_icons[0].y = cy - MMI_status_icons[0].height - 1;//080206 status icon
        MMI_status_icons[1].y = cy - MMI_status_icons[1].height - 1;
    }
    /* PMT VIKAS END 20051010 */
#else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
    /* PMT VIKAS START 20051010 */
#ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
    /* START VIJAY PMT 20060105 */
    if (whether_status_bar_at_bottom())
        /* END VIJAY PMT 20060105 */
    {
        MMI_status_icons[0].y =
            UI_device_height - MMI_button_bar_height - 1 - MMI_status_bar_height - 2 +
            ((MMI_status_bar_height - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height) >> 1);
        MMI_status_icons[1].y =
            UI_device_height - MMI_button_bar_height - 1 - MMI_status_bar_height - 2 +
            ((MMI_status_bar_height - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height) >> 1);
    }
    else
#endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */ 
    {
        // wangbei add start  20071010
         #ifdef __NEW_IDLE_SCREEN_UI_STYLE__
       if (is_on_idlescreen() != 1)
       {
       #endif
           // wangbei add end
            MMI_status_icons[0].y = cy - (MMI_status_icons[0].height >> 1);
            MMI_status_icons[1].y = cy - (MMI_status_icons[1].height >> 1);
       // wangbei add start  20071010
    #ifdef __NEW_IDLE_SCREEN_UI_STYLE__
       } 
    #endif
    // wangbei add end
    }
    /* PMT VIKAS END 20051010 */
#endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
#endif 
    /* PMT HIMANSHU END */

    i = 2;
    /* PMT HIMANSHU START 20050625 */
#if defined(__MMI_UI_TECHNO_STATUS_ICON__)

    /* PMT VIKAS START 20051202 */
    if ((is_on_idlescreen() == 1) || (GetActiveScreenId() == MAIN_MENU_SCREENID))
        /* PMT VIKAS END 20051202 */
    {

        x = (MAIN_LCD_device_width >> 1) - ((NumberOfDisplayedIcons()
                                             * (MMI_status_icons[2].width + STATUS_ICON_X_GAP)) >> 1)
               /*- STATUS_ICON_X_GAP */ ;
        if (x < (x1 + 2))
        {
            x = x1 + 2;
        }
    }
    else
#endif /* defined(__MMI_UI_TECHNO_STATUS_ICON__) */ 
        /* PMT HIMANSHU END */
        x = x1 + STATUS_ICON_X_GAP;
    while (!done)
    {
        display_flag = 0;
        j = MMI_status_icons_pool1[i];
        old_i = i;  /* 122004 Calvin added */
        i++;
        if (i > MMI_N_STATUS_ICONS_POOL1)
        {
            break;
        }
        if (TEST_STATUS_ICON_DISPLAY_ON(MMI_status_icons[j].flags))
        {
            k = j;
            display_flag = 1;
        }
        if ((MMI_status_icons[j].group_ID > 0))
        {
            group_ID = MMI_status_icons[j].group_ID;
            j++;
            inner_done = 0;
            while (!inner_done)
            {
                if (group_ID != MMI_status_icons[j].group_ID)
                {
                    break;
                }
                if ((!display_flag) && TEST_STATUS_ICON_DISPLAY_ON(MMI_status_icons[j].flags))
                {
                    display_flag = 1;
                    k = j;
                }
                else
                {
                    i++;
                    j++;
                }
            }
        }
        if (display_flag)   /* if flagis set to display */
        {
            /* if((x+MMI_status_icons[k].width+STATUS_ICON_X_GAP)>x2) */
            if ((x + MMI_status_icons[k].width) > x2)   /* 022205 Calvin modfied */
            {                                           /* i--; */
                i = old_i;                              /* 122004 Calvin changed */
                break;
            }
        #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
            /* PMT VIKAS START 20050707 */
        #if defined(__MMI_UI_DALMATIAN_STATUSBAR__) && defined(__MMI_MAINLCD_176X220__)
            y = cy - MMI_status_icons[k].height - 1;
        #else /* defined(__MMI_UI_DALMATIAN_STATUSBAR__) && defined(__MMI_MAINLCD_176X220__) */ 
            /* PMT VIKAS START 20051010 */
        #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
            /* START VIJAY PMT 20060105 */
            if (whether_status_bar_at_bottom())
                /* END VIJAY PMT 20060105 */
            {
                y = UI_device_height - MMI_button_bar_height - 1 - MMI_status_icons[k].height - 2;
            }
            else
        #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */ 
                /* PMT VIKAS END 20051010 */
		   // wangbei add start  20071010
                #ifdef __NEW_IDLE_SCREEN_UI_STYLE__
                 if (is_on_idlescreen() == 1)
                 {
                     y =cy - MMI_status_icons[k].height - 1+60;    /* signal icon is now placed on title bar on idle screen. */
                 }
                 else
                 #endif
                 // wangbei add end
                y = cy - MMI_status_icons[k].height - 1;//080206 status icon
        #endif /* defined(__MMI_UI_DALMATIAN_STATUSBAR__) && defined(__MMI_MAINLCD_176X220__) */ 
            /* PMT VIKAS END 20050707 */
        #else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
            /* PMT VIKAS START 20051010 */
        #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
            /* START VIJAY PMT 20060105 */
            if (whether_status_bar_at_bottom())
                /* END VIJAY PMT 20060105 */
            {
                y = UI_device_height - MMI_button_bar_height - 1 - MMI_status_bar_height +
                    ((MMI_status_bar_height - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height) >> 1);
            }
            else
        #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */ 
                /* PMT VIKAS END 20051010 */
                y = cy - (MMI_status_icons[k].height >> 1);
        #endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
            MMI_status_icons[k].x = x;
            MMI_status_icons[k].y = y;
            x += MMI_status_icons[k].width + STATUS_ICON_X_GAP;
            MMI_status_icons_list1[MMI_status_icon_bars[0].n_icons] = (S16) k;
            MMI_status_icon_bars[0].n_icons++;
            if (MMI_status_icon_bars[0].n_icons >= MMI_N_STATUS_ICONS_LIST1)
            {
                done = 1;
            }
        }
    }

    /* Status bar 2: Vertical bar */

    /* PMT VIKAS START 20050707 */
#ifdef __MMI_UI_DALMATIAN_STATUSBAR__
    /* PMT VIKAS START 20051202 */
    if (is_on_idlescreen() == 1)
        /* PMT VIKAS END 20051202 */
    {
        MMI_status_icon_bars[1].n_icons = 0;    /* battery icon is now placed on title bar on idle screen. */
    }
    else
    {
        MMI_status_icons_list2[0] = STATUS_ICON_BATTERY_STRENGTH;
        MMI_status_icon_bars[1].n_icons = 1;
    }
#else /* __MMI_UI_DALMATIAN_STATUSBAR__ */ 
    MMI_status_icon_bars[1].n_icons = 0;
#endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */ 
    /* PMT VIKAS END 20050707 */
    x1 = MMI_status_icon_bars[1].x1;    /* start x position of vertical  status bar main lcd */
    y1 = MMI_status_icon_bars[1].y1;    /* start y position of vertical status bar main lcd */
    x2 = MMI_status_icon_bars[1].x2;    /* end x position of vertical status bar main lcd */
    y2 = MMI_status_icon_bars[1].y2;    /* end y position of horizontal status bar main lcd */
    /* PMT VIKAS START 20050707 */
#ifdef __MMI_UI_DALMATIAN_STATUSBAR__
    /* to handle shuffling of status bar on idle screen. */
    if (is_status_bar_shuffled == 0)
    {
        x = 6;
    }
    else
    {
        x = 2 * MMI_STATUS_BAR_WIDTH - UI_device_width + STATUS_ICON_X_GAP;
    }
    /* PMT VIKAS START 20051202 */
    if (is_on_idlescreen() == 0)
        /* PMT VIKAS END 20051202 */
    {
        x2 = MMI_STATUS_BAR_WIDTH - MMI_status_icons[MMI_status_icons_list2[0]].width;
    }
    else
    {
        x2 = MMI_STATUS_BAR_WIDTH - 1;
    }
#if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
    /* PMT VIKAS START 20051202 */
    if (is_on_idlescreen() == 1)
        /* PMT VIKAS END 20051202 */
    {
        MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x =
            UI_device_width - 1 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width;
        MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].y =
            (MMI_title_height >> 1) - (MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height >> 1);
    }
    else
    {
        MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x = (UI_device_width - 1)
            - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width - MMI_status_icon_bars[1].x;
        MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].y = cy - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height;
    }
#else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
    /* PMT VIKAS START 20051202 */
    if (is_on_idlescreen() == 1)
        /* PMT VIKAS END 20051202 */
    {
        MMI_status_icons[1].y = MMI_title_height >> 1;
    }
    else
    {
        MMI_status_icons[1].y = cy - (MMI_status_icons[1].height >> 1);
    }
#endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */ 
#else /* __MMI_UI_DALMATIAN_STATUSBAR__ */ 
    /* x2 = UI_device_width - MMI_status_icons[MMI_status_icons_list2[0]].width;//090605 StatusIcon Calvin moved */
    cx = (x2 - x1 + 1) >> 1;
    /* PMT VIKAS START 20051010 */
#ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
    /* START VIJAY PMT 20060105 */
    if (whether_status_bar_at_bottom())
        /* END VIJAY PMT 20060105 */
    {
        /* START VIJAY PMT 20060105 */
    #ifdef __MMI_MAINLCD_128X160__
        y = UI_device_height - MMI_button_bar_height - MMI_status_bar_height -
            ((MMI_status_icons[1].height + (STATUS_ICON_Y_GAP) << 1) + STATUS_ICON_Y_GAP + 2) - 1;
    #else /* __MMI_MAINLCD_128X160__ */ 
        y = UI_device_height - MMI_button_bar_height - MMI_status_bar_height -
            ((MMI_status_icons[1].height + (STATUS_ICON_Y_GAP) << 1) + STATUS_ICON_Y_GAP) - 1;
    #endif /* __MMI_MAINLCD_128X160__ */ 
        /* END VIJAY PMT 20060105 */
    }
    else
#endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */ 
    {
        y = STATUS_ICON_Y_GAP;
    }
    /* PMT VIKAS END 20051010 */
#endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */ 
    /* PMT VIKAS END 20050707 */
    done = 0;
    while (!done)
    {
        display_flag = 0;
        j = MMI_status_icons_pool1[i];
        old_i = i;
        i++;

⌨️ 快捷键说明

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