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

📄 populateres.c

📁 mtk wap和mms代码。。适应mtk 25。26平台
💻 C
📖 第 1 页 / 共 5 页
字号:
extern void PopulateExtraRes(void);
extern void PopulateAlarmRes(void);
extern void PopulateSATRes(void);
extern void PopulateSpofRes(void);
extern void PopulateResourcesCal(void);
extern void PopulateToDoList(void);
extern void PopulateScreenSaverRes(void);
extern void PopulateCommonScreensResData(void);
extern void PopulateEMSObjectResources(void);
extern void PopulateInputMethodRes(void);
extern void PopulatevObjectRes(void);
extern void PopulateVRSDRes(void);
extern void PopulateWapRes(void);
extern void PopulateMmiapiRes(void);
#ifdef PLX_APP_SUPPORT
extern void PopulatePlxResources(void);
#endif
#if defined(JATAAYU_SUPPORT)
extern void PopulateJaatayuBrowserRes(void);
extern void PopulateJataayuJDDRes(void);
#endif /* defined(JATAAYU_SUPPORT) */ 

/* Populate with compile option */
#if defined(__MMI_NITZ__)
extern void PopulateResourceNITZ(void);
#endif 

#if defined(__MMI_MESSAGES_CHAT__)
extern void PopulateChatAppRes(void);
#endif 

#if defined(__MMI_ENGINEER_MODE__)
extern void populateEngineerModeMenu(void);
#endif 

#if defined(__MMI_FACTORY_MODE__)
extern void populateFactoryModeMenu(void);
#endif 

#if defined(__MMI_RING_COMPOSER__) && defined(__MMI_IMELODY_SUPPORT__)
extern void PopulateComposeRingTone(void);
#endif 

#if defined(__MMI_AUDIO_PLAYER__)
extern void populateAudioPlayerMenu(void);
#endif 

#if defined(__MMI_AB_REPEATER__)
extern void populateABRepeaterMenu(void);
#endif 

#if defined(__MMI_FILE_MANAGER__)
extern void populateFileManagerMenu(void);
#endif 

#if defined(__MMI_SOUND_RECORDER__)
extern void populateSoundRecorderMenu(void);
#endif 

#if defined(__MMI_CAMERA__)
extern void PopulateCameraRes(void);
#endif 

#if defined(__MMI_BARCODEREADER__)
extern void PopulateBarcodeReaderRes(void);
#endif 

#if defined(__MMI_IMAGE_VIEWER__)
extern void PopulateImageViewerRes(void);
#endif 

#if defined(__MMI_VIDEO_PLAYER__)
extern void PopulateVdoPlyRes(void);
#endif 

#if defined(__MMI_VIDEO_RECORDER__)
extern void PopulateVdoRecRes(void);
#endif 

#if defined(__MMI_FM_RADIO__)
extern void PopulateFMRadioRes(void);
#endif 

#if defined(__MMI_FM_RADIO_SCHEDULE_REC__)
extern void PopulateFMScheduleRecRes(void);
#endif 

#if defined(__MOD_SMSAL__)
extern void PopulateMessagesResData(void);
#endif 

#if defined(__MMI_UNIFIED_MESSAGE__)
extern void PopulateUnifiedMessageResData(void);
#endif 

#if defined(__MMI_STOPWATCH__)
extern void PopulateStopwatchRes(void);
#endif 

#if defined(__MMI_PHOTOEDITOR__)
extern void PopulatePhotoEditorRes(void);
#endif 

#if defined(__MMI_BG_SOUND_EFFECT__)
extern void PopulateBGSoundRes(void);
#endif 

#if defined(__MMI_EXT_DEVICE__)

#ifdef __MMI_USB_SUPPORT__
extern void PopulateExtDevUSBRes(void);
#endif 

#ifdef __MMI_IRDA_SUPPORT__
extern void PopulateExtDevIrDARes(void);
#endif 

#ifdef __MMI_BT_HP_SUPPORT__
extern void PopulateExtDevBTHPRes(void);
#endif 

#ifdef __MMI_BT_SUPPORT__
extern void PopulateExtDevBTRes(void);
#endif 

/* micha_PoC */
#ifdef __MMI_POC__
extern void PoCResourceData(void);
#endif 

#endif /* defined(__MMI_EXT_DEVICE__) */ 
#if defined(__MMI_DOWNLOAD_AGENT__)
extern void PopulateDownloadAgentRes(void);
#endif 

/* 101205 audio resource Calvin Satrt */


/*****************************************************************************
 * FUNCTION
 *  ToolPopulateInitial
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ToolPopulateInitial(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    int i = 0, j;
    unsigned char a[4];
    char cmd[512];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ClearHWIMageFile();
#ifndef __POPULATE_ENGINE_
    SendMessage(hWnd, WM_CLEARFILES, (WPARAM) 0, (LPARAM) 0);
#endif 
    CurrMaxImageId = 0;
    CurrMaxImageNum = 0;
    CurrMaxImageIdEXT = 0;  /* 040805 CustPack: Calvin added */
    CurrMaxImageNumEXT = 0;

    CurrMaxAudioId = 0;
    CurrMaxAudioNum = 0;
    CurrMaxAudioIdEXT = 0;
    CurrMaxAudioNumEXT = 0;

    CurrMaxMenuItemIndex = MAX_MENU_ITEMS;

    /* to read from NVRAM if possible -vanita */
    gCurrLangIndex = 0;

    memset(nCustMenus, 0, sizeof(CUSTOM_MENU) * MAX_MENU_ITEMS);

    for (i = 0; i < MAX_IMAGE_IDS_SIZE; i++)
    {
        ImageIdMap[i].nImageNum = -1;
        ImageIdMapEXT[i].nImageNum = -1;    /* 040805 CustPack: Calvin added */
    }

    for (i = 0; i < MAX_AUDIO_IDS_SIZE; i++)
    {
        AudioIdMap[i].nAudioNum = -1;
        AudioIdMapEXT[i].nAudioNum = -1;
    }
}

/* 101205 audio resource Calvin End */


/*****************************************************************************
 * FUNCTION
 *  ToolPopulateDone
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ToolPopulateDone(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /*  for generate string list file in first pass */
    fwprintf(StringListFile, L"##number\t%d\r\n", CurrMaxStringId);
    fclose(StringListFile);
    fprintf(EnumListFile, "};\n");
    fclose(EnumListFile);

    /* 091004 MTK Calvin added to reduce populate time */
    fclose(OutputImgIDFile);
    fclose(OutputMenutreeIDFile);
    fclose(RepeatIDListFile);   /* 102604 MTK Calvin added */
    /* MTK Calvin end */
}

/* __CUSTPACK_MULTIBIN Calvin End */

#define TYPE__(A) A##_MENU
#define TYPE_(A)  TYPE__(A)
#define TYPE(A) TYPE_(A)


/*****************************************************************************
 * FUNCTION
 *  PopulateResData
 * DESCRIPTION
 *  Populate Resource
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void PopulateResData(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    int i = 0, j;
    unsigned char a[4];
    char path[] = CUST_IMG_PATH;
    char cmd[512];

    /* MTK Leo add */
    FILE *OutputImgDataFile = NULL;
    FILE *nfb_img_res_file = NULL;
    FILE *nfb_img_data_file = NULL;

    /* MTK Leo end */

    sprintf(cmd, "copy_images.bat ");
    j = 16;
    for (i = 0; i < strlen(path); i++)
    {
        if (!(path[i] == '\\' && path[i + 1] == '\\'))
        {
            cmd[j] = path[i];
            j++;
        }
    }
    cmd[j] = '\0';
    system(cmd);

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    nfb_img_res_file = fopen(NFB_IMAGE_RES_FILENAME, "w");
    if (nfb_img_res_file == NULL)
    {
        printf("nfb_img_res_file could not open!\n");
    }
    else
    {
        fprintf(nfb_img_res_file, "#include \"CustDataRes.h\" \n");
        fprintf(nfb_img_res_file, "#include \"CustNFBProgressImg.h\" \n");
        fprintf(nfb_img_res_file, "const U8* nfb_progress_images[]={\n");
        fclose(nfb_img_res_file);
    }

    nfb_img_data_file = fopen(NFB_IMAGE_DATA_FILENAME, "w");
    if (nfb_img_data_file == NULL)
    {
        printf("nfb_img_data_file could not open!\n");
    }
    else
    {
        fprintf(nfb_img_res_file, "#ifdef MMI_ON_WIN32\n\t#define __align(x)  \n#endif\n");
        fclose(nfb_img_data_file);
    }
    StringListFile = fopen(CUS_STR_RES_FILENAME, "wb");
    if (StringListFile == NULL)
    {
        printf("StringListFile could not open!\n");
    }
    EnumListFile = fopen("enum_list.h", "w");
    if (EnumListFile == NULL)
    {
        printf("EnumListFile could not open!\n");
    }
    fclose(EnumListFile);
    EnumListFile = fopen("enum_list.h", "a");
    if (EnumListFile == NULL)
    {
        printf("EnumListFile could not open with again!\n");
    }

    /* 091004 MTK Calvin added to reduce populate time */
    OutputImgIDFile = fopen(OUTPUT_IMAGE_ID_FILENAME, "w");
    if (OutputImgIDFile == NULL)
    {
        printf("OutputImgIDFile could not open!\n");
        exit(0);
    }
    fclose(OutputImgIDFile);
    OutputImgIDFile = fopen(OUTPUT_IMAGE_ID_FILENAME, "a");
    if (OutputImgIDFile == NULL)
    {
        printf("OutputImgIDFile could not open again!\n");
    }
    fprintf(OutputImgIDFile, "[Image File List]\n");

    OutputMenutreeIDFile = fopen(OUTPUT_MENUTREE_ID_FILENAME, "w");
    if (OutputMenutreeIDFile == NULL)
    {
        printf("OutputMenutreeIDFile could not open!\n");
    }
    fclose(OutputMenutreeIDFile);
    OutputMenutreeIDFile = fopen(OUTPUT_MENUTREE_ID_FILENAME, "a");

⌨️ 快捷键说明

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