From 46c882c04d5200cc97262b15db2e4841b305664d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 26 Aug 2007 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.5.9=20-=20Fixed=20handling=20locale=20direc?= =?UTF-8?q?tories=20with=20a=20large=20number=20of=20entries=20(thanks=20t?= =?UTF-8?q?o=20=20=20Anssi=20Hannula).=20-=20Updated=20Turkish=20language?= =?UTF-8?q?=20texts=20(thanks=20to=20Oktay=20Yolge=C3=A7en).=20-=20Fixed?= =?UTF-8?q?=20stripping=20the=20context=20in=20I18nTranslate()=20(reported?= =?UTF-8?q?=20by=20Christian=20=20=20Wieninger).=20-=20Fixed=20detecting?= =?UTF-8?q?=20whether=20a=20particular=20locale=20is=20actually=20supporte?= =?UTF-8?q?d.=20-=20Added=20a=20note=20about=20LANG=20having=20to=20be=20s?= =?UTF-8?q?et=20to=20a=20valid=20locale=20in=20INSTALL=20=20=20(suggested?= =?UTF-8?q?=20by=20Matthias=20Fechner).=20-=20Fixed=20some=20compiler=20wa?= =?UTF-8?q?rnings=20with=20gcc-4.2.0=20(thanks=20to=20Matthias=20Schwarzot?= =?UTF-8?q?t).=20-=20Fixed=20setting=20the=20locale=20file=20name=20in=20i?= =?UTF-8?q?18n-to-gettext.pl=20(thanks=20to=20Matthias=20=20=20Schwarzott)?= =?UTF-8?q?.=20-=20Changed=20the=20default=20for=20LOCDIR=20in=20Makefile?= =?UTF-8?q?=20and=20Make.config.template=20to=20=20=20"./locale",=20so=20t?= =?UTF-8?q?hat=20internationalization=20works=20by=20default=20when=20runn?= =?UTF-8?q?ing=20VDR=20=20=20from=20within=20its=20source=20directory=20(s?= =?UTF-8?q?uggested=20by=20Anssi=20Hannula).=20-=20Added=20the=20new=20i18?= =?UTF-8?q?n=20macro=20trVDR(),=20which=20can=20be=20used=20by=20plugins?= =?UTF-8?q?=20to=20mark=20=20=20texts=20they=20want=20to=20reuse=20from=20?= =?UTF-8?q?VDR's=20core=20translations=20(suggested=20by=20Matthias=20=20?= =?UTF-8?q?=20Becker).=20-=20VDR=20now=20uses=20the=20default=20configurat?= =?UTF-8?q?ion=20directory=20as=20defined=20in=20the=20CONFDIR=20=20=20var?= =?UTF-8?q?able=20in=20the=20Makefile=20(thanks=20to=20Thomas=20Schmidt).?= =?UTF-8?q?=20-=20The=20SVDRP=20command=20LSTC=20can=20now=20list=20the=20?= =?UTF-8?q?channels=20with=20group=20separators=20if=20the=20=20=20option?= =?UTF-8?q?=20':groups'=20is=20given=20(thanks=20to=20Andreas=20Mair).=20-?= =?UTF-8?q?=20Added=20a=20missing=20error=20report=20to=20cCuttingThread::?= =?UTF-8?q?Action()=20(thanks=20to=20Udo=20=20=20Richter).=20-=20There=20c?= =?UTF-8?q?an=20now=20be=20more=20than=20one=20OSD=20at=20the=20same=20tim?= =?UTF-8?q?e.=20At=20any=20given=20time,=20=20=20however,=20only=20one=20o?= =?UTF-8?q?f=20them=20can=20be=20active=20(and=20thus=20visible).=20This?= =?UTF-8?q?=20is=20to=20=20=20allow=20displaying=20things=20like=20subtitl?= =?UTF-8?q?es=20in=20an=20easy=20way.=20A=20cOsd=20therefore=20=20=20now?= =?UTF-8?q?=20has=20a=20"Level",=20and=20only=20the=20OSD=20with=20the=20s?= =?UTF-8?q?mallest=20level=20will=20be=20=20=20displayed.=20The=20level=20?= =?UTF-8?q?0=20OSD=20is=20special,=20and=20there=20can=20only=20be=20one?= =?UTF-8?q?=20with=20=20=20this=20level.=20If=20there=20is=20more=20than?= =?UTF-8?q?=20one=20OSD=20with=20a=20particular=20level,=20only=20=20=20th?= =?UTF-8?q?e=20one=20that=20was=20created=20first=20will=20be=20displayed.?= =?UTF-8?q?=20=20=20Plugins=20that=20provide=20an=20OSD=20need=20to=20adju?= =?UTF-8?q?st=20their=20cOsdProvider::CreateOsd()=20=20=20function=20to=20?= =?UTF-8?q?hand=20through=20the=20Level.=20-=20Fixed=20checking=20for=20tt?= =?UTF-8?q?DolbyLast=20in=20cDevice::SetCurrentAudioTrack()=20(thanks=20?= =?UTF-8?q?=20=20to=20Marco=20Schl=C3=BC=C3=9Fler).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- osd.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'osd.h') diff --git a/osd.h b/osd.h index 08bc418..604b2d2 100644 --- a/osd.h +++ b/osd.h @@ -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 #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 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 -- cgit v1.2.3