vdr
1.7.27
|
#include <osd.h>
Public Member Functions | |
cOsdProvider (void) | |
virtual | ~cOsdProvider () |
cOsdProvider (void) | |
virtual | ~cOsdProvider () |
Static Public Member Functions | |
static cOsd * | NewOsd (int Left, int Top, uint Level=OSD_LEVEL_DEFAULT) |
static void | UpdateOsdSize (bool Force=false) |
static bool | SupportsTrueColor (void) |
static int | StoreImage (const cImage &Image) |
static void | DropImage (int ImageHandle) |
static void | Shutdown (void) |
static cOsd * | NewOsd (int Left, int Top, uint Level=OSD_LEVEL_DEFAULT) |
static void | UpdateOsdSize (bool Force=false) |
static bool | SupportsTrueColor (void) |
static int | StoreImage (const cImage &Image) |
static void | DropImage (int ImageHandle) |
static void | Shutdown (void) |
Protected Member Functions | |
virtual cOsd * | CreateOsd (int Left, int Top, uint Level)=0 |
virtual bool | ProvidesTrueColor (void) |
virtual int | StoreImageData (const cImage &Image) |
virtual void | DropImageData (int ImageHandle) |
virtual cOsd * | CreateOsd (int Left, int Top, uint Level)=0 |
virtual bool | ProvidesTrueColor (void) |
virtual int | StoreImageData (const cImage &Image) |
virtual void | DropImageData (int ImageHandle) |
Static Protected Member Functions | |
static const cImage * | GetImageData (int ImageHandle) |
static const cImage * | GetImageData (int ImageHandle) |
Static Private Attributes | |
static cOsdProvider * | osdProvider = NULL |
static int | oldWidth = 0 |
static int | oldHeight = 0 |
static double | oldAspect = 1.0 |
static cImage * | images [MAXOSDIMAGES] = { NULL } |
Friends | |
class | cPixmapMemory |
Definition at line 928 of file include/vdr/osd.h.
cOsdProvider::cOsdProvider | ( | void | ) |
Definition at line 1943 of file osd.c.
References osdProvider.
cOsdProvider::~cOsdProvider | ( | ) | [virtual] |
Definition at line 1949 of file osd.c.
References osdProvider.
cOsdProvider::cOsdProvider | ( | void | ) |
virtual cOsdProvider::~cOsdProvider | ( | ) | [virtual] |
virtual cOsd* cOsdProvider::CreateOsd | ( | int | Left, |
int | Top, | ||
uint | Level | ||
) | [protected, pure virtual] |
Returns a pointer to a newly created cOsd object, which will be located at the given coordinates.
Implemented in cHdffOsdProvider, and cDvbOsdProvider.
Referenced by NewOsd().
virtual cOsd* cOsdProvider::CreateOsd | ( | int | Left, |
int | Top, | ||
uint | Level | ||
) | [protected, pure virtual] |
Returns a pointer to a newly created cOsd object, which will be located at the given coordinates.
Implemented in cHdffOsdProvider, and cDvbOsdProvider.
void cOsdProvider::DropImage | ( | int | ImageHandle | ) | [static] |
Drops the image referenced by the given ImageHandle.
If ImageHandle has an invalid value, nothing happens.
Definition at line 2045 of file osd.c.
References DropImageData(), and osdProvider.
static void cOsdProvider::DropImage | ( | int | ImageHandle | ) | [static] |
Drops the image referenced by the given ImageHandle.
If ImageHandle has an invalid value, nothing happens.
void cOsdProvider::DropImageData | ( | int | ImageHandle | ) | [protected, virtual] |
Drops the image data referenced by ImageHandle.
Definition at line 2021 of file osd.c.
References images, LOCK_PIXMAPS, and MAXOSDIMAGES.
Referenced by DropImage().
virtual void cOsdProvider::DropImageData | ( | int | ImageHandle | ) | [protected, virtual] |
Drops the image data referenced by ImageHandle.
static const cImage* cOsdProvider::GetImageData | ( | int | ImageHandle | ) | [static, protected] |
Gets the image data referenced by ImageHandle.
const cImage * cOsdProvider::GetImageData | ( | int | ImageHandle | ) | [static, protected] |
Gets the image data referenced by ImageHandle.
Definition at line 2030 of file osd.c.
References images, LOCK_PIXMAPS, and MAXOSDIMAGES.
Referenced by cPixmapMemory::DrawImage().
static cOsd* cOsdProvider::NewOsd | ( | int | Left, |
int | Top, | ||
uint | Level = OSD_LEVEL_DEFAULT |
||
) | [static] |
Returns a pointer to a newly created cOsd object, which will be located at the given coordinates.
When the cOsd object is no longer needed, the caller must delete it. If the OSD is already in use, or there is no OSD provider, a dummy OSD is returned so that the caller may always use the returned pointer without having to check it every time it is accessed.
cOsd * cOsdProvider::NewOsd | ( | int | Left, |
int | Top, | ||
uint | Level = OSD_LEVEL_DEFAULT |
||
) | [static] |
Returns a pointer to a newly created cOsd object, which will be located at the given coordinates.
When the cOsd object is no longer needed, the caller must delete it. If the OSD is already in use, or there is no OSD provider, a dummy OSD is returned so that the caller may always use the returned pointer without having to check it every time it is accessed.
Definition at line 1954 of file osd.c.
References CreateOsd(), esyslog, cOsd::IsOpen(), OSD_LEVEL_DEFAULT, osdProvider, cOsd::SetActive(), and cVector< T >::Size().
Referenced by cDvbSubtitleConverter::AssertOsd(), 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(), cDvbSpuDecoder::Draw(), cLineGame::Show(), and cTrueColorDemo::Show().
virtual bool cOsdProvider::ProvidesTrueColor | ( | void | ) | [inline, protected, virtual] |
Returns true if this OSD provider is able to handle a true color OSD.
Reimplemented in cHdffOsdProvider.
Definition at line 940 of file include/vdr/osd.h.
Referenced by SupportsTrueColor().
virtual bool cOsdProvider::ProvidesTrueColor | ( | void | ) | [inline, protected, virtual] |
Returns true if this OSD provider is able to handle a true color OSD.
Reimplemented in cHdffOsdProvider.
void cOsdProvider::Shutdown | ( | void | ) | [static] |
Shuts down the OSD provider facility by deleting the current OSD provider.
Definition at line 2051 of file osd.c.
References osdProvider.
Referenced by main().
static void cOsdProvider::Shutdown | ( | void | ) | [static] |
Shuts down the OSD provider facility by deleting the current OSD provider.
int cOsdProvider::StoreImage | ( | const cImage & | Image | ) | [static] |
Stores the given Image for later use with DrawImage() on an OSD or pixmap.
The returned number is a handle that must be used when referencing this image in a call to DrawImage() or DropImage(). The image data is copied, so any later changes to Image will have no effect on the stored image. A derived class may be able to copy frequently used images to some space where they can be retrieved faster than using a cImage in each call. If this is not a true color OSD, or if the image data can't be stored for any reason, this function returns 0 and nothing is stored.
Definition at line 2038 of file osd.c.
References osdProvider, and StoreImageData().
static int cOsdProvider::StoreImage | ( | const cImage & | Image | ) | [static] |
Stores the given Image for later use with DrawImage() on an OSD or pixmap.
The returned number is a handle that must be used when referencing this image in a call to DrawImage() or DropImage(). The image data is copied, so any later changes to Image will have no effect on the stored image. A derived class may be able to copy frequently used images to some space where they can be retrieved faster than using a cImage in each call. If this is not a true color OSD, or if the image data can't be stored for any reason, this function returns 0 and nothing is stored.
virtual int cOsdProvider::StoreImageData | ( | const cImage & | Image | ) | [protected, virtual] |
Copies the given Image and returns a handle for later reference.
A derived class can implement its own image storing mechanism by reimplementing this function as well as DropImageData(). The base class implementation simply copies the image data to allow plugins to always use this interface, no matter if the actual device provides support for storing image data or not. The handles returned by the default implementation are positive integers. A derived class might want to use negative integers as handles, so that it can fall back to using the base class image storing mechanism if, e.g., it runs out of memory.
int cOsdProvider::StoreImageData | ( | const cImage & | Image | ) | [protected, virtual] |
Copies the given Image and returns a handle for later reference.
A derived class can implement its own image storing mechanism by reimplementing this function as well as DropImageData(). The base class implementation simply copies the image data to allow plugins to always use this interface, no matter if the actual device provides support for storing image data or not. The handles returned by the default implementation are positive integers. A derived class might want to use negative integers as handles, so that it can fall back to using the base class image storing mechanism if, e.g., it runs out of memory.
Definition at line 2009 of file osd.c.
References images, LOCK_PIXMAPS, and MAXOSDIMAGES.
Referenced by StoreImage().
static bool cOsdProvider::SupportsTrueColor | ( | void | ) | [static] |
Returns true if the current OSD provider is able to handle a true color OSD.
bool cOsdProvider::SupportsTrueColor | ( | void | ) | [static] |
Returns true if the current OSD provider is able to handle a true color OSD.
Definition at line 1999 of file osd.c.
References esyslog, osdProvider, and ProvidesTrueColor().
Referenced by cPluginOsddemo::MainMenuAction().
static void cOsdProvider::UpdateOsdSize | ( | bool | Force = false | ) | [static] |
Inquires the actual size of the video display and adjusts the OSD and font sizes accordingly.
If Force is true, all settings are recalculated, even if the video resolution hasn't changed since the last call to this function.
void cOsdProvider::UpdateOsdSize | ( | bool | Force = false | ) | [static] |
Inquires the actual size of the video display and adjusts the OSD and font sizes accordingly.
If Force is true, all settings are recalculated, even if the video resolution hasn't changed since the last call to this function.
Definition at line 1974 of file osd.c.
References DoubleEqual(), dsyslog, fontFix, cSetup::FontFix, cSetup::FontFixSize, cSetup::FontFixSizeP, fontOsd, cSetup::FontOsd, cSetup::FontOsdSize, cSetup::FontOsdSizeP, cSetup::FontSml, cSetup::FontSmlSize, cSetup::FontSmlSizeP, cDevice::GetOsdSize(), oldAspect, oldHeight, oldWidth, cSetup::OSDAspect, cSetup::OSDHeight, cSetup::OSDHeightP, cSetup::OSDLeft, cSetup::OSDLeftP, cSetup::OSDTop, cSetup::OSDTopP, cSetup::OSDWidth, cSetup::OSDWidthP, cDevice::PrimaryDevice(), cFont::SetFont(), and Setup.
Referenced by main(), cMenuSetupOSD::ProcessKey(), and cMenuSetupBase::Store().
cPixmapMemory [friend] |
Definition at line 929 of file include/vdr/osd.h.
static cImage * cOsdProvider::images = { NULL } [static, private] |
Definition at line 935 of file include/vdr/osd.h.
Referenced by DropImageData(), GetImageData(), and StoreImageData().
static double cOsdProvider::oldAspect = 1.0 [static, private] |
Definition at line 934 of file include/vdr/osd.h.
Referenced by UpdateOsdSize().
static int cOsdProvider::oldHeight = 0 [static, private] |
Definition at line 933 of file include/vdr/osd.h.
Referenced by UpdateOsdSize().
static int cOsdProvider::oldWidth = 0 [static, private] |
Definition at line 932 of file include/vdr/osd.h.
Referenced by UpdateOsdSize().
static cOsdProvider * cOsdProvider::osdProvider = NULL [static, private] |
Definition at line 931 of file include/vdr/osd.h.
Referenced by cOsdProvider(), DropImage(), NewOsd(), Shutdown(), StoreImage(), SupportsTrueColor(), and ~cOsdProvider().