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

📄 gui_fixed_menuitems.c

📁 详细介绍MTK平台图层运用的好东西
💻 C
📖 第 1 页 / 共 5 页
字号:

extern BOOL r2lMMIFlag;

#if (defined __MMI_UI_TWO_LINE_MENUITEM_STYLES__ || defined __MMI_UI_HINTS_IN_MENUITEM__)
#define GUI_TWO_LINE_TEXT_ICON_GAP 5
#endif 

static S32 gui_menuitem_icontext_dummy_checkbox_clicked_callback(S32 item_index);
static S32 gui_menuitem_icontext_dummy_checkbox_get_image_callback(S32 item_index, PU8 *checkbox_image);
static void gui_menuitem_icontext_show_checkbox(fixed_icontext_menuitem *m, S32 x1, S32 y1);
static void gui_menuitem_icontext_checkbox_get_data(gui_menuitem_icontext_checkbox_struct *checkbox, fixed_icontext_menuitem *m, S32 x1, S32 y1);

static void gui_menuitem_adjust_text_clip_for_right_gap(void *common_item_data);
static S32 gui_menuitem_is_image_highlight(void *common_item_data);

/* Pop up description related data  */

/*****************************************************************************
 * FUNCTION
 *  UI_dummy_display_pop_up_description
 * DESCRIPTION
 *  dummy function of display popup
 * PARAMETERS
 *  x           [IN]        Start x position
 *  y           [IN]        Start y position
 *  width       [IN]        Width of popup
 *  height      [IN]        Hieght of popup
 * RETURNS
 *  void
 *****************************************************************************/
void UI_dummy_display_pop_up_description(S32 x, S32 y, S32 width, S32 height)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    UI_UNUSED_PARAMETER(x);
    UI_UNUSED_PARAMETER(y);
    UI_UNUSED_PARAMETER(width);
    UI_UNUSED_PARAMETER(height);
}

#ifdef __MMI_UI_HINTS_IN_MENUITEM__


/*****************************************************************************
 * FUNCTION
 *  UI_dummy_get_current_pop_up_description_string
 * DESCRIPTION
 *  Dummy function to get popup description string.
 * PARAMETERS
 *  void
 * RETURNS
 *  NULL
 *****************************************************************************/
UI_string_type UI_dummy_get_current_pop_up_description_string(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    return NULL;
}

UI_string_type (*gui_get_current_pop_up_description_string)(void) = UI_dummy_get_current_pop_up_description_string;
#endif /* __MMI_UI_HINTS_IN_MENUITEM__ */ 


void (*gui_display_pop_up_description) (S32 x, S32 y, S32 width, S32 height) = UI_dummy_display_pop_up_description;

#ifdef __MMI_UI_TRANSPARENT_EFFECT__
static BOOL block_transparency = FALSE;
UI_filled_area non_transparent_focussed_filler;
UI_filled_area *backup_focussed_filler;
S32 transparency_in_list = 0;

/*****************************************************************************
 * FUNCTION
 *  gui_block_transparency_effect
 * DESCRIPTION
 *  Block the transparency effect.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void gui_block_transparency_effect(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    block_transparency = TRUE;
}


/*****************************************************************************
 * FUNCTION
 *  gui_unblock_transparency_effect
 * DESCRIPTION
 *  Unblock the transparency effect.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void gui_unblock_transparency_effect(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    block_transparency = FALSE;
}


/*****************************************************************************
 * FUNCTION
 *  gui_fixed_icontext_enable_transparent_effect
 * DESCRIPTION
 *  Enable the transparent effect for the icontext menu item.
 * PARAMETERS
 *  m           [IN]    common icontext menu item object
 * RETURNS
 *  void
 *****************************************************************************/
void gui_fixed_icontext_enable_transparent_effect(fixed_icontext_menuitem *m)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (block_transparency)
    {
        return;
    }

    /* to enable transparency only when it is required */
    if (transparency_in_list)
    {
        m->focussed_filler = backup_focussed_filler;
    }
    transparency_in_list = 0;
}


/*****************************************************************************
 * FUNCTION
 *  gui_fixed_icontext_disable_transparent_effect
 * DESCRIPTION
 *  Disable the transparent effect for the icontext menu item.
 * PARAMETERS
 *  m           [IN]    common icontext menu item object     
 * RETURNS
 *  void
 *****************************************************************************/
void gui_fixed_icontext_disable_transparent_effect(fixed_icontext_menuitem *m)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (block_transparency)
    {
        return;
    }
    /* disable transparency only when it is enabled */
    if (m->focussed_filler->flags & UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR)
    {
        transparency_in_list = 1;
        backup_focussed_filler = m->focussed_filler;
        non_transparent_focussed_filler = *backup_focussed_filler;
        m->focussed_filler = &non_transparent_focussed_filler;
        m->focussed_filler->flags = m->focussed_filler->flags & ~UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
    }
}


/*****************************************************************************
 * FUNCTION
 *  gui_fixed_icontext_list_enable_transparent_effect
 * DESCRIPTION
 *  Enable the transparent effect for the icontext list menu item.
 * PARAMETERS
 *  m           [IN]    common icontext list menu item object  
 * RETURNS
 *  void
 *****************************************************************************/
void gui_fixed_icontext_list_enable_transparent_effect(fixed_icontext_list_menuitem *m)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (block_transparency)
    {
        return;
    }
    if (transparency_in_list)
    {
        m->focussed_filler = backup_focussed_filler;
    }
    transparency_in_list = 0;
}


/*****************************************************************************
 * FUNCTION
 *  gui_fixed_icontext_list_disable_transparent_effect
 * DESCRIPTION
 *  Disable the transparent effect for the icontext menu item.
 * PARAMETERS
 *  m           [IN]    common icontext list menu item object   
 * RETURNS
 *  void
 *****************************************************************************/
void gui_fixed_icontext_list_disable_transparent_effect(fixed_icontext_list_menuitem *m)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (block_transparency)
    {
        return;
    }
    if (m->focussed_filler->flags & UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR)
    {
        transparency_in_list = 1;
        backup_focussed_filler = m->focussed_filler;
        non_transparent_focussed_filler = *backup_focussed_filler;
        m->focussed_filler = &non_transparent_focussed_filler;
        m->focussed_filler->flags = m->focussed_filler->flags & ~UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
    }
}


/*****************************************************************************
 * FUNCTION
 *  gui_fixed_text_menuitem_enable_transparent_effect
 * DESCRIPTION
 *  Enable the transparent effect for the text menu item.
 * PARAMETERS
 *  m           [IN]    common text menu item object    
 * RETURNS
 *  void
 *****************************************************************************/
void gui_fixed_text_menuitem_enable_transparent_effect(fixed_text_menuitem *m)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (block_transparency)
    {
        return;
    }
    if (transparency_in_list)
    {
        m->focussed_filler = backup_focussed_filler;
    }
    transparency_in_list = 0;
}


/*****************************************************************************
 * FUNCTION
 *  gui_fixed_text_menuitem_disable_transparent_effect
 * DESCRIPTION
 *  Disable the transparent effect for the text menu item.
 * PARAMETERS
 *  m           [IN]    common text menu item object    
 * RETURNS
 *  void
 *****************************************************************************/
void gui_fixed_text_menuitem_disable_transparent_effect(fixed_text_menuitem *m)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (block_transparency)
    {
        return;
    }
    if (m->focussed_filler->flags & UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR)
    {
        transparency_in_list = 1;
        backup_focussed_filler = m->focussed_filler;
        non_transparent_focussed_filler = *backup_focussed_filler;
        m->focussed_filler = &non_transparent_focussed_filler;
        m->focussed_filler->flags = m->focussed_filler->flags & ~UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
    }
}


/*****************************************************************************
 * FUNCTION
 *  gui_fixed_twostate_menuitem_enable_transparent_effect
 * DESCRIPTION
 *  Enable the transparent effect for the two-state menu item.
 * PARAMETERS
 *  m           [IN]    common two-state menu item object    
 * RETURNS
 *  void
 *****************************************************************************/
void gui_fixed_twostate_menuitem_enable_transparent_effect(fixed_twostate_menuitem *m)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */

⌨️ 快捷键说明

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