📄 thumb.h
字号:
//**************************************************************************// Copyright (c) 2004, Cheertek Inc . All rights reserved.// D300, all right reserved.// Product : WinDVD Firmware// Date : 2004.6.29// Author : Cheertek (D300 CoCo Chiang)// Purpose : Provide the UI for thumbnail.// Sources : Thumb.c//***************************************************************************#ifndef __THUMB_H__#define __THUMB_H__
#ifndef CT950_STYLE
#define SUPPORT_THUMB_PROGRAM
#endif //CT950_STYLE
//Open this define to use OSD to draw thumbnail's frame//#define THUMB_DRAW_OSD_FRAME//Open this define to support round highlight.#define THUMB_ROUND_HIGHLIGHT //Define the interval of time to flash the current selection#define THUMB_SELECT_FRAME_FLASH_INTERVAL COUNT_300_MSEC//define the color of the background//#define THUMB_BACKGROUND_COLOR 0x22d472 //The color of the frame buffer. (YUV)#define THUMB_BACKGROUND_COLOR 0x000000 //The color of the frame buffer. (RGB)//define the number of palette for the background#define THUMB_BACKGROUND_PALETTE_NUM 50//Note: The following color is RGB not YUV//define the color for thumbnail frame#define THUMB_FRAME_NORMAL_COLOR 0xE1E1E1#define THUMB_FRAME_SELECT_COLOR_1 0xFFFF00#define THUMB_FRAME_SELECT_COLOR_2 0x8985DF#define THUMB_FRAME_SELECT_COLOR_3 0xF3E328#define THUMB_FRAME_SELECT_COLOR_4 0x359C4D#define THUMB_FRAME_PROGRAM_COLOR 0xA52100//define the number of rows in a page
#if (DRAM_CONFIGURATION_TYPE_DVD == DRAM_SIZE_16)
#define THUMB_ROW_NUM 3
#else#define THUMB_ROW_NUM 4
#endif //DRAM_CONFIGURATION_TYPE_DVD//define the number of columns in a page#define THUMB_COLUMN_NUM 5//define the number of thumbnails in a page#define THUMB_TOTAL_NUM_IN_PAGE (THUMB_ROW_NUM*THUMB_COLUMN_NUM)//define the height of font or any GDI object#define THUMB_TITLE_FONT_HEIGHT 26#define THUMB_HELP_FONT_HEIGHT 26//define the value of the arc of the button#define THUMB_BUTTON_ARC_VALUE 13//define the value of the arc of the button#define THUMB_BUTTON_OUTER_ARC_VALUE 15//define the pixels between the outer and inner arc of the background#define THUMB_BUTTON_OUTER_INNER_ARC_PIXEL (THUMB_BUTTON_OUTER_ARC_VALUE-THUMB_BUTTON_ARC_VALUE)//define the value of the arc of the help region#define THUMB_HELP_REGION_ARC_VALUE 13//define the value of the arc of the help region#define THUMB_HELP_REGION_OUTER_ARC_VALUE 15//define the pixels between the outer and inner arc of the background#define THUMB_HELP_REGION_OUTER_INNER_ARC_PIXEL (THUMB_HELP_REGION_OUTER_ARC_VALUE-THUMB_HELP_REGION_ARC_VALUE)//define the type of highlight#define THUMB_UPDATE_HIGHLIGHT_DRAW 0#define THUMB_UPDATE_HIGHLIGHT_CLEAR 1//define maximum decoding time#define THUMB_MAX_DECODE_TIME (COUNT_10_SEC*6)//define maximum "parse header" time#define THUMB_MAX_PARSEHEADER_TIME COUNT_5_SEC//define the maximum times to re-decode a thumbnail when decoding error#define THUMB_REDECODE_TIMES 3//define the maximum times to check hang#define THUMB_CHECK_HANG_TIMES 20//parameters for changing a page#define THUMB_NEXT_PAGE 0#define THUMB_PREVIOUS_PAGE 1#define THUMB_CURRENT_PAGE 2//Decoding stage#define THUMB_STAGE_START 0#define THUMB_STAGE_PARSEHEADER 1#define THUMB_STAGE_DECODE 2 //parameters for the type of the cursor#define THUMB_CURSOR_PICTURE 0#define THUMB_CURSOR_BUTTON 1
//parameters for sub-mode of thumbnail
#define THUMB_MAIN_MODE_GENERAL 0
#define THUMB_MAIN_MODE_EDIT 1
//parameters for sub-mode of thumbnail
typedef enum tagTHUMB_MODE_ID_LIST
{ THUMB_SUBMODE_GENERAL = 0, THUMB_SUBMODE_ROTATE, THUMB_SUBMODE_PROGRAM, THUMB_SUBMODE_PROGRAM_LIST,
#ifndef THUMB_NO_EDIT_MODE
THUMB_SUBMODE_EDIT_MODE,
#endif
THUMB_SUBMODE_DELETE_MODE,
THUMB_SUBMODE_SORT_MODE,
//Put the mode here because just for compile issue only
#ifdef THUMB_NO_EDIT_MODE
THUMB_SUBMODE_EDIT_MODE,
#endif
} THUMB_MODE_ID_LIST;
//parameter for button's state#define THUMB_BUTTON_STATE_ENABLE 0#define THUMB_BUTTON_STATE_HIGHLIGHT 1//define thumbnail's button ID#define THUMB_BUTTON_ROTATE 0#define THUMB_BUTTON_GENERAL_SLIDESHOW 1#define THUMB_BUTTON_RESET 2#define THUMB_BUTTON_ROTATE_RETURN 3#define THUMB_BUTTON_PROGRAM_SLIDESHOW 4#define THUMB_BUTTON_PROGRAMLIST 5#define THUMB_BUTTON_PROGRAMLIST_SLIDESHOW 6#define THUMB_BUTTON_PROGRAMLIST_RETURN 7
#define THUMB_BUTTON_EDIT_DELETE 8
#define THUMB_BUTTON_EDIT_SORT 9
#define THUMB_BUTTON_DELETE_DELETEALL 10
#define THUMB_BUTTON_DELETE_RETURN 11
#define THUMB_BUTTON_SORT_RETURN 12
#define THUMB_BUTTON_SORT_PLAY 13 //parameters for slide show#define THUMB_PLAY_START 0#define THUMB_PLAY_CURRENT 1//parameters for thumbnail decode mode#define THUMB_DECODE_PAGE 0#define THUMB_DECODE_ONE 1#define THUMB_DECODE_UNDETERMINED 2//parameters for drawing thumbnail's frame#define THUMB_FRAME_NORMAL 0#define THUMB_FRAME_SELECT 1#define THUMB_FRAME_PROGRAM 2#define THUMB_FRAME_CLEAR 3//defint the update for the frame#define THUMB_UPDATE_FRAME_GENERAL_TO_PROGRAM 0#define THUMB_UPDATE_FRAME_PROGRAM_TO_GENERAL 1//define the type of clearing#define THUMB_CLEAR_TITLE_REGION 0#define THUMB_CLEAR_PAGE_INFO_REGION 1#define THUMB_CLEAR_HELP_REGION 2#define THUMB_CLEAR_BUTTON_REGION 3#define THUMB_CLEAR_GENERAL_MODE_FRAME_REGION 4#define THUMB_CLEAR_RECOVER_UPPER_REGION 5#define THUMB_CLEAR_RECOVER_BOTTOM_REGION 6//define the type of tunning position for PAL#define THUMB_TUNE_POS_TYPE_TITLE 0#define THUMB_TUNE_POS_TYPE_BUTTON 1#define THUMB_TUNE_POS_TYPE_HELP 2//***************************************************************************//The following define is for UI-relative attributes.//***************************************************************************
//define the OSD DRAM configuration
#if (DRAM_CONFIGURATION_TYPE == DRAM_SIZE_16)
#define THUMB_OSD_REGION_WIDTH 616
#define THUMB_OSD_REGION_HEIGHT 420
#else
#define THUMB_OSD_REGION_WIDTH GDI_REGION_WIDTH
#define THUMB_OSD_REGION_HEIGHT 440
#endif
//define the thickness of the thumbnail's frame#define THUMB_FRAME_THICKNESS 4#define THUMB_HIGHLIGHT_FRAME_THICKNESS 4//6//Define the thumbnail's size and position.
#if (DRAM_CONFIGURATION_TYPE_DVD == DRAM_SIZE_16)
#define THUMB_WIDTH 96
#define THUMB_HEIGHT_NTSC 64 //to be modified
#define THUMB_HEIGHT_PAL 80
#define THUMB_DISTANCE_WIDTH 16 //the distance between each thumbnail
#define THUMB_DISTANCE_HEIGHT_NTSC 16
#ifdef JPEG_SINGLE_BUFFER_FULL_SCREEN
#define THUMB_H_REGION 88 //the region between left side of the buffer and thumbnail
#else
#define THUMB_H_REGION 46 //the region between left side of the buffer and thumbnail
#endif //JPEG_SINGLE_BUFFER_FULL_SCREEN
#define THUMB_V_REGION_NTSC 56 //66 //the region between top side of the buffer and thumbnail
#define THUMB_TUNE_DISPLAY_WIDTH_NTSC 2
#define THUMB_TUNE_DISPLAY_HEIGHT_NTSC 6
//define the width and height should be tunned for PAL.
#define THUMB_TUNE_DISPLAY_WIDTH_PAL 2//0
#define THUMB_TUNE_DISPLAY_HEIGHT_PAL 18//16
#define THUMB_TUNE_DISTANCE_HEIGHT_PAL 16
//adjust the position for VDS and HDS is changed to center the video
#ifdef JPEG_SINGLE_BUFFER_FULL_SCREEN
#define THUMB_TUNE_FRAME_H_NTSC 58 //66
#define THUMB_TUNE_FRAME_V_NTSC 0 //18
#define THUMB_TUNE_FRAME_H_PAL 58//40 //72
#define THUMB_TUNE_FRAME_V_PAL 0
#else
#define THUMB_TUNE_FRAME_H_NTSC 0 //66
#define THUMB_TUNE_FRAME_V_NTSC 0 //18
#define THUMB_TUNE_FRAME_H_PAL 0//40 //72
#define THUMB_TUNE_FRAME_V_PAL 0
#endif //JPEG_SINGLE_BUFFER_FULL_SCREEN
//PSCAN is different from Interlace
#define THUMB_TUNE_FRAME_H_NTSC_PSCAN 0
#define THUMB_TUNE_FRAME_V_NTSC_PSCAN 0
#define THUMB_TUNE_FRAME_H_PAL_PSCAN 0
#define THUMB_TUNE_FRAME_V_PAL_PSCAN 0
#define THUMB_TUNE_OSD_H_OFFSET_NTSC 32
#define THUMB_TUNE_OSD_V_OFFSET_NTSC 32
#define THUMB_TUNE_OSD_H_OFFSET_PAL 34
#define THUMB_TUNE_OSD_V_OFFSET_PAL 34
#define THUMB_TUNE_OSD_H_DISTANCE_NTSC 12
#define THUMB_TUNE_OSD_V_DISTANCE_NTSC 5
#define THUMB_TUNE_OSD_H_DISTANCE_PAL 10
#define THUMB_TUNE_OSD_V_DISTANCE_PAL 8
#define THUMB_TUNE_OSD_H_OFFSET_NTSC_PSCAN 32
#define THUMB_TUNE_OSD_V_OFFSET_NTSC_PSCAN 32
#define THUMB_TUNE_OSD_H_OFFSET_PAL_PSCAN 38
#define THUMB_TUNE_OSD_V_OFFSET_PAL_PSCAN 30
#define THUMB_TUNE_OSD_H_DISTANCE_NTSC_PSCAN 12
#define THUMB_TUNE_OSD_V_DISTANCE_NTSC_PSCAN 5
#define THUMB_TUNE_OSD_H_DISTANCE_PAL_PSCAN 10
#define THUMB_TUNE_OSD_V_DISTANCE_PAL_PSCAN 10
//define the position of tunning button in PAL mode.
#define THUMB_TUNE_BUTTON_START_V_PAL 56
//define the position of tunning title in PAL mode.
#define THUMB_TUNE_TITLE_START_V_PAL 0
//define the position of tunning help in PAL mode.
#define THUMB_TUNE_HELP_START_V_PAL THUMB_TUNE_BUTTON_START_V_PAL
#else#define THUMB_WIDTH 96#define THUMB_HEIGHT_NTSC 64 //to be modified#define THUMB_HEIGHT_PAL 80#define THUMB_DISTANCE_WIDTH 16 //the distance between each thumbnail#define THUMB_DISTANCE_HEIGHT_NTSC 16
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -