diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2007-08-26 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2007-08-26 18:00:00 +0200 |
commit | 46c882c04d5200cc97262b15db2e4841b305664d (patch) | |
tree | 5883630e3561fc1c16beb50c2d680fc73b8b457f /osd.h | |
parent | e5a2aa41c9762bda4ce7b987aba1bcfa1cee6f70 (diff) | |
download | vdr-patch-lnbsharing-46c882c04d5200cc97262b15db2e4841b305664d.tar.gz vdr-patch-lnbsharing-46c882c04d5200cc97262b15db2e4841b305664d.tar.bz2 |
Version 1.5.9vdr-1.5.9
- Fixed handling locale directories with a large number of entries (thanks to
Anssi Hannula).
- Updated Turkish language texts (thanks to Oktay Yolgeçen).
- Fixed stripping the context in I18nTranslate() (reported by Christian
Wieninger).
- Fixed detecting whether a particular locale is actually supported.
- Added a note about LANG having to be set to a valid locale in INSTALL
(suggested by Matthias Fechner).
- Fixed some compiler warnings with gcc-4.2.0 (thanks to Matthias Schwarzott).
- Fixed setting the locale file name in i18n-to-gettext.pl (thanks to Matthias
Schwarzott).
- Changed the default for LOCDIR in Makefile and Make.config.template to
"./locale", so that internationalization works by default when running VDR
from within its source directory (suggested by Anssi Hannula).
- Added the new i18n macro trVDR(), which can be used by plugins to mark
texts they want to reuse from VDR's core translations (suggested by Matthias
Becker).
- VDR now uses the default configuration directory as defined in the CONFDIR
varable in the Makefile (thanks to Thomas Schmidt).
- The SVDRP command LSTC can now list the channels with group separators if the
option ':groups' is given (thanks to Andreas Mair).
- Added a missing error report to cCuttingThread::Action() (thanks to Udo
Richter).
- There can now be more than one OSD at the same time. At any given time,
however, only one of them can be active (and thus visible). This is to
allow displaying things like subtitles in an easy way. A cOsd therefore
now has a "Level", and only the OSD with the smallest level will be
displayed. The level 0 OSD is special, and there can only be one with
this level. If there is more than one OSD with a particular level, only
the one that was created first will be displayed.
Plugins that provide an OSD need to adjust their cOsdProvider::CreateOsd()
function to hand through the Level.
- Fixed checking for ttDolbyLast in cDevice::SetCurrentAudioTrack() (thanks
to Marco Schlüßler).
Diffstat (limited to 'osd.h')
-rw-r--r-- | osd.h | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.h 1.56 2007/07/20 14:50:17 kls Exp $ + * $Id: osd.h 1.57 2007/08/26 09:45:38 kls Exp $ */ #ifndef __OSD_H @@ -15,6 +15,7 @@ #include <stdint.h> #include "config.h" #include "font.h" +#include "tools.h" #define MAXNUMCOLORS 256 @@ -247,13 +248,15 @@ class cOsd { friend class cOsdProvider; private: static int osdLeft, osdTop, osdWidth, osdHeight; - static int isOpen; + static cVector<cOsd *> Osds; cBitmap *savedRegion; cBitmap *bitmaps[MAXOSDAREAS]; int numBitmaps; int left, top, width, height; + uint level; + bool active; protected: - cOsd(int Left, int Top); + cOsd(int Left, int Top, uint Level); ///< 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 @@ -269,6 +272,14 @@ protected: ///< 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. + bool Active(void) { return active; } + virtual void SetActive(bool On) { active = On; } + ///< Sets this OSD to be the active one. + ///< A derived class must call cOsd::SetActive(On). public: virtual ~cOsd(); ///< Shuts down the OSD. @@ -281,7 +292,8 @@ public: ///< 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. - static int IsOpen(void) { return isOpen; } + static int IsOpen(void) { return Osds.Size() && Osds[0]->level == 0; } + ///< Returns true if there is currently a level 0 OSD open. int Left(void) { return left; } int Top(void) { return top; } int Width(void) { return width; } @@ -379,14 +391,14 @@ class cOsdProvider { private: static cOsdProvider *osdProvider; protected: - virtual cOsd *CreateOsd(int Left, int Top) = 0; + virtual cOsd *CreateOsd(int Left, int Top, uint Level) = 0; ///< Returns a pointer to a newly created cOsd object, which will be located ///< at the given coordinates. public: cOsdProvider(void); //XXX maybe parameter to make this one "sticky"??? (frame-buffer etc.) virtual ~cOsdProvider(); - static cOsd *NewOsd(int Left, int Top); + static cOsd *NewOsd(int Left, int Top, uint Level = 0); ///< 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 |