📄 osdhandler.h
字号:
//// Copyright (c) 2005 by Istv醤 V醨adi//// This file is part of dxr3Player, a DVD player written specifically // for the DXR3 (aka Hollywood+) decoder card.// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA#ifndef OUTPUT_UNICHROME_OSDHANDLER_H#define OUTPUT_UNICHROME_OSDHANDLER_H//------------------------------------------------------------------------------#include "output/osd/CommandBasedOSDHandler.h"#include "unichrome/Font.h"#include "unichrome/Icon.h"#include "unichrome/PhysicalWindow.h"#include "sched/TimeoutArray.h"#include <inttypes.h>//------------------------------------------------------------------------------namespace unichrome {class Unichrome;}//------------------------------------------------------------------------------namespace output { namespace unichrome {//------------------------------------------------------------------------------namespace osd {class DVDInfoFrame;class VolumeFrame;class FrameTimeout;}//------------------------------------------------------------------------------/** * Unichrome OSD handler. */class OSDHandler : public output::osd::CommandBasedOSDHandler{private: /** * The background color for fields. */ static const uint32_t fieldBackgroundColor = 0x202e7680; /** * The unichrome device we are using. */ ::unichrome::Unichrome& videoDevice; /** * The normal font. */ ::unichrome::Font normalFont; /** * The frame for the DVD info display. */ osd::DVDInfoFrame* dvdInfoFrame; /** * The frame for the volume display. */ osd::VolumeFrame* volumeFrame; /** * The timeout array for the frames. */ sched::TimeoutArray frameTimeouts; public: /** * Construct the OSD handler for the given device. */ OSDHandler(::unichrome::Unichrome& videoDevice); /** * Destroy the OSD handler. */ ~OSDHandler(); /** * Disable the DVD info. If shown, it will be hidden. */ virtual void disableDVDInfo(); /** * Perform the concrete operations. */ virtual void run(); /** * Update the position. */ virtual void handleUpdateDVDPosition(const output::osd::DVDPosition& dvdPosition); /** * Update the languages */ virtual void handleUpdateDVDLanguages(unsigned audioLanguageCode, unsigned spuLanguageCode); /** * Update the volume */ virtual void handleUpdateVolume(unsigned volume); /** * Handle a simple command. */ virtual void handleSimpleCommand(output::osd::SimpleCommand::type_t type);private: /** * @see CommandBasedOSDHandler::finalizeUpdates */ virtual millis_t finalizeUpdates(); /** * @see CommandBasedOSDHandler::handleTimeout */ virtual millis_t handleTimeout(); /** * Show the DVD info frame with the given timeout. If the volume * display is visible, and its position overlaps that of the DVD info * frame, it will be hidden. */ void showDVDInfoFrame(millis_t timeout); /** * Show the volume frame with the given timeout. If the DVD info * frame is visible, it will be shown above it, otherwise it will * be shown at the bottom of the screen. */ void showVolumeFrame(millis_t timeout);};//------------------------------------------------------------------------------} /* namespace output::unichrome */ } /* namespace output *///------------------------------------------------------------------------------#endif // OUTPUT_UNICHROME_OSDHANDLER_H// Local variables:// mode: c++// End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -