?? osdfm.h
字號:
//**************************************************************************
// Copyright (c) 2003, Cheertek Inc . All rights reserved.
// D300, all right reserved.
// Product : WinDVD Firmware
// Date : 2003.1.13
// Author : Cheertek (D300 CoCo Chiang)
// Purpose : Provide the UI for File Manager.
// Sources : OSDFM.c
//***************************************************************************
#ifndef __OSDFM_H__
#define __OSDFM_H__
//open this define if we need "preview window" in File Manager.
//#define SUPPORT_JPEG_PREVIEW
//Open this define to support dynamic length of DIR/file length or not.
#define SUPPORT_DYNAMIC_FILE_LENGTH
#define OSDFM_MIX_RATIO_BACKGROUND 32
#ifdef SUPPORT_FM_BUTTONS
//define the maximum items in the file window.
#define OSDFM_MAX_ITEM_IN_FILE_WINDOW 6
#else
#ifdef USE_LARGE_FONT
#define OSDFM_MAX_ITEM_IN_FILE_WINDOW 6
#else
#define OSDFM_MAX_ITEM_IN_FILE_WINDOW 7
#endif
#endif
//define the maximum DIR in the left file window
#ifdef SUPPORT_JPEG_PREVIEW
#define OSDFM_MAX_DIR_IN_FILE_WINDOW 4
#else
#ifdef SUPPORT_FM_BUTTONS
#define OSDFM_MAX_DIR_IN_FILE_WINDOW 6
#else
#ifdef USE_LARGE_FONT
#define OSDFM_MAX_DIR_IN_FILE_WINDOW 6
#else
#define OSDFM_MAX_DIR_IN_FILE_WINDOW 7
#endif
#endif //SUPPORT_FM_BUTTONS
#endif //SUPPORT_JPEG_PREVIEW
//define the count for flashing the icon of active playing file.
#define OSDFM_FLASH_ACTIVE_FILE_COUNT 100
#ifdef SUPPORT_DYNAMIC_FILE_LENGTH
//define the max number of charachters for file string
#define OSDFM_MAX_FILENAME_LENGTH 20
//define the max number of charachters for file string
#define OSDFM_MAX_DIRNAME_LENGTH 16
#else
//define the max number of charachters for file string
#define OSDFM_MAX_FILENAME_LENGTH 10
//define the max number of charachters for file string
#define OSDFM_MAX_DIRNAME_LENGTH 8
#endif
//define the height for displaying each dir or file
#ifdef USE_LARGE_FONT
#define OSDFM_DISPLAY_ITEM_HEIGHT 46
#else
#define OSDFM_DISPLAY_ITEM_HEIGHT 40
#endif
//define the distance between the first item and the frame
#define OSDFM_START_ITEM_DISTANCE 10
//define the index of the number for the title string
#define OSDFM_TITLE_NUM_INDEX 1
//define the index of the number for the title string when playing
#define OSDFM_PLAYING_TITLE_NUM_INDEX 0
//define the index of the number for the time.
#define OSDFM_TIME_NUM_INDEX 1
//define the index of the file name in the file window
#define OSDFM_FILE_WINDOW_LETTER_INDEX 0
#define OSDFM_FILE_WINDOW_NUM_INDEX 0
//define the height of each font350
#define OSDFM_TITLE_FONT_HEIGHT 32
#ifdef USE_LARGE_FONT
#define OSDFM_FILE_WINDOW_FONT_HEIGHT 32
#else
#define OSDFM_FILE_WINDOW_FONT_HEIGHT 26
#endif
#define OSDFM_BUTTON_FONT_HEIGHT 26
#define OSDFM_HELP_FONT_HEIGHT 32
//define the position and the size of the big frame
#define OSDFM_DISPLAY_BIG_FRAME_THICKNESS 8
#define OSDFM_DISPLAY_BIG_FRAME_H 8 //24
#define OSDFM_DISPLAY_BIG_FRAME_V 64
#define OSDFM_DISPLAY_BIG_FRAME_WIDTH 584
#define OSDFM_DISPLAY_BIG_FRAME_HEIGHT (OSDFM_MAX_ITEM_IN_FILE_WINDOW*OSDFM_DISPLAY_ITEM_HEIGHT+OSDFM_START_ITEM_DISTANCE+OSDFM_DISPLAY_BIG_FRAME_THICKNESS*2)
//define the starting position of the title
#define OSDFM_DISPLAY_TITLE_START_H OSDFM_DISPLAY_BIG_FRAME_H
#define OSDFM_DISPLAY_TITLE_START_V 24
#define OSDFM_DISPLAY_TITLE_WIDTH 352
//define the distance of the background and the content
#define OSDFM_BACKGROUND_CONTENT_DISTANCE 8
//define the distance between the icon and the item
#define OSDFM_ICON_ITEM_DISTANCE 8
//define the distance between the frame and the button
#define OSDFM_FRAME_BUTTON_DISTANCE 4
//define the distance between the button and the help string
#define OSDFM_BUTTON_HELP_DISTANCE 4
//define the distance between the icon and the big frame
#define OSDFM_FRAME_ICON_DISTANCE 24
//define the starting position of the icon in the left window
#define OSDFM_DISPLAY_ICON_LEFT_WINDOW_START_H (OSDFM_DISPLAY_BIG_FRAME_H+OSDFM_FRAME_ICON_DISTANCE)
#define OSDFM_DISPLAY_ICON_LEFT_WINDOW_START_V (OSDFM_DISPLAY_BIG_FRAME_V+OSDFM_DISPLAY_BIG_FRAME_THICKNESS+OSDFM_START_ITEM_DISTANCE)
//define the size of the icon
#define OSDFM_DISPLAY_ICON_WIDTH 32
#define OSDFM_DISPLAY_ICON_HEIGHT 26
//define the type of icons
#define OSDFM_ICON_TYPE_ROOT 0
#define OSDFM_ICON_TYPE_UPFOLDER 1
#define OSDFM_ICON_TYPE_FOLDER 2
#define OSDFM_ICON_TYPE_OPENFOLDER 3
#define OSDFM_ICON_TYPE_JPEG 4
#define OSDFM_ICON_TYPE_MP3 5
#define OSDFM_ICON_TYPE_WMA 6
#define OSDFM_ICON_TYPE_AC3 7 //CoCo1.00, support AC3 icon
#define OSDFM_ICON_TYPE_VOB 8 //CoCo1.00
#define OSDFM_ICON_TYPE_MPG 9 //CoCo1.00
#define OSDFM_ICON_TYPE_DAT 10 //CoCo1.00
#define OSDFM_ICON_TYPE_NONE 0xFF
//define the starting position of the DIR in the left window.
#define OSDFM_DISPLAY_ITEM_LEFT_WINDOW_START_H (OSDFM_DISPLAY_ICON_LEFT_WINDOW_START_H+OSDFM_DISPLAY_ICON_WIDTH+OSDFM_ICON_ITEM_DISTANCE)
#define OSDFM_DISPLAY_ITEM_LEFT_WINDOW_START_V OSDFM_DISPLAY_ICON_LEFT_WINDOW_START_V
//define the starting position of the icon in the right window
#define OSDFM_DISPLAY_ICON_RIGHT_WINDOW_START_H 280 //296 //CoCo1.24, for OSD horiaontal position move.
#define OSDFM_DISPLAY_ICON_RIGHT_WINDOW_START_V OSDFM_DISPLAY_ICON_LEFT_WINDOW_START_V
//define the starting position of the item in the right window.
#define OSDFM_DISPLAY_ITEM_RIGHT_WINDOW_START_H (OSDFM_DISPLAY_ICON_RIGHT_WINDOW_START_H+OSDFM_DISPLAY_ICON_WIDTH+OSDFM_ICON_ITEM_DISTANCE)
#define OSDFM_DISPLAY_ITEM_RIGHT_WINDOW_START_V OSDFM_DISPLAY_ICON_LEFT_WINDOW_START_V
//define the position of the vertical separate frame
//#define OSDFM_DISPLAY_VERTICAL_SEPARATE_FRAME_H 280
#define OSDFM_DISPLAY_VERTICAL_SEPARATE_FRAME_H 264 //280 //CoCo1.24, for OSD horiaontal position move.
#define OSDFM_DISPLAY_VERTICAL_SEPARATE_FRAME_V (OSDFM_DISPLAY_BIG_FRAME_V + OSDFM_DISPLAY_BIG_FRAME_THICKNESS)
#define OSDFM_DISPLAY_VERTICAL_SEPARATE_FRAME_WIDTH 4
#define OSDFM_DISPLAY_VERTICAL_SEPARATE_FRAME_HEIGHT (OSDFM_DISPLAY_BIG_FRAME_HEIGHT - OSDFM_DISPLAY_BIG_FRAME_THICKNESS*2)
#define OSDFM_DISPLAY_VERTICAL_SEPARATE_FRAME_THICKNESS 4
//define the position of the horizontal separate frame
#define OSDFM_DISPLAY_HORIZONTAL_SEPARATE_FRAME_H (OSDFM_DISPLAY_BIG_FRAME_H+OSDFM_DISPLAY_BIG_FRAME_THICKNESS)
#define OSDFM_DISPLAY_HORIZONTAL_SEPARATE_FRAME_V (OSDFM_DISPLAY_ICON_LEFT_WINDOW_START_V+OSDFM_MAX_DIR_IN_FILE_WINDOW*OSDFM_DISPLAY_ITEM_HEIGHT+1)
#define OSDFM_DISPLAY_HORIZONTAL_SEPARATE_FRAME_WIDTH (OSDFM_DISPLAY_VERTICAL_SEPARATE_FRAME_H-OSDFM_DISPLAY_BIG_FRAME_H-OSDFM_DISPLAY_BIG_FRAME_THICKNESS)
#define OSDFM_DISPLAY_HORIZONTAL_SEPARATE_FRAME_HEIGHT 4
#define OSDFM_DISPLAY_HORIZONTAL_SEPARATE_FRAME_THICKNESS 4
//define the common attribute for the scroll bar
#define OSDFM_DISPLAY_SCROLL_BAR_WIDTH 16
#define OSDFM_DISPLAY_SCROLL_BAR_V (OSDFM_DISPLAY_BIG_FRAME_V+OSDFM_DISPLAY_BIG_FRAME_THICKNESS)
//define the position for the right scroll bar
#define OSDFM_DISPLAY_RIGHT_SCROLL_BAR_H (OSDFM_DISPLAY_BIG_FRAME_H + OSDFM_DISPLAY_BIG_FRAME_WIDTH-OSDFM_DISPLAY_BIG_FRAME_THICKNESS-OSDFM_DISPLAY_SCROLL_BAR_WIDTH)
#define OSDFM_DISPLAY_RIGHT_SCROLL_BAR_HEIGHT (OSDFM_DISPLAY_BIG_FRAME_HEIGHT-OSDFM_DISPLAY_BIG_FRAME_THICKNESS*2)
//define the position for the left scroll bar
#define OSDFM_DISPLAY_LEFT_SCROLL_BAR_H (OSDFM_DISPLAY_VERTICAL_SEPARATE_FRAME_H-OSDFM_DISPLAY_SCROLL_BAR_WIDTH)
#ifdef SUPPORT_JPEG_PREVIEW
#define OSDFM_DISPLAY_LEFT_SCROLL_BAR_HEIGHT (OSDFM_DISPLAY_HORIZONTAL_SEPARATE_FRAME_V - OSDFM_DISPLAY_BIG_FRAME_V - OSDFM_DISPLAY_BIG_FRAME_THICKNESS - OSDFM_DISPLAY_HORIZONTAL_SEPARATE_FRAME_THICKNESS)
#else
#define OSDFM_DISPLAY_LEFT_SCROLL_BAR_HEIGHT (OSDFM_DISPLAY_BIG_FRAME_HEIGHT-OSDFM_DISPLAY_BIG_FRAME_THICKNESS*2)
#endif
//define the distance between the right scroll bar and the serial num
#define OSDFM_SCROLLBAR_SERIALNUM_DISTANCE 8
//define the distance between the serial num and file name string.
#define OSDFM_SERIALNUM_FILENAME_DISTANCE 16
//define the position of the serial num
#define OSDFM_DISPLAY_SERIAL_NUM_START_H (OSDFM_DISPLAY_RIGHT_SCROLL_BAR_H - OSDFM_SCROLLBAR_SERIALNUM_DISTANCE)
//define the position of the serial num
#define OSDFM_DISPLAY_LEFT_SERIAL_NUM_START_H (OSDFM_DISPLAY_LEFT_SCROLL_BAR_H - OSDFM_SCROLLBAR_SERIALNUM_DISTANCE)
//define the button's position.
#define OSDFM_BUTTON_START_H OSDFM_DISPLAY_BIG_FRAME_H
#define OSDFM_BUTTON_START_V (OSDFM_DISPLAY_BIG_FRAME_V+OSDFM_DISPLAY_BIG_FRAME_HEIGHT+OSDFM_DISPLAY_BIG_FRAME_THICKNESS+OSDFM_FRAME_BUTTON_DISTANCE)
//define the distance of each button
#define OSDFM_BUTTON_DISTANCE 20
//define the size of the button
#define OSDFM_CIRCLE_BUTTON_WIDTH 40
#define OSDFM_RECTANGLE_BUTTON_WIDTH 120
#define OSDFM_BUTTON_HEIGHT 40
//define the position of the help string.
#define OSDFM_DISPLAY_HELP_STRING_START_H OSDFM_DISPLAY_BIG_FRAME_H
#ifdef SUPPORT_FM_BUTTONS
#define OSDFM_DISPLAY_HELP_STRING_START_V (OSDFM_BUTTON_START_V+OSDFM_BUTTON_HEIGHT+OSDFM_BUTTON_HELP_DISTANCE)
#else
#define OSDFM_FRAME_HELP_DISTANCE 4
#define OSDFM_DISPLAY_HELP_STRING_START_V (OSDFM_DISPLAY_BIG_FRAME_V+OSDFM_DISPLAY_BIG_FRAME_HEIGHT+OSDFM_DISPLAY_BIG_FRAME_THICKNESS+OSDFM_FRAME_HELP_DISTANCE)
#endif //SUPPORT_FM_BUTTONS
//define the region of the background
#define OSDFM_DISPLAY_BACKGROUND_H (OSDFM_DISPLAY_BIG_FRAME_H-OSDFM_BACKGROUND_CONTENT_DISTANCE)
#define OSDFM_DISPLAY_BACKGROUND_V (OSDFM_DISPLAY_TITLE_START_V-OSDFM_BACKGROUND_CONTENT_DISTANCE)
#define OSDFM_DISPLAY_BACKGROUND_RIGHT (OSDFM_DISPLAY_BIG_FRAME_H+OSDFM_DISPLAY_BIG_FRAME_WIDTH+OSDFM_BACKGROUND_CONTENT_DISTANCE)
#define OSDFM_DISPLAY_BACKGROUND_BOTTOM (OSDFM_DISPLAY_HELP_STRING_START_V+OSDFM_HELP_FONT_HEIGHT+OSDFM_BACKGROUND_CONTENT_DISTANCE)
//define the position to show time
#define OSDFM_DISPLAY_TIME_START_V OSDFM_DISPLAY_TITLE_START_V
#define OSDFM_DISPLAY_TIME_END_H (OSDFM_DISPLAY_BIG_FRAME_H+OSDFM_DISPLAY_BIG_FRAME_WIDTH)
//define the width and distance for highlight in file window
#define OSDFM_FILE_HIGHLIGHT_WIDTH 208
#define OSDFM_FOLDER_HIGHLIGHT_WIDTH 176
#define OSDFM_HIGHLIGHT_DISTANCE_V 1
#define OSDFM_HIGHLIGHT_DISTANCE_H 2
//define the distance of the selected frame
#define OSDFM_SELECT_FRAME_DISTANCE_H 6
#define OSDFM_SELECT_FRAME_DISTANCE_V 4
#ifdef GDI_4_BIT_OSD
#define OSDFM_PALETTE_ENTRY_GENERAL_BACKGROUND GDI_ENTRY_4B_COLOR_GENERAL_BG_BLUE
#define OSDFM_PALETTE_ENTRY_TITLE_STRING GDI_ENTRY_4B_COLOR_WHITE
#define OSDFM_PALETTE_ENTRY_HELP_STRING OSDFM_PALETTE_ENTRY_TITLE_STRING
#define OSDFM_PALETTE_ENTRY_GENERAL_STRING_IN_FILE_WINDOW GDI_ENTRY_4B_COLOR_WHITE
#define OSDFM_PALETTE_ENTRY_HIGHLIGHT_STRING_IN_FILE_WINDOW GDI_ENTRY_4B_COLOR_WHITE
#define OSDFM_PALETTE_ENTRY_HIGHLIGHT_BACKGROUND GDI_ENTRY_4B_COLOR_ORANGE
#define OSDFM_PALETTE_ENTRY_DISABLE_BUTTON_STRING GDI_ENTRY_4B_COLOR_TEXT_DISABLED
#define OSDFM_PALETTE_ENTRY_ENABLE_BUTTON_STRING GDI_ENTRY_4B_COLOR_WHITE
#define OSDFM_PALETTE_ENTRY_HIGHLIGHT_BUTTON_STRING GDI_ENTRY_4B_COLOR_BLACK
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -