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

📄 osdnd.c

📁 ct952 source code use for Digital Frame Photo
💻 C
📖 第 1 页 / 共 5 页
字号:
#define OSDND_MAIN_FILE#include "winav.h"#include "ctkav.h"#include "infofilter.h"#include "osd.h"#include "gdi.h"
#include "fontindex.h" //++CoCo2.37P
#include "osddsply.h"#include "osdnd.h"#include "cc.h"#include "hal.h"#include "setup.h"#include "chips.h"#include "utl.h"#include "navigate.h"#include "haljpeg.h"#include "dvdinfo.h"#include "initial.h"#include "disp.h"#include "haljpeg.h"#include "mmanager.h"#include "navigate.h"// wyc1.21-909, #include "media.h"
#include "notransl.h"#define OSDND_MAIN_FILE//#include "string.lan"
#include "OSDString\\strextrn.h"PARM_DRAW_STRING __OSDNDUpMsgAttr;PARM_DRAW_STRING __OSDNDBottomMsgAttr;PARM_DRAW_STRING __OSDNDTempStringAttr;PARM_FRAME _OSDNDFrame;BYTE _bOSDNDMsg;WORD _wOSDNDInfo;BYTE _bOSDNDTemp;WORD _wOSDNDTemp;DWORD _dwOSDNDTemp, _dwOSDNDTemp1;WORD _wOSDNDHPos;PARM_RECT _OSDNDRect;PARM_VOLUME_BAR _OSDNDVolumeBar;BYTE __bOSDUTLIndex;WORD *__pOSDUTLOutputString;WORD __wOSDUTLStringBuf[OSDUTL_STRING_LENGTH+1];extern BYTE __bSurround;

WORD aSPACE[] = {1, CHAR_SPACE};//CoCo.CT909, add it for linkage issue. Will remove them.BYTE __bOSDFg;BYTE __bOSDBg;WORD __wOSDUpVPos;WORD __wOSDUpHPos;WORD __wOSDBottomVPos;WORD __wOSDBottomHPos;WIN_COLOR _OSDNDZoomPIPColor;//CoCo1.07, the variables for displaying progress bar.WORD __wProgressTotal;WORD __wProgressCurrent;extern WORD __wJPEGFMTExifImageWidth;extern WORD __wJPEGFMTExifImageHeight;extern CHAR __cJPEGFMTExifDate[11];extern DWORD	__dwPicHSize;extern DWORD	__dwPicVSize;extern WORD    __wHCW, __wVCW;extern SHORT   __wXStart, __wYStart;extern BYTE _bOSDCurrentUI;extern BYTE    __bChooseMedia; //0==>CDROM/DVDROM, 1==>USB//***************************************************************************//  Function    :   OSDND_GetMessagePos//  Abstract    :   Call this function to get the type of the message.//  Arguments   :   bMessage: the message.//  Return		:   OSD_ND_UPPER_RIGHT_REGION: The upper right message.//              :   OSD_ND_BOTTOM_REGION: The bottom message.//              :   OSDND_UNKNOWN_REGION: unknown region.//  Side Effect :   none.//  Notes       :   //***************************************************************************BYTE OSDND_GetMessagePos(BYTE bMessage){    switch (bMessage)    {    case MSG_DISCTYPE:    case MSG_WAITING:     case MSG_OPEN:    case MSG_NEXT:    case MSG_PREV:    case MSG_RETURN:    case MSG_PLAYING:    case MSG_STOP:    case MSG_PAUSE:    case MSG_FAST:    case MSG_STEP:    case MSG_FREEZE:    case MSG_REPEAT:    case MSG_REPEATAB:    case MSG_RANDOM:    case MSG_PBC:    case MSG_TVMODE:    case MSG_RESUME:    case MSG_MENU:
        /*#ifndef SUPPORT_GRAPH_ZOOM    case MSG_ZOOM:#endif
    */
    case MSG_ZOOM_TEXT:    case MSG_VIDEO_OUTPUT:    case MSG_SCANFORWARD:    case MSG_SCANBACKWARD:    case MSG_SLOW:            case MSG_INVALID:    //case MSG_TRACK:    case MSG_NUMBER:    case MSG_VOCAL:    case MSG_AUTOVOCAL:    //case MSG_VOICECANCEL:    case MSG_KARAOKE:    case MSG_ROTATE:    case MSG_FLIP:    case MSG_JPEG_EFFECT:    case MSG_ABSTIME:    case MSG_RELTIME:    case MSG_REMAIN_ABSTIME:    case MSG_REMAIN_RELTIME:    case MSG_TITLE_TIME:    case MSG_REMAIN_TITLE_TIME:    case MSG_CHAPTER_TIME:    case MSG_REMAIN_CHAPTER_TIME:    case MSG_KEY10:    case MSG_PSCAN:    case MSG_STRING:    case MSG_VERSION:    case MSG_ERRCODE:    case MSG_ABNORMAL_DISC:    case MSG_SELECTIONLIST: #ifdef  SUPPORT_PROGRAM_PLAY_INFO	case MSG_PROGRAM_PLAY:#endif //SUPPORT_PROGRAM_PLAY_INFO	case MSG_INTRO:	case MSG_FULLSCREEN:
    case MSG_NO_PLAYABLE_FILE:
    case MSG_BROWSE_MODE:        return OSD_ND_UPPER_RIGHT_REGION;    //The bottom message    case MSG_AUDIO:    case MSG_VOLUME:    case MSG_MUTE:    case MSG_KEY:    case MSG_ECHO:    case MSG_SURROUND:    case MSG_3D:    case MSG_ANGLE_CTL:    case MSG_SOUND_EFFECT:    case MSG_AST_CTL:    case MSG_SPST_CTL:	case MSG_AUDIO_OUTPUT_CTL:    case MSG_PROGRESS: //CoCo1.10, support progress bar        return OSD_ND_BOTTOM_REGION;#ifdef SUPPORT_GRAPH_ZOOM    case MSG_ZOOM:        return OSD_ND_RIGHT_BOTTOM_REGION;#endif    default:        return OSD_ND_UNKNOWN_REGION;    }   }//***************************************************************************//  Function    :   OSDND_Update//  Abstract    :   This fnction is called by OSD to show normal upper message//              :   or normal bottom message.//  Arguments   :   bMessage: the message.//              :   wParam: The parameter for the message. //  Return		:   TRUE: The message has been showed.//              :   FALSE: The message is not processed by normal display.//  Side Effect :   none.//  Notes       :   //***************************************************************************BYTE OSDND_Update(BYTE bMessage, WORD wParam){    _bOSDNDMsg = bMessage;    _wOSDNDInfo = wParam;        if (OSDND_GetMessagePos(bMessage) == OSD_ND_UPPER_RIGHT_REGION)    {        _OSDND_ShowUpperRightMessage();    }    else if (OSDND_GetMessagePos(bMessage) == OSD_ND_BOTTOM_REGION)    {        _OSDND_ShowBottomMessage();    }        else    {        switch (bMessage)        {        case MSG_DEFAULT_STATE:            _OSDND_DefaultState();            break;        case MSG_INITIAL_PALETTE:                    _OSDND_InitializeGDI();            break;#ifdef SUPPORT_GRAPH_ZOOM        case MSG_ZOOM:            _OSDND_ShowZoom();            break;#endif        default:                        return FALSE;        }    }    GDI_ActivateRegion(0);    return TRUE;}//***************************************************************************//  Function    :   _OSDND_ShowUpperRightMessage//  Abstract    :   Show upper-right message.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_ShowUpperRightMessage(void){    switch (_bOSDNDMsg)    {    case MSG_DISCTYPE:        if (__wDiscType == NO_DISC_IN_DRIVE)        {            // wyc1.21-909, use new define.            if (__bChooseMedia != MEDIA_SELECT_DVD) //0==>CDROM/DVDROM, 1==>USB            {                __pOSDUTLOutputString = aNDNoUSBDevice;            }            else            {                __pOSDUTLOutputString = aNDNoDisc;            }        }        else
        {
#ifdef SUPPORT_PLAY_MEDIA_DIRECTLY_POWER_ON
            if (__bMMPlayMediaDirectlyMode == TRUE)
            {
                return;
            }
            else
#endif //#ifdef SUPPORT_PLAY_MEDIA_DIRECTLY_POWER_ON
            {                _OSDND_ShowDiscType();
            }
        }        break;    case MSG_WAITING:        _OSDND_ShowWaitingState();        break;    case MSG_OPEN:    case MSG_NEXT:    case MSG_PREV:    case MSG_RETURN:    case MSG_PLAYING:    case MSG_STOP:    case MSG_PAUSE:    case MSG_FAST:    case MSG_STEP:    case MSG_FREEZE:    case MSG_REPEAT:    case MSG_REPEATAB:    case MSG_RANDOM:    case MSG_PBC:    case MSG_TVMODE:    case MSG_RESUME:    case MSG_MENU:
        /*#ifndef SUPPORT_GRAPH_ZOOM    case MSG_ZOOM:#endif
    */
    case MSG_ZOOM_TEXT:    case MSG_VIDEO_OUTPUT:    case MSG_VOCAL:    case MSG_AUTOVOCAL:    //case MSG_VOICECANCEL:    case MSG_KARAOKE:     case MSG_INVALID:    case MSG_SCANFORWARD:    case MSG_SCANBACKWARD:    case MSG_SLOW:    case MSG_JPEG_EFFECT:    case MSG_ROTATE:    case MSG_FLIP:    case MSG_PSCAN:	case MSG_INTRO:        _OSDND_OutputKeyString();        break;     case MSG_ABNORMAL_DISC:        _OSDND_OutputErrorDisc();        break;    case MSG_KEY10:        _OSDND_Show10Plus();        break;      //case MSG_TRACK:    case MSG_NUMBER:        OSDUTL_PrepareOutputString();        OSDUTL_OutputNumFromIndex(_wOSDNDInfo);        break;    case MSG_SELECTIONLIST:        _OSDND_ShowSelection();        break;    //show time    case MSG_RELTIME:    case MSG_REMAIN_ABSTIME:    case MSG_REMAIN_RELTIME:    case MSG_TITLE_TIME:    case MSG_REMAIN_TITLE_TIME:    case MSG_CHAPTER_TIME:    case MSG_REMAIN_CHAPTER_TIME:        _OSDND_ShowTime();        break;    case MSG_STRING:        _OSDND_ShowString();        break;    case MSG_VERSION:        // will show "VER xxxxx"    case MSG_ERRCODE:        // will show "ERR xxx"        _OSDND_ShowDebugNum();        break;#ifdef  SUPPORT_PROGRAM_PLAY_INFO	case MSG_PROGRAM_PLAY: 		__pOSDUTLOutputString = aNDProgramPlay;		break;#endif //SUPPORT_PROGRAM_PLAY_INFO        /*#ifdef SUPPORT_GRAPH_ZOOM    case MSG_ZOOM:        _OSDND_ShowZoom();        return;#endif        */
    case MSG_NO_PLAYABLE_FILE:
        __pOSDUTLOutputString = aNDNoPlayableFile;
        break;
    case MSG_BROWSE_MODE:
#ifdef SUPPORT_PHOTO_BROWSE_MODE
        __pOSDUTLOutputString = aNDBrowseMode;
#endif //SUPPORT_PHOTO_BROWSE_MODE
        break;    default:        return;    }    _OSDND_OutputUpString();}//***************************************************************************//  Function    :   _OSDND_OutputUpString//  Abstract    :   This function will update the horizontal position to output the string.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_OutputUpString(void){    WORD wBackupStringWidth;    wBackupStringWidth = __OSDNDUpMsgAttr.wX;    __OSDNDUpMsgAttr.wX -= GDI_GetStringWidth_909(__pOSDUTLOutputString);    GDI_DrawString_909(0, &__OSDNDUpMsgAttr, __pOSDUTLOutputString);    __OSDNDUpMsgAttr.wX = wBackupStringWidth; //recover the horizontal position.}//***************************************************************************//  Function    :   _OSDND_OutputBottomString//  Abstract    :   //  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_OutputBottomString(void){    GDI_DrawString_909(0, &__OSDNDBottomMsgAttr, __pOSDUTLOutputString);}//***************************************************************************//  Function    :   _OSDND_ShowBottomMessage//  Abstract    :   //  Arguments   :   bMessage: the message.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_ShowBottomMessage(void){    switch (_bOSDNDMsg)    {    case MSG_AUDIO:        _OSDND_ShowAudio();        break;    case MSG_VOLUME:        _OSDND_ShowVolume();        return;    case MSG_MUTE:        __OSDNDTempStringAttr.bTextColor = __OSDNDBottomMsgAttr.bTextColor;        __OSDNDTempStringAttr.bShadow1 = __OSDNDBottomMsgAttr.bShadow1;        __OSDNDTempStringAttr.bShadow2 = __OSDNDBottomMsgAttr.bShadow2;        if (_wOSDNDInfo)        {            __OSDNDBottomMsgAttr.bTextColor = OSDND_PALETTE_ENTRY_MUTE_ICON_TEXT_FOREGROUND;            __OSDNDBottomMsgAttr.bShadow1 = OSDND_PALETTE_ENTRY_MUTE_ICON_SHADOW_1;            __OSDNDBottomMsgAttr.bShadow2 = OSDND_PALETTE_ENTRY_MUTE_ICON_SHADOW_2;            __pOSDUTLOutputString = aNDMuteIcon;        }        else        {            __OSDNDBottomMsgAttr.bTextColor = OSDND_PALETTE_ENTRY_MUTEOFF_ICON_TEXT_FOREGROUND;            __OSDNDBottomMsgAttr.bShadow1 = OSDND_PALETTE_ENTRY_MUTEOFF_ICON_SHADOW_1;            __OSDNDBottomMsgAttr.bShadow2 = OSDND_PALETTE_ENTRY_MUTEOFF_ICON_SHADOW_2;            __pOSDUTLOutputString = aNDMuteOffIcon;        }        break;	case MSG_AUDIO_OUTPUT_CTL:		_OSDND_ShowAudioOutput();		break;    case MSG_KEY:        _OSDND_ShowAudioKeyControl();

⌨️ 快捷键说明

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