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

📄 themeconverterui.c

📁 MTK手机平台的MMI部分的源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
            idle_scr_network_extra_color_DLT.b = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 16, 8);
            idle_scr_network_extra_color_DLT.alpha = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 24, 8);
            g_tc_theme_DLT.idle_scr_network_extra_color = (color*) & idle_scr_network_extra_color_DLT;
        }
        else if (!strncmp((PS8) attr_p[attrCount], "idle_scr_network_extra_border_txt", strlen("idle_scr_network_extra_border_txt")))
        {
            idle_scr_network_extra_border_color_DLT.r = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 0, 8);
            idle_scr_network_extra_border_color_DLT.g = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 8, 8);
            idle_scr_network_extra_border_color_DLT.b = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 16, 8);
            idle_scr_network_extra_border_color_DLT.alpha = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 24, 8);
            g_tc_theme_DLT.idle_scr_network_extra_border_color = (color*) & idle_scr_network_extra_border_color_DLT;
        }
    
        attrCount += 2;
    }
}


/*****************************************************************************
 * FUNCTION
 *  mmi_tc_lsk_up_tag_handler
 * DESCRIPTION
 *  (U8** attr_p)
 *  fill the MMI theme structure for lsk up position
 * PARAMETERS
 *  attr_p      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_tc_lsk_up_tag_handler(U8 **attr_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 attrCount = 0;
    U8 type = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    while (attr_p[attrCount])
    {
        if (!strncmp((PS8) attr_p[attrCount], "bk_col", strlen("bk_col")))
        {
            LSK_up_DLT.c.r = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 0, 8);
            LSK_up_DLT.c.g = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 8, 8);
            LSK_up_DLT.c.b = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 16, 8);
            LSK_up_DLT.c.alpha = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 24, 8);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "border_col", strlen("border_col")))
        {

            LSK_up_DLT.border_color.r = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 0, 8);
            LSK_up_DLT.border_color.g = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 8, 8);
            LSK_up_DLT.border_color.b = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 16, 8);
            LSK_up_DLT.border_color.alpha = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 24, 8);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "flag", strlen("flag")))
        {
            LSK_up_DLT.flags = (U32) atoi((PS8) attr_p[attrCount + 1]);
            g_tc_theme_DLT.LSK_up_filler = (UI_filled_area*)&LSK_up_DLT;
        }
        else if (!strncmp((PS8) attr_p[attrCount], "txt_col", strlen("txt_col")))
        {
            LSK_up_txt_col_DLT.r = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 0, 8);
            LSK_up_txt_col_DLT.g = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 8, 8);
            LSK_up_txt_col_DLT.b = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 16, 8);
            LSK_up_txt_col_DLT.alpha = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 24, 8);
            g_tc_theme_DLT.LSK_up_text_color = (color*) & LSK_up_txt_col_DLT;
        }
        else if (!strncmp((PS8) attr_p[attrCount], "type", strlen("type")))
        {
            type = (U32) atoi((PS8) attr_p[attrCount + 1]);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "img_offset", strlen("img_offset")))
        {
            LSK_up_DLT.b = mmi_tm_create_non_imageid_image((U32) atoi((PS8) attr_p[attrCount + 1]), type);
        }
        attrCount += 2;
    }
}


/*****************************************************************************
 * FUNCTION
 *  mmi_tc_lsk_down_tag_handler
 * DESCRIPTION
 *  (U8** attr_p)
 *  fill the MMI theme structure for lsk down position
 * PARAMETERS
 *  attr_p      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_tc_lsk_down_tag_handler(U8 **attr_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 attrCount = 0;
    U8 type = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    while (attr_p[attrCount])
    {
        if (!strncmp((PS8) attr_p[attrCount], "bk_col", strlen("bk_col")))
        {
            LSK_down_DLT.c.r = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 0, 8);
            LSK_down_DLT.c.g = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 8, 8);
            LSK_down_DLT.c.b = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 16, 8);
            LSK_down_DLT.c.alpha = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 24, 8);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "border_col", strlen("border_col")))
        {
            LSK_down_DLT.border_color.r = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 0, 8);
            LSK_down_DLT.border_color.g = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 8, 8);
            LSK_down_DLT.border_color.b = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 16, 8);
            LSK_down_DLT.border_color.alpha = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 24, 8);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "flag", strlen("flag")))
        {
            LSK_down_DLT.flags = (U32) atoi((PS8) attr_p[attrCount + 1]);
            g_tc_theme_DLT.LSK_down_filler = (UI_filled_area*)&LSK_down_DLT;
        }
        else if (!strncmp((PS8) attr_p[attrCount], "txt_col", strlen("txt_col")))
        {
            LSK_down_txt_col_DLT.r = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 0, 8);
            LSK_down_txt_col_DLT.g = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 8, 8);
            LSK_down_txt_col_DLT.b = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 16, 8);
            LSK_down_txt_col_DLT.alpha = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 24, 8);
            g_tc_theme_DLT.LSK_down_text_color = (color*) & LSK_down_txt_col_DLT;
        }
        else if (!strncmp((PS8) attr_p[attrCount], "type", strlen("type")))
        {
            type = (U32) atoi((PS8) attr_p[attrCount + 1]);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "img_offset", strlen("img_offset")))
        {
            LSK_down_DLT.b = mmi_tm_create_non_imageid_image((U32) atoi((PS8) attr_p[attrCount + 1]), type);
        }
        attrCount += 2;
    }
}


/*****************************************************************************
 * FUNCTION
 *  mmi_tc_rsk_up_tag_handler
 * DESCRIPTION
 *  (U8** attr_p)
 *  fill the MMI theme structure for rsk up position
 * PARAMETERS
 *  attr_p      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_tc_rsk_up_tag_handler(U8 **attr_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 attrCount = 0;
    U8 type = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    while (attr_p[attrCount])
    {
        if (!strncmp((PS8) attr_p[attrCount], "bk_col", strlen("bk_col")))
        {
            RSK_up_DLT.c.r = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 0, 8);
            RSK_up_DLT.c.g = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 8, 8);
            RSK_up_DLT.c.b = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 16, 8);
            RSK_up_DLT.c.alpha = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 24, 8);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "border_col", strlen("border_col")))
        {

            RSK_up_DLT.border_color.r = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 0, 8);
            RSK_up_DLT.border_color.g = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 8, 8);
            RSK_up_DLT.border_color.b = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 16, 8);
            RSK_up_DLT.border_color.alpha = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 24, 8);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "flag", strlen("flag")))
        {
            RSK_up_DLT.flags = (U32) atoi((PS8) attr_p[attrCount + 1]);
            g_tc_theme_DLT.RSK_up_filler = (UI_filled_area*)&RSK_up_DLT;
        }
        else if (!strncmp((PS8) attr_p[attrCount], "txt_col", strlen("txt_col")))
        {
            RSK_up_txt_col_DLT.r = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 0, 8);
            RSK_up_txt_col_DLT.g = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 8, 8);
            RSK_up_txt_col_DLT.b = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 16, 8);
            RSK_up_txt_col_DLT.alpha = mmi_tc_extract_no_of_bits((PU8) attr_p[attrCount + 1], 24, 8);
            g_tc_theme_DLT.RSK_up_text_color = (color*) & RSK_up_txt_col_DLT;
        }
        else if (!strncmp((PS8) attr_p[attrCount], "type", strlen("type")))
        {
            type = (U32) atoi((PS8) attr_p[attrCount + 1]);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "img_offset", strlen("img_offset")))
        {
            RSK_up_DLT.b = mmi_tm_create_non_imageid_image((U32) atoi((PS8) attr_p[attrCount + 1]), type);
        }
        attrCount += 2;
    }
}


/*****************************************************************************
 * FUNCTION
 *  mmi_tc_rsk_down_tag_handler
 * DESCRIPTION
 *  (U8** attr_p)
 *  fill the MMI theme structure for rsk down position
 * PARAMETERS
 *  attr_p      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_tc_rsk_down_tag_handler(U8 **attr_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 attrCount = 0;
    U8 type = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    while (attr_p[attrCount])
    {
        if (!strncmp((PS8) attr_p[attrCount], "bk_col", strlen("bk_col")))
        {
            RSK_down_DLT.c.r = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 0, 8);
            RSK_down_DLT.c.g = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 8, 8);
            RSK_down_DLT.c.b = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 16, 8);
            RSK_down_DLT.c.alpha = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 24, 8);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "border_col", strlen("border_col")))
        {
            RSK_down_DLT.border_color.r = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 0, 8);
            RSK_down_DLT.border_color.g = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 8, 8);
            RSK_down_DLT.border_color.b = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 16, 8);
            RSK_down_DLT.border_color.alpha = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 24, 8);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "flag", strlen("flag")))
        {
            RSK_down_DLT.flags = (U32) atoi((PS8) attr_p[attrCount + 1]);
            g_tc_theme_DLT.RSK_down_filler = (UI_filled_area*)&RSK_down_DLT;
        }
        else if (!strncmp((PS8) attr_p[attrCount], "txt_col", strlen("txt_col")))
        {
            RSK_down_txt_col_DLT.r = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 0, 8);
            RSK_down_txt_col_DLT.g = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 8, 8);
            RSK_down_txt_col_DLT.b = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 16, 8);
            RSK_down_txt_col_DLT.alpha = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 24, 8);
            g_tc_theme_DLT.RSK_down_text_color = (color*) & RSK_down_txt_col_DLT;
        }
        else if (!strncmp((PS8) attr_p[attrCount], "type", strlen("type")))
        {
            type = (U32) atoi((PS8) attr_p[attrCount + 1]);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "img_offset", strlen("img_offset")))
        {
            RSK_down_DLT.b = mmi_tm_create_non_imageid_image((U32) atoi((PS8) attr_p[attrCount + 1]), type);
        }
        attrCount += 2;
    }

}

/* Title_TAG handler */


/*****************************************************************************
 * FUNCTION
 *  mmi_tc_title_tag_handler
 * DESCRIPTION
 *  (U8** attr_p)
 *  fill the MMI theme structure for Title Tag
 * PARAMETERS
 *  attr_p      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_tc_title_tag_handler(U8 **attr_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 attrCount = 0;
    U8 type = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    while (attr_p[attrCount])
    {
        if (!strncmp((PS8) attr_p[attrCount], "bk_col", strlen("bk_col")))
        {
            Title_DLT.c.r = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 0, 8);
            Title_DLT.c.g = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 8, 8);
            Title_DLT.c.b = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 16, 8);
            Title_DLT.c.alpha = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 24, 8);
        }
        else if (!strncmp((PS8) attr_p[attrCount], "border_col", strlen("border_col")))
        {
            Title_DLT.border_color.r = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 0, 8);
            Title_DLT.border_color.g = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 8, 8);
            Title_DLT.border_color.b = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 16, 8);
            Title_DLT.border_color.alpha = mmi_tc_extract_no_of_bits(attr_p[attrCount + 1], 24, 8);

⌨️ 快捷键说明

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