示例#1
0
文件: RightsMgr.c 项目: 12019/mtktest
/*****************************************************************************
 * FUNCTION
 *  mmi_rmgr_entry_main
 * DESCRIPTION
 *  Entry function of the rights manager main screen
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
static void mmi_rmgr_entry_main(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 ItemList[MAX_SUB_MENUS];
    U16 ItemIcons[MAX_SUB_MENUS];
    U8 *hints[MAX_SUB_MENUS];
    U16 nItems;

    U8 *guiBuffer;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ID_RMGR_MAIN, NULL, mmi_rmgr_entry_main, NULL);
    if (g_mmi_rmgr_switch_cermgr)
    {
        mmi_frm_unhide_menu_item(MENU_ID_RMGR_CERMGR);
    }
    else
    {
        mmi_frm_hide_menu_item(MENU_ID_RMGR_CERMGR);
    }

    nItems = GetNumOfChild_Ext(MENU_ID_RMGR);
    GetSequenceStringIds_Ext(MENU_ID_RMGR, ItemList);
    GetSequenceImageIds_Ext(MENU_ID_RMGR, ItemIcons);
    SetParentHandler(MENU_ID_RMGR);

    ConstructHintsList(MENU_ID_RMGR, (U8 **) hints);

    RegisterHighlightHandler(mmi_rmgr_highlight_hdlr);

    guiBuffer = GetCurrGuiBuffer(SCR_ID_RMGR_MAIN);
    
    
    ShowCategory52Screen(
        STR_ID_RMGR,
        GetRootTitleIcon(MAIN_MENU_SERVICES_MENUID),
        STR_GLOBAL_OK,
        IMG_GLOBAL_OK,
        STR_GLOBAL_BACK,
        IMG_GLOBAL_BACK,
        nItems,
        ItemList,
        ItemIcons,
        0,
        0,
        mmi_rmgr_p->rmgr_sel_idx,
        guiBuffer);

    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);

    SetDelScrnIDCallbackHandler(SCR_ID_RMGR_LIST_RO_MAIN, (HistoryDelCBPtr)DRM_free_ro_list);
}
示例#2
0
/*****************************************************************************
 * FUNCTION
 *  mmi_vrsdscut_entry_tag_option
 * DESCRIPTION
 *  This function is just for template.
 * PARAMETERS
 *  void
 *  a(?)        [IN/OUT]        First variable, used as returns
 *  b(?)        [IN]            Second variable
 * RETURNS
 *  the description of return value, if any.(?)
 *****************************************************************************/
void mmi_vrsdscut_entry_tag_option(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 *guiBuffer;
    U16 nStrItemList[4];
    U16 nNumofItem;

    U32 HideItemId = -1;
    U32 maskingByte = -1;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ID_VRSD_SHORTCUT_OPTION, NULL, mmi_vrsdscut_entry_tag_option, NULL);
   
    guiBuffer = GetCurrGuiBuffer(SCR_ID_VRSD_SHORTCUT_OPTION);
    SetParentHandler(MENU_ID_VRSD_SHORTCUT_MAIN_MENU);
    RegisterHighlightHandler(ExecuteCurrHiliteHandler);

    /* Register all highlight handler again, because RsetBit() may change the highlight handler when hide menu. */
    mmi_vrsdscut_init_highlight_handler();

    mmi_frm_unhide_menu_item(MENU_ID_VRSD_SHORTCUT_MAIN_ADD);
    /* Display Change and Delete. */
    if (mmi_vrsd_util_get_tag_id(MMI_VRSD_APP_SHORTCUT, g_vrsdscut_highlight) != 0xffff)
    {
        mmi_frm_hide_menu_item(MENU_ID_VRSD_SHORTCUT_MAIN_ADD);
    }

    nNumofItem = GetNumOfChild_Ext(MENU_ID_VRSD_SHORTCUT_MAIN_MENU);
    GetSequenceStringIds_Ext(MENU_ID_VRSD_SHORTCUT_MAIN_MENU, nStrItemList);
    
    if (mmi_vrsd_util_get_tag_id(MMI_VRSD_APP_SHORTCUT, g_vrsdscut_highlight) == 0xffff)
    {
        nNumofItem = 1; /* Display add only */
    }

    ShowCategory15Screen(
        STR_ID_VRSD_SHORTCUT,
        MAIN_MENU_TITLE_MULTIMEDIA_ICON,
        STR_GLOBAL_OK,
        IMG_GLOBAL_OK,
        STR_GLOBAL_BACK,
        IMG_GLOBAL_BACK,
        nNumofItem,
        nStrItemList,
        (U16*) gIndexIconsImageList,
        LIST_MENU,
        0,
        guiBuffer);

    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
}