vdr
2.2.0
|
#include <osd.h>
Public Member Functions | |
virtual | ~cOsd () |
bool | IsTrueColor (void) const |
int | Left (void) |
int | Top (void) |
int | Width (void) |
int | Height (void) |
void | SetAntiAliasGranularity (uint FixedColors, uint BlendColors) |
cBitmap * | GetBitmap (int Area) |
virtual cPixmap * | CreatePixmap (int Layer, const cRect &ViewPort, const cRect &DrawPort=cRect::Null) |
virtual void | DestroyPixmap (cPixmap *Pixmap) |
virtual void | DrawImage (const cPoint &Point, const cImage &Image) |
virtual void | DrawImage (const cPoint &Point, int ImageHandle) |
virtual eOsdError | CanHandleAreas (const tArea *Areas, int NumAreas) |
virtual eOsdError | SetAreas (const tArea *Areas, int NumAreas) |
virtual void | SaveRegion (int x1, int y1, int x2, int y2) |
virtual void | RestoreRegion (void) |
virtual eOsdError | SetPalette (const cPalette &Palette, int Area) |
virtual void | DrawPixel (int x, int y, tColor Color) |
virtual void | DrawBitmap (int x, int y, const cBitmap &Bitmap, tColor ColorFg=0, tColor ColorBg=0, bool ReplacePalette=false, bool Overlay=false) |
virtual void | DrawScaledBitmap (int x, int y, const cBitmap &Bitmap, double FactorX, double FactorY, bool AntiAlias=false) |
virtual void | DrawText (int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width=0, int Height=0, int Alignment=taDefault) |
virtual void | DrawRectangle (int x1, int y1, int x2, int y2, tColor Color) |
virtual void | DrawEllipse (int x1, int y1, int x2, int y2, tColor Color, int Quadrants=0) |
virtual void | DrawSlope (int x1, int y1, int x2, int y2, tColor Color, int Type) |
virtual void | Flush (void) |
Static Public Member Functions | |
static int | OsdLeft (void) |
static int | OsdTop (void) |
static int | OsdWidth (void) |
static int | OsdHeight (void) |
static void | SetOsdPosition (int Left, int Top, int Width, int Height) |
static int | IsOpen (void) |
Protected Member Functions | |
cOsd (int Left, int Top, uint Level) | |
bool | Active (void) |
virtual void | SetActive (bool On) |
cPixmap * | AddPixmap (cPixmap *Pixmap) |
cPixmap * | RenderPixmaps (void) |
Private Attributes | |
bool | isTrueColor |
cBitmap * | savedBitmap |
cBitmap * | bitmaps [MAXOSDAREAS] |
int | numBitmaps |
cPixmapMemory * | savedPixmap |
cVector< cPixmap * > | pixmaps |
int | left |
int | top |
int | width |
int | height |
uint | level |
bool | active |
Static Private Attributes | |
static int | osdLeft = 0 |
static int | osdTop = 0 |
static int | osdWidth = 0 |
static int | osdHeight = 0 |
static cVector< cOsd * > | Osds |
static cMutex | mutex |
Friends | |
class | cOsdProvider |
The cOsd class is the interface to the "On Screen Display".
An actual output device needs to derive from this class and implement the functionality necessary to display the OSD on the TV screen. If the actual OSD supports "True Color", it can either let VDR do all the rendering by calling RenderPixmaps() ("raw mode"), or it can reimplement all necessary cPixmap functions and do the rendering itself ("high level mode"). If an OSD provides a "high level mode", it shall also provide a "raw mode" in order to verify proper operation. The plugin that implements the OSD shall offer a configuration switch in its setup.
|
protected |
Initializes the OSD with the given coordinates.
By default it is assumed that the full area will be able to display full 32 bit graphics (ARGB with eight bit for each color and the alpha value, respectively). However, the actual hardware in use may not be able to display such a high resolution OSD, so there is an option to divide the full OSD area into several sub-areas with lower color depths and individual palettes. The sub-areas need not necessarily cover the entire OSD area, but only the OSD area actually covered by sub-areas will be available for drawing. At least one area must be defined in order to set the actual width and height of the OSD. Also, the caller must first try to use an area that consists of only one sub-area that covers the entire drawing space, and should require only the minimum necessary color depth. This is because a derived cOsd class may or may not be able to handle more than one area. There can be any number of cOsd objects at the same time, but only one of them will be active at any given time. The active OSD is the one with the lowest value of Level. If there are several cOsd objects with the same Level, the one that was created first will be active.
Definition at line 1647 of file osd.c.
References cPixmap::mutex.
|
virtual |
|
inlineprotected |
Definition at line 756 of file osd.h.
Referenced by cDvbSdFfOsd::Flush(), cHdffOsd::Flush(), cHdffOsdRaw::Flush(), cDvbSdFfOsd::SetActive(), cHdffOsd::SetActive(), cHdffOsdRaw::SetActive(), cHdffOsd::SetAreas(), and cHdffOsd::~cHdffOsd().
Adds the given Pixmap to the list of currently active pixmaps in this OSD.
Returns Pixmap if the operation was successful, or NULL if for some reason the pixmap could not be added to the list. A derived class that implements its own cPixmap class must call AddPixmap() in order to add a newly created pixmap to the OSD's list of pixmaps.
Definition at line 1737 of file osd.c.
References LOCK_PIXMAPS.
Checks whether the OSD can display the given set of sub-areas.
The return value indicates whether a call to SetAreas() with this set of areas will succeed. CanHandleAreas() may be called with an OSD that is already in use with other areas and will not interfere with the current operation of the OSD. A derived class must first call the base class CanHandleAreas() to check the basic conditions, like not overlapping etc.
Reimplemented in cHdffOsdRaw, cHdffOsd, and cDvbSdFfOsd.
Definition at line 1801 of file osd.c.
References MAXOSDAREAS, oeAreasOverlap, oeOk, oeTooManyAreas, and oeWrongAlignment.
Referenced by cDvbSdFfOsd::CanHandleAreas(), cHdffOsd::CanHandleAreas(), cHdffOsdRaw::CanHandleAreas(), CreateOsd(), cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cDvbSubtitleBitmaps::Draw(), cDvbSubtitleConverter::FinishPage(), and cLineGame::Show().
|
virtual |
Creates a new true color pixmap on this OSD (see cPixmap for details).
The caller must not delete the returned object, it will be deleted when the OSD is deleted. DestroyPixmap() can be called if a pixmap shall be destroyed before the OSD is deleted. If this is not a true color OSD, or if the pixmap could not be created due to limited resources, this function returns NULL.
Definition at line 1708 of file osd.c.
References cPixmapMemory::cPixmapMemory(), and LOCK_PIXMAPS.
Referenced by cTrueColorDemo::Action(), and cTrueColorDemo::CreateTextPixmap().
|
virtual |
Destroys the given Pixmap, which has previously been created by a call to CreatePixmap().
When the OSD is deleted, all pixmaps are destroyed automatically. So this function only needs to be used if a pixmap shall be destroyed while the OSD is still being used.
Definition at line 1720 of file osd.c.
References esyslog, cPixmap::Layer(), LOCK_PIXMAPS, cPixmap::MarkViewPortDirty(), and cPixmap::ViewPort().
Referenced by cHdffOsdRaw::Flush(), and cTrueColorDemo::ProcessKey().
|
virtual |
Sets the pixels in the OSD with the data from the given Bitmap, putting the upper left corner of the Bitmap at (x, y).
If ColorFg or ColorBg is given, the first palette entry of the Bitmap will be mapped to ColorBg and the second palette entry will be mapped to ColorFg (palette indexes are defined so that 0 is the background and 1 is the foreground color). ReplacePalette controls whether the target area shall have its palette replaced with the one from Bitmap. If Overlay is true, any pixel in Bitmap that has color index 0 will not overwrite the corresponding pixel in the target area. If this is a true color OSD, ReplacePalette has no meaning.
Reimplemented in cHdffOsd.
Definition at line 1922 of file osd.c.
References cPixmapMemory::DrawBitmap().
Referenced by cSkinLCARSDisplayMenu::DrawLiveIndicator(), cSkinSTTNGDisplayMenu::DrawScrollbar(), cSkinLCARSDisplayMenu::DrawScrollbar(), cSkinSTTNGDisplayTracks::SetAudioChannel(), cSkinLCARSDisplayTracks::SetAudioChannel(), cSkinSTTNGDisplayChannel::SetChannel(), cSkinLCARSDisplayChannel::SetChannel(), cSkinSTTNGDisplayReplay::SetMode(), cSkinLCARSDisplayReplay::SetMode(), cSkinClassicDisplayReplay::SetProgress(), cSkinSTTNGDisplayReplay::SetProgress(), cSkinLCARSDisplayReplay::SetProgress(), cSkinSTTNGDisplayVolume::SetVolume(), and cSkinLCARSDisplayVolume::SetVolume().
|
virtual |
Draws a filled ellipse defined by the upper left (x1, y1) and lower right (x2, y2) corners with the given Color.
Quadrants controls which parts of the ellipse are actually drawn: 0 draws the entire ellipse 1..4 draws only the first, second, third or fourth quadrant, respectively 5..8 draws the right, top, left or bottom half, respectively -1..-4 draws the inverted part of the given quadrant If Quadrants is not 0, the coordinates are those of the actual area, not the full circle!
Reimplemented in cHdffOsd.
Definition at line 1962 of file osd.c.
References cPixmapMemory::DrawEllipse().
Referenced by cSkinLCARSDisplayChannel::cSkinLCARSDisplayChannel(), cSkinLCARSDisplayReplay::cSkinLCARSDisplayReplay(), cSkinLCARSDisplayTracks::cSkinLCARSDisplayTracks(), cSkinLCARSDisplayVolume::cSkinLCARSDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), DrawDevicePosition(), DrawEllipse(), cSkinLCARSDisplayMenu::DrawLiveIndicator(), cSkinLCARSDisplayMenu::DrawMainBracket(), cSkinLCARSDisplayMenu::DrawMainButton(), cSkinLCARSDisplayMenu::DrawMainFrameLower(), cSkinLCARSDisplayMenu::DrawMainFrameUpper(), cSkinLCARSDisplayMenu::DrawMenuFrame(), cSkinSTTNGDisplayMenu::DrawScrollbar(), cSkinLCARSDisplayMenu::DrawStatusElbows(), cSkinSTTNGDisplayMenu::SetEvent(), cSkinLCARSDisplayMenu::SetEvent(), cSkinSTTNGDisplayMenu::SetItem(), cSkinLCARSDisplayMenu::SetItem(), cSkinSTTNGDisplayTracks::SetItem(), cSkinLCARSDisplayTracks::SetItem(), cSkinLCARSDisplayMessage::SetMessage(), cSkinSTTNGDisplayMenu::SetRecording(), and cSkinLCARSDisplayMenu::SetRecording().
|
virtual |
Draws the image referenced by the given ImageHandle on this OSD at the given Point.
ImageHandle must be a value that has previously been returned by a call to cOsdProvider::StoreImage(). If ImageHandle has an invalid value, nothing happens. If this is not a true color OSD, this function does nothing.
|
virtual |
Sets the pixel at the given coordinates to the given Color, which is a full 32 bit ARGB value.
If the OSD area has been divided into separate sub-areas, and the given coordinates don't fall into any of these sub-areas, no pixel will be set.
Reimplemented in cHdffOsd.
Definition at line 1912 of file osd.c.
References cPixmapMemory::DrawPixel().
|
virtual |
Draws a filled rectangle defined by the upper left (x1, y1) and lower right (x2, y2) corners with the given Color.
Reimplemented in cCursesOsd, and cHdffOsd.
Definition at line 1952 of file osd.c.
References cPixmapMemory::DrawRectangle().
Referenced by cSkinClassicDisplayMenu::Clear(), cSkinSTTNGDisplayMenu::Clear(), cSkinLCARSDisplayMenu::Clear(), cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinLCARSDisplayChannel::cSkinLCARSDisplayChannel(), cSkinLCARSDisplayReplay::cSkinLCARSDisplayReplay(), cSkinLCARSDisplayTracks::cSkinLCARSDisplayTracks(), cSkinLCARSDisplayVolume::cSkinLCARSDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cSkinLCARSDisplayMenu::DrawDevice(), DrawDeviceData(), DrawDevicePosition(), DrawDeviceSignal(), DrawEllipse(), DrawEllipses(), cSkinLCARSDisplayMenu::DrawFrameDisplay(), cSkinLCARSDisplayMenu::DrawLiveIndicator(), cSkinLCARSDisplayMenu::DrawMainBracket(), cSkinLCARSDisplayMenu::DrawMainFrameLower(), cSkinLCARSDisplayMenu::DrawMainFrameUpper(), cSkinLCARSDisplayMenu::DrawMenuFrame(), cSkinClassicDisplayMenu::DrawScrollbar(), cSkinSTTNGDisplayMenu::DrawScrollbar(), cSkinLCARSDisplayMenu::DrawScrollbar(), cSkinLCARSDisplayChannel::DrawSeen(), cSkinLCARSDisplayMenu::DrawSeen(), DrawSlope(), DrawSlopes(), cSkinLCARSDisplayMenu::DrawStatusElbows(), cSkinLCARSDisplayMenu::DrawTimer(), cSkinLCARSDisplayMenu::DrawTimers(), cSkinSTTNGDisplayChannel::Flush(), cLineGame::ProcessKey(), cSkinSTTNGDisplayTracks::SetAudioChannel(), cSkinLCARSDisplayTracks::SetAudioChannel(), cSkinSTTNGDisplayMenu::SetButtons(), cSkinClassicDisplayChannel::SetChannel(), cSkinSTTNGDisplayChannel::SetChannel(), cSkinLCARSDisplayChannel::SetChannel(), cSkinSTTNGDisplayMenu::SetEvent(), cSkinLCARSDisplayMenu::SetEvent(), cSkinClassicDisplayChannel::SetEvents(), cSkinSTTNGDisplayChannel::SetEvents(), cSkinLCARSDisplayChannel::SetEvents(), cSkinSTTNGDisplayMenu::SetItem(), cSkinLCARSDisplayMenu::SetItem(), cSkinSTTNGDisplayTracks::SetItem(), cSkinLCARSDisplayTracks::SetItem(), cSkinLCARSDisplayMenu::SetMenuCategory(), cSkinSTTNGDisplayChannel::SetMessage(), cSkinClassicDisplayMenu::SetMessage(), cSkinLCARSDisplayChannel::SetMessage(), cSkinSTTNGDisplayReplay::SetMessage(), cSkinLCARSDisplayMessage::SetMessage(), cSkinSTTNGDisplayMenu::SetRecording(), cSkinLCARSDisplayMenu::SetRecording(), cSkinLCARSDisplayMenu::SetTitle(), cSkinClassicDisplayVolume::SetVolume(), cSkinSTTNGDisplayVolume::SetVolume(), cSkinLCARSDisplayVolume::SetVolume(), cLineGame::Show(), and cTrueColorDemo::Show().
|
virtual |
Sets the pixels in the OSD with the data from the given Bitmap, putting the upper left corner of the Bitmap at (x, y) and scaled by the given factors.
If AntiAlias is true and either of the factors is greater than 1.0, anti-aliasing is applied.
Definition at line 1932 of file osd.c.
References DoubleEqual(), cPixmapMemory::DrawBitmap(), and cBitmap::Scaled().
Referenced by cDvbSubtitleBitmaps::Draw().
|
virtual |
Draws a "slope" into the rectangle defined by the upper left (x1, y1) and lower right (x2, y2) corners with the given Color.
Type controls the direction of the slope and which side of it will be drawn: 0: horizontal, rising, lower 1: horizontal, rising, upper 2: horizontal, falling, lower 3: horizontal, falling, upper 4: vertical, rising, lower 5: vertical, rising, upper 6: vertical, falling, lower 7: vertical, falling, upper
Reimplemented in cHdffOsd.
Definition at line 1972 of file osd.c.
References cPixmapMemory::DrawSlope().
Referenced by DrawSlope().
|
virtual |
Draws the given string at coordinates (x, y) with the given foreground and background color and font.
If Width and Height are given, the text will be drawn into a rectangle with the given size and the given Alignment (default is top-left). If ColorBg is clrTransparent, no background pixels will be drawn, which allows drawing "transparent" text.
Reimplemented in cCursesOsd, and cHdffOsd.
Definition at line 1942 of file osd.c.
References cPixmapMemory::DrawText().
Referenced by cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinLCARSDisplayTracks::cSkinLCARSDisplayTracks(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinLCARSDisplayChannel::DrawDate(), cSkinLCARSDisplayMenu::DrawDate(), cSkinLCARSDisplayReplay::DrawDate(), DrawDeviceData(), cSkinLCARSDisplayMenu::DrawDisk(), cSkinLCARSDisplayMenu::DrawFrameDisplay(), cSkinLCARSDisplayMenu::DrawInfo(), cSkinLCARSDisplayMenu::DrawLive(), cSkinLCARSDisplayMenu::DrawLoad(), cSkinLCARSDisplayMenu::DrawMainButton(), cSkinLCARSDisplayMenu::DrawMainFrameLower(), cSkinLCARSDisplayMenu::DrawMenuFrame(), cSkinLCARSDisplayMenu::DrawPlay(), cSkinLCARSDisplayMenu::DrawStatusElbows(), DrawTextOutlined(), cSkinLCARSDisplayMenu::DrawTimer(), cSkinLCARSDisplayMenu::DrawTimers(), cSkinClassicDisplayMenu::DrawTitle(), cSkinSTTNGDisplayMenu::DrawTitle(), cSkinLCARSDisplayChannel::DrawTrack(), cSkinLCARSDisplayReplay::DrawTrack(), cSkinClassicDisplayChannel::Flush(), cSkinSTTNGDisplayChannel::Flush(), cSkinClassicDisplayMenu::Flush(), cSkinSTTNGDisplayMenu::Flush(), cSkinClassicDisplayMenu::SetButtons(), cSkinSTTNGDisplayMenu::SetButtons(), cSkinLCARSDisplayMenu::SetButtons(), cSkinClassicDisplayChannel::SetChannel(), cSkinSTTNGDisplayChannel::SetChannel(), cSkinLCARSDisplayChannel::SetChannel(), cSkinClassicDisplayReplay::SetCurrent(), cSkinSTTNGDisplayReplay::SetCurrent(), cSkinLCARSDisplayReplay::SetCurrent(), cSkinClassicDisplayMenu::SetEvent(), cSkinSTTNGDisplayMenu::SetEvent(), cSkinLCARSDisplayMenu::SetEvent(), cSkinClassicDisplayChannel::SetEvents(), cSkinSTTNGDisplayChannel::SetEvents(), cSkinLCARSDisplayChannel::SetEvents(), cSkinClassicDisplayMenu::SetItem(), cSkinSTTNGDisplayMenu::SetItem(), cSkinClassicDisplayTracks::SetItem(), cSkinLCARSDisplayMenu::SetItem(), cSkinSTTNGDisplayTracks::SetItem(), cSkinLCARSDisplayTracks::SetItem(), cSkinClassicDisplayReplay::SetJump(), cSkinSTTNGDisplayReplay::SetJump(), cSkinLCARSDisplayReplay::SetJump(), cSkinClassicDisplayChannel::SetMessage(), cSkinSTTNGDisplayChannel::SetMessage(), cSkinClassicDisplayMenu::SetMessage(), cSkinLCARSDisplayChannel::SetMessage(), cSkinSTTNGDisplayMenu::SetMessage(), cSkinClassicDisplayReplay::SetMessage(), cSkinClassicDisplayMessage::SetMessage(), cSkinLCARSDisplayMenu::SetMessage(), cSkinSTTNGDisplayReplay::SetMessage(), cSkinSTTNGDisplayMessage::SetMessage(), cSkinLCARSDisplayReplay::SetMessage(), cSkinLCARSDisplayMessage::SetMessage(), cSkinClassicDisplayMenu::SetRecording(), cSkinSTTNGDisplayMenu::SetRecording(), cSkinLCARSDisplayMenu::SetRecording(), cSkinLCARSDisplayReplay::SetRecording(), cSkinClassicDisplayReplay::SetTitle(), cSkinLCARSDisplayMenu::SetTitle(), cSkinSTTNGDisplayReplay::SetTitle(), cSkinLCARSDisplayReplay::SetTitle(), cSkinClassicDisplayReplay::SetTotal(), cSkinSTTNGDisplayReplay::SetTotal(), cSkinLCARSDisplayReplay::SetTotal(), and cSkinClassicDisplayVolume::SetVolume().
|
virtual |
Actually commits all data to the OSD hardware.
Flush() should return as soon as possible. For a true color OSD using the default implementation with in memory pixmaps, the Flush() function should basically do something like this:
LOCK_PIXMAPS; while (cPixmapMemory *pm = dynamic_cast<cPixmapMemory *>(RenderPixmaps())) { int w = pm->ViewPort().Width(); int h = pm->ViewPort().Height(); int d = w * sizeof(tColor); MyOsdDrawPixmap(Left() + pm->ViewPort().X(), Top() + pm->ViewPort().Y(), pm->Data(), w, h, h * d); DestroyPixmap(pm); }
If a plugin uses a derived cPixmap implementation, it needs to use that type instead of cPixmapMemory.
Reimplemented in cHdffOsdRaw, cCursesOsd, cHdffOsd, and cDvbSdFfOsd.
Definition at line 1982 of file osd.c.
References cOsdProvider::images, MAXOSDIMAGES, cOsdProvider::oldAspect, cOsdProvider::oldHeight, cOsdProvider::oldWidth, cOsdProvider::osdProvider, and cOsdProvider::osdState.
Referenced by cTrueColorDemo::Action(), cPictureControl::DisplayCaption(), cDvbSubtitleBitmaps::Draw(), DrawEllipses(), DrawSlopes(), cSkinClassicDisplayChannel::Flush(), cSkinSTTNGDisplayChannel::Flush(), cSkinClassicDisplayMenu::Flush(), cSkinLCARSDisplayChannel::Flush(), cSkinSTTNGDisplayMenu::Flush(), cSkinClassicDisplayReplay::Flush(), cSkinClassicDisplayVolume::Flush(), cSkinClassicDisplayTracks::Flush(), cSkinClassicDisplayMessage::Flush(), cSkinLCARSDisplayMenu::Flush(), cSkinSTTNGDisplayReplay::Flush(), cSkinSTTNGDisplayVolume::Flush(), cSkinSTTNGDisplayTracks::Flush(), cSkinSTTNGDisplayMessage::Flush(), cSkinLCARSDisplayReplay::Flush(), cSkinLCARSDisplayVolume::Flush(), cSkinLCARSDisplayTracks::Flush(), cSkinLCARSDisplayMessage::Flush(), cLineGame::ProcessKey(), cLineGame::Show(), and cTrueColorDemo::Show().
cBitmap * cOsd::GetBitmap | ( | int | Area | ) |
Returns a pointer to the bitmap for the given Area, or NULL if no such bitmap exists.
If this is a true color OSD, a pointer to a dummy bitmap with 8bpp is returned. This is done so that skins that call this function in order to preset the bitmap's palette won't crash. Use of this function outside of derived classes is deprecated and it may be made 'protected' in a future version.
Definition at line 1703 of file osd.c.
Referenced by cDvbSdFfOsd::Flush(), cHdffOsd::Flush(), cHdffOsdRaw::Flush(), cDvbSdFfOsd::SetActive(), cHdffOsd::SetActive(), cHdffOsdRaw::SetActive(), cDvbSdFfOsd::SetAreas(), and cHdffOsd::SetAreas().
|
inline |
Definition at line 803 of file osd.h.
References cPalette::Color(), DrawEllipse(), DrawSlope(), Font, cRect::Null, cPalette::SetAntiAliasGranularity(), and taDefault.
Referenced by cTrueColorDemo::Action(), cDvbSdFfOsd::CanHandleAreas(), cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), DrawEllipses(), cSkinCursesDisplayMenu::DrawScrollbar(), DrawSlopes(), cDvbSdFfOsd::Flush(), cLineGame::ProcessKey(), cSkinClassicDisplayChannel::SetEvents(), cSkinClassicDisplayVolume::SetVolume(), cLineGame::Show(), and cTrueColorDemo::Show().
|
inlinestatic |
Returns true if there is currently a level 0 OSD open.
Definition at line 795 of file osd.h.
References OSD_LEVEL_DEFAULT, and cVector< T >::Size().
Referenced by main(), cOsdProvider::NewOsd(), and cReplayControl::ShowMode().
|
inline |
Returns 'true' if this is a true color OSD (providing full 32 bit color depth).
Definition at line 797 of file osd.h.
Referenced by cHdffOsdRaw::Flush().
|
inline |
Definition at line 800 of file osd.h.
Referenced by cHdffOsd::cHdffOsd(), cDvbSdFfOsd::Flush(), and cHdffOsdRaw::Flush().
|
inlinestatic |
Definition at line 789 of file osd.h.
References cSetup::OSDHeight, and Setup.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinLCARSDisplayChannel::cSkinLCARSDisplayChannel(), cSkinLCARSDisplayMenu::cSkinLCARSDisplayMenu(), cSkinLCARSDisplayMessage::cSkinLCARSDisplayMessage(), cSkinLCARSDisplayReplay::cSkinLCARSDisplayReplay(), cSkinLCARSDisplayTracks::cSkinLCARSDisplayTracks(), cSkinLCARSDisplayVolume::cSkinLCARSDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cTrueColorDemo::SetArea(), and cLineGame::Show().
|
inlinestatic |
Definition at line 786 of file osd.h.
References cSetup::OSDLeft, and Setup.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinLCARSDisplayChannel::cSkinLCARSDisplayChannel(), cSkinLCARSDisplayMenu::cSkinLCARSDisplayMenu(), cSkinLCARSDisplayMessage::cSkinLCARSDisplayMessage(), cSkinLCARSDisplayReplay::cSkinLCARSDisplayReplay(), cSkinLCARSDisplayTracks::cSkinLCARSDisplayTracks(), cSkinLCARSDisplayVolume::cSkinLCARSDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cLineGame::Show(), and cTrueColorDemo::Show().
|
inlinestatic |
Definition at line 787 of file osd.h.
References cSetup::OSDTop, and Setup.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinLCARSDisplayChannel::cSkinLCARSDisplayChannel(), cSkinLCARSDisplayMenu::cSkinLCARSDisplayMenu(), cSkinLCARSDisplayMessage::cSkinLCARSDisplayMessage(), cSkinLCARSDisplayReplay::cSkinLCARSDisplayReplay(), cSkinLCARSDisplayTracks::cSkinLCARSDisplayTracks(), cSkinLCARSDisplayVolume::cSkinLCARSDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cLineGame::Show(), and cTrueColorDemo::Show().
|
inlinestatic |
Definition at line 788 of file osd.h.
References cSetup::OSDWidth, and Setup.
Referenced by cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinLCARSDisplayChannel::cSkinLCARSDisplayChannel(), cSkinLCARSDisplayMenu::cSkinLCARSDisplayMenu(), cSkinLCARSDisplayMessage::cSkinLCARSDisplayMessage(), cSkinLCARSDisplayReplay::cSkinLCARSDisplayReplay(), cSkinLCARSDisplayVolume::cSkinLCARSDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cTrueColorDemo::SetArea(), cSkinClassicDisplayMessage::SetMessage(), and cLineGame::Show().
|
protected |
Renders the dirty part of all pixmaps into a resulting pixmap that shall be displayed on the OSD.
The returned pixmap's view port is set to the location of the rectangle on the OSD that needs to be refreshed; its draw port's origin is at (0, 0), and it has the same size as the view port. Only pixmaps with a non-negative layer value are rendered. If there are several non-overlapping dirty rectangles from different pixmaps, they are returned separately in order to avoid re-rendering large parts of the OSD that haven't changed at all. The caller must therefore call RenderPixmaps() repeatedly until it returns NULL, and display the returned parts of the OSD at their appropriate locations. During this entire operation the caller must hold a lock on the cPixmap mutex (for instance by putting a LOCK_PIXMAPS into the scope of the operation). If there are no dirty pixmaps, or if this is not a true color OSD, this function returns NULL. The caller must call DestroyPixmap() for the returned pixmap after use.
Definition at line 1750 of file osd.c.
References cPixmap::Clear(), cRect::Combine(), cPixmap::DrawPixmap(), cPixmap::DrawPort(), cPixmapMemory::Fill(), cRect::Intersects(), cRect::IsEmpty(), cPixmap::Layer(), LOCK_PIXMAPS, MAXPIXMAPLAYERS, cRect::Point(), cPixmap::Render(), cPoint::Shifted(), and cPixmap::ViewPort().
Referenced by cHdffOsdRaw::Flush().
|
virtual |
Restores the region previously saved by a call to SaveRegion().
If SaveRegion() has not been called before, nothing will happen.
Reimplemented in cCursesOsd, and cHdffOsd.
Definition at line 1871 of file osd.c.
References cPixmapMemory::DrawBitmap().
Referenced by cSkinClassicDisplayChannel::SetMessage(), cSkinSTTNGDisplayChannel::SetMessage(), cSkinLCARSDisplayChannel::SetMessage(), cSkinSTTNGDisplayMenu::SetMessage(), cSkinClassicDisplayReplay::SetMessage(), cSkinLCARSDisplayMenu::SetMessage(), cSkinSTTNGDisplayReplay::SetMessage(), and cSkinLCARSDisplayReplay::SetMessage().
|
virtual |
Saves the region defined by the given coordinates for later restoration through RestoreRegion().
Only one saved region can be active at any given time.
Reimplemented in cCursesOsd, and cHdffOsd.
Definition at line 1855 of file osd.c.
References cPixmapMemory::cPixmapMemory().
Referenced by cSkinClassicDisplayChannel::SetMessage(), cSkinSTTNGDisplayChannel::SetMessage(), cSkinLCARSDisplayChannel::SetMessage(), cSkinSTTNGDisplayMenu::SetMessage(), cSkinClassicDisplayReplay::SetMessage(), cSkinLCARSDisplayMenu::SetMessage(), cSkinSTTNGDisplayReplay::SetMessage(), and cSkinLCARSDisplayReplay::SetMessage().
|
inlineprotectedvirtual |
Sets this OSD to be the active one.
A derived class must call cOsd::SetActive(On).
Reimplemented in cHdffOsdRaw, cHdffOsd, and cDvbSdFfOsd.
Definition at line 757 of file osd.h.
Referenced by cOsdProvider::NewOsd(), cDvbSdFfOsd::SetActive(), cHdffOsd::SetActive(), and cHdffOsdRaw::SetActive().
void cOsd::SetAntiAliasGranularity | ( | uint | FixedColors, |
uint | BlendColors | ||
) |
Allows the system to optimize utilization of the limited color palette entries when generating blended colors for anti-aliasing.
FixedColors is the maximum number of colors used, and BlendColors is the maximum number of foreground/background color combinations used with anti-aliasing. If this function is not called with useful values, the palette may be filled up with many shades of a single color combination, and may not be able to serve all requested colors. By default the palette assumes there will be 10 fixed colors and 10 color combinations. If this is a true color OSD, this function does nothing.
Definition at line 1695 of file osd.c.
Referenced by CreateOsd().
Sets the sub-areas to the given areas.
The return value indicates whether the operation was successful. If an error is reported, nothing will have changed and the previous OSD (if any) will still be displayed as before. If the OSD has been divided into several sub-areas, all areas that are part of the rectangle that surrounds a given drawing operation will be drawn into, with the proper offsets. A new call overwrites any previous settings To set up a true color OSD, exactly one area must be requested, with its coordinates set to the full area the OSD shall cover, and the bpp value set to 32.
Reimplemented in cHdffOsdRaw, cHdffOsd, and cDvbSdFfOsd.
Definition at line 1823 of file osd.c.
References tArea::bpp, cPixmap::Clear(), esyslog, max(), oeOk, oeUnknown, OsdErrorTexts, tArea::x1, tArea::x2, tArea::y1, and tArea::y2.
Referenced by CreateOsd(), cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(), cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(), cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(), cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(), cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(), cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(), cSkinSTTNGDisplayMenu::cSkinSTTNGDisplayMenu(), cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage(), cSkinSTTNGDisplayReplay::cSkinSTTNGDisplayReplay(), cSkinSTTNGDisplayTracks::cSkinSTTNGDisplayTracks(), cSkinSTTNGDisplayVolume::cSkinSTTNGDisplayVolume(), cPictureControl::DisplayCaption(), cDvbSubtitleBitmaps::Draw(), cTrueColorDemo::SetArea(), cDvbSdFfOsd::SetAreas(), cHdffOsd::SetAreas(), cHdffOsdRaw::SetAreas(), and cLineGame::Show().
|
static |
Sets the position and size of the OSD to the given values.
This may be useful for plugins that determine the scaling of the video image and need to scale the OSD accordingly to fit on the screen.
Definition at line 1687 of file osd.c.
References constrain(), MAXOSDHEIGHT, MAXOSDWIDTH, MINOSDHEIGHT, and MINOSDWIDTH.
|
inline |
Definition at line 801 of file osd.h.
Referenced by cHdffOsd::cHdffOsd(), cSkinCursesDisplayMenu::DrawScrollbar(), cDvbSdFfOsd::Flush(), and cHdffOsdRaw::Flush().
|
inline |
Definition at line 802 of file osd.h.
Referenced by cTrueColorDemo::Action(), cDvbSdFfOsd::CanHandleAreas(), cTrueColorDemo::CreateTextPixmap(), cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(), DrawEllipses(), DrawSlopes(), cDvbSdFfOsd::Flush(), cSkinClassicDisplayChannel::Flush(), cLineGame::ProcessKey(), cSkinClassicDisplayChannel::SetChannel(), cSkinClassicDisplayChannel::SetEvents(), cSkinClassicDisplayChannel::SetMessage(), cSkinClassicDisplayVolume::SetVolume(), cLineGame::Show(), and cTrueColorDemo::Show().
|
friend |
|
private |
|
private |
Definition at line 732 of file osd.h.
Referenced by cHdffOsd::DrawBitmap(), and cHdffOsdRaw::Flush().
|
private |
|
private |
Definition at line 732 of file osd.h.
Referenced by cHdffOsd::DrawBitmap(), and cHdffOsdRaw::Flush().