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

📄 stpmenu1.h

📁 MTK1389 SOURCE CODE
💻 H
📖 第 1 页 / 共 4 页
字号:
/**********************************************************************/
/***************    MTK CONFIDENTIAL & COPYRIGHTED     ****************/
/***************                                       ****************/
/***************  $Modtime:: 04/07/07 3:30p    $       ****************/
/***************  $Revision:: 18               $       ****************/
/***************                                       ****************/
/***************   Description : Setup Menu            ****************/
/***************                                       ****************/
/***************       Company : MediaTek Inc.         ****************/
/***************    Programmer :                       ****************/
/**********************************************************************/

#ifndef _MENU_H
#define _MENU_H

#include "general.h"
#include "ev.h"
#include "stppage.h"
#include "stprisc.h"
#include "stpcheck.h"
#include "stpadsp.h"
#include "stpmain.h"
#include "stppass.h"

#define NULL_BMP       0xFFFF
#define NULL_EE_ITEM   NULL_POSITION
#define NULL_FUN       0
#define NULL_OPT       0
#define NULL_SI        0

// - Bitmap 
#define MENU_BMP_W           56
#define MENU_BMP_H           56

// - Width / Height
#define DIALOG_X              50
#define DIALOG_W              SETUP_ITEM_W - DIALOG_X * 2 
#define DIALOG_START_X        30
#define DIALOG_BTN_W          60
#define DIALOG_LINE_H         30 //32 [runma] 32 -> 30

#define DIALOG_Y              64
#define DIALOG_START_Y        0
#define DIALOG_ITEM_W         16

#define MSG_X   20
#define MSG_Y   0

#define STP_ENTRY_START_X      24
#define STP_VALUE_START_X     208
#define STP_DATA_START_X      280 //266 [runma] -> 272
#define STP_ENTRY_END_X       (STP_DATA_START_X - 6)
#define STP_MENU_START_Y       32
#define STP_MENU_ENTRY_H       30

#define VALUE_WIDTH           12
#define DATA_WIDTH          240
#define DATA_BTN_BASE       0//7
#define ENTRY_MARK_START_X     (STP_DATA_START_X - 20)

#define H_START_X     20
#define H_START_Y     20
#define H_SPACE       64
#define H_SPACE_SM    48
#define H_SPACE_MSM   40

#define SPEAKER_CENTER 0x01
#define SPEAKER_LEFT   0x02
#define SPEAKER_RIGHT  0x04
#define SPEAKER_LS     0x08
#define SPEAKER_RS     0x10
#define SPEAKER_SUB    0x20


// - Setup Menu Layout

#ifdef MTK_TVE
  #define VDO_COMP_MODE       0x01
  #ifdef PSCAN_EN
    #define VDO_PSCAN_EN      0x02
    #ifndef PSCAN_SIMPLE_MENU
    #define VDO_PSCAN_MODE    0x04
    #define VDO_PSCAN_VIDEO   0x08
      #ifdef PSCAN_SQUEEZE
        #define VDO_PSCAN_SQUEEZE 0x10
      #endif
    #endif
  #endif
#endif /* MTK_TVE */

#ifdef SETUP_USE_TAB
///////////////////////////////////////////////////////////////////////////////
// setup menu tab msg
#define SETUP_TAB_MSG_X_1   15
#define SETUP_TAB_MSG_Y_1   10
#define SETUP_TAB_MSG_X_2   140
#define SETUP_TAB_MSG_Y_2   10
#define SETUP_TAB_MSG_X_3   255
#define SETUP_TAB_MSG_Y_3   10
#define SETUP_TAB_MSG_X_4   368
#define SETUP_TAB_MSG_Y_4   10
#define SETUP_TAB_MSG_X_5   452
#define SETUP_TAB_MSG_Y_5   10
#endif

///////////////////////////////////////////////////////////////////////////////
// Setup Menu Item/Option Position 

// - Menu
#define MENU_GENERAL              1
#define MENU_AUDIO                2
#define MENU_DOLBY                3
#define MENU_VIDEO                4
#define MENU_PREFERENCE           5
#define MENU_NS                    6

// - General (MENU_GENERAL)
#define GENERAL_TV_DISPLAY        1
#define GENERAL_ANGLE_MARK        2
#define GENERAL_OSD_LANG          3
#define GENERAL_CAPTIONS          4
#define GENERAL_SCREEN_SAVER      5
#define GENERAL_LAST_MEMORY       6
#define GENERAL_MENU_STYLE        7

// - Video Qualtity
#define VIDEO_QLTY_SHARPNESS      3
#define VIDEO_QLTY_BRIGHTNESS     4
#define VIDEO_QLTY_CONTRAST       5

// - Preference (MENU_PREFERENCE)
#define PREFERENCE_TV_TYPE        1
#define PREFERENCE_AUDIO          2
#define PREFERENCE_SUBTITLE       3
#define PREFERENCE_DISCMENU       4
#define PREFERENCE_PARENTAL       5
#define PASSWORD_CHANGE_PWD       6
#define PREFERENCE_DEFAULT        7
#define PREFERENCE_VERSION        8

#define PASSWORD_SWITCH           1
///////////////////////////////////////////////////////////////////////////////
// Setup Menu Item/Optoin Layout

#define ADO_SPEAKER     0
#define ADO_DOLBY       2
#define PREF_ITEM       0x10  // Preference
#define VERSION_ITEM    0x20  // Version
#define TV_ASPECT_ITEM  0x01  // General / TV Display
#define AUDIO_OUT_ITEM  0x08  // General / Audio Out

#define TV_ITEM         (0x01 << PREFERENCE_TVTYPE-1)         // Preference / TV Type
#define PBC_ITEM        (0x01 << PREFERENCE_PBC-1)            // Preference / PBC
#define AUDIO_ITEM      (0x01 << PREFERENCE_AUDIO-1)          // Preference / Audio
#define SP_ITEM         (0x01 << PREFERENCE_SUBTITLE-1)       // Preference / Sub-Title
#define DM_ITEM         (0x01 << PREFERENCE_DISCMENU-1)       // Preference / Disc Menu
#define PR_ITEM         (0x01 << PREFERENCE_PARENTAL-1)       // Preference / Parental
#define CR_ITEM         (0x01 << PREFERENCE_COUNTRYREGION-1)  // Preference / Country Region
#define RESET_ITEM      (0x01 << PREFERENCE_DEFAULT-1)        // Preference / Reset

#define OTHER_LANG_USER_CODE  1
#define OTHER_LANG_RETURN     3

#ifdef NO_INT_VER
  #ifdef NO_REGION_CODE
    #define VERSION_MAIN    0x4  // Version / Main Page
  #else
    #define REGION_ITEM     0x4  // Version / Region Code
    #define VERSION_MAIN    0x8  // Version / Main Page
  #endif
#else
  #ifdef NO_REGION_CODE
    #define VERSION_MAIN    0x40  // Version / Main Page
  #else
#define REGION_ITEM     0x40  // Version / Region Code
#define VERSION_MAIN    0x80  // Version / Main Page
  #endif
#endif

#define DLG_CONFIRM_PNTL      0
#define DLG_CONFIRM_PWD       1
#define DLG_CHANGE_PWD        2
#define DLG_AUDIO_LANG_CODE   3 
#define DLG_MENU_LANG_CODE    4 
#define DLG_SP_LANG_CODE      5 
#define DLG_BRIGHTNESS        6 
#define DLG_CONTRAST          7  
#define DLG_VERSION           8
#define DLG_REGCODE           9
#define DLG_MAX                10

#define DLG_TYPE_DIGIT(bDlg)    ((bDlg >= DLG_CONFIRM_PNTL) && (bDlg <= DLG_SP_LANG_CODE))
#define DLG_TYPE_SLIDER(bDlg)   ((bDlg >= DLG_BRIGHTNESS) && (bDlg <= DLG_HUE))

///////////////////////////////////////////////////////////////////////////////
// Setup Menu Enum

// - Check Normal/Simple/Advanced Style
enum
{
  CHK_MAIN = 1,
  CHK_VDO,
#ifdef PLAYER_51_CHANNEL
  CHK_ADO,
#endif  
  CHK_SPDIF,
  CHK_EQ,
  CHK_PREF,
  CHK_SP,
#ifdef PLAYER_SEQ
  CHK_SEQ,
#endif
#ifdef PLAYER_KARAOKE
  CHK_KOK,
#endif
#ifdef DOLBY_PROLOGIC2
  CHK_PL2,
#endif
  CHK_GENERAL
};

// - Special Page Definition
enum
{
  PAGE_PASS_BTN = 1,
  #ifdef PLAYER_KARAOKE
  PAGE_MIC,
  #endif
  #ifdef PLAYER_TRIM
  PAGE_TRIM,
  #endif
  #ifdef MTK_DELAY
  PAGE_DELAY,
  #endif
  PAGE_VDO
};

// - Page Type
enum PAGE_TYPE
{
  PAGE_TYPE_MAINMENU,
  PAGE_TYPE_V_DIALOG,
  PAGE_NML
};

// - Entry Type
enum ENTRY_TYPE
{
  //TYPE_PAGE,
  TYPE_MAINMENU,
  //ENTRY_TYPE_MENU,
  ENTRY_TYPE_SUBMENU,
  ENTRY_TYPE_RETURN,
  ENTRY_TYPE_DIALOG,
  ENTRY_TYPE_EDITBOX_ORDERED,
  ENTRY_TYPE_EDITBOX,
  ENTRY_TYPE_GROUPBUTTON,
  //ENTRY_TYPE_H_SLIDER,
  ENTRY_TYPE_H_SLIDER_SIGNED,
#ifdef PLAYER_51_CHANNEL
  TYPE_SPK_CONFIG,
#endif  
  TYPE_CLOSE,
  ENTRY_TYPE_STATIC,
  //ENTRY_TYPE_CODE,
//  ENTRY_TYPE_TEXT,
#ifdef PLAYER_51_CHANNEL
  ENTRY_TYPE_NUM,
#endif
  ENTRY_TYPE_CNUM,
  ENTRY_TYPE_NULL,
  TYPE_USER_1
};

enum
{
  MENU_TXT,
  MENU_BMP
};


// - Page Order
enum
{
  /* 00 */ MAIN_PAGE,
  /* 01 */ GENERAL_PAGE,
  /* 02 */ SPEAKER_PAGE,
  /* 03 */ DD_PAGE,
  /* 04 */ PRE_PAGE,
#ifdef ENABLE_USER_LANG_CODE
  /* 05 */ LANG_PAGE,
#endif  
  /* 06 */ VDO_PAGE,
#if (defined(PTL_PWD_MODE_SW) || defined(SET_PTL_NEED_PWD))
  /* 07 */ PASS_PAGE,
#endif
  /* 08 */ PASS_CHG_PAGE,
  /* 09 */ PASS_CON_PAGE,
  /* 10 */ VER_PAGE,
  /* 11 */ BRIGHTNESS_PAGE,
  /* 12 */ CONTRAST_PAGE,  
#ifdef PLAYER_51_CHANNEL
  /* 13 */ ADO_PAGE,
  /* 14 */ SPDIF_PAGE,
#endif
  /* 13 */ MAX_PAGE
};

#define EXIT_PAGE (MAX_PAGE + 1)     // dummy page

///////////////////////////////////////////////////////////////////////////////
// Setup Menu Struct

typedef struct sData
{
  WORD wEntryMsg;
  WORD wMsgMsg;
  WORD wValMsg;
  BYTE bVal;
} sData;

typedef struct sEntry
{
  WORD wType;
  WORD wBmpIdx;
  WORD wEntryMsg;
  WORD wMsgMsg;
  WORD wEEPos;           // store in see entry or Page Number
  WORD wSIPos;         // send to RISC share info update entry
  WORD wMaxOpt;
  WORD wDefault;        // default value when reset
  sData **prData;
  BYTE (code *bFun)(WORD wEEPos, BYTE bValue) large;
} sEntry;

typedef struct sMenu
{
  BYTE bType;
  WORD wHdrMsg;
  WORD wMsgMsg;
  BYTE bTotalEntry;
  sEntry **prEntry;
  BYTE bMenuType; //void *vFun;           // per page draw function
  BYTE bInvType; //void *vInvaFun;       // invalid entry function
} sMenu;

typedef struct sMenuRoot

⌨️ 快捷键说明

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