From f2a4ea2dc8c0d915e0f2af6f4ec1a228e1e94453 Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Fri, 25 Jun 2004 17:54:38 +0000 Subject: - on devices capable of full-color OSD, bpp's have no meaning anymore (but will still work like usual). On such devices, a full-screen 8-bit OSD will be used - new display-item "PresentTextDescription" displays combined ShortText/Description - displaying replay symbols only if information is actually available - exchanged x, y, width, height with x1, y1, x2, y2 coordinates (skin version is now 0.0.3) - coordinates may be negative to respect dynamic OSD settings (negative coordinates give pixels from the right or bottom edge) - added base parameter to Skin item to be able to use full screen in absolute mode - added a script to convert 0.0.2 skins to 0.0.3 - added parsing quoted texts (path="Bla.jpg" etc. will work correctly now) - fixed translator to escape the dollar sign - fixed display of scrollbar (REALLY!) - fixed linkage of libMagick++ --- common.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'common.h') diff --git a/common.h b/common.h index c1a0436..d39b866 100644 --- a/common.h +++ b/common.h @@ -1,5 +1,5 @@ /* - * $Id: common.h,v 1.10 2004/06/16 18:46:50 lordjaxom Exp $ + * $Id: common.h,v 1.12 2004/06/25 17:51:34 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_COMMON_H @@ -16,8 +16,12 @@ using std::map; #ifdef DEBUG # define Dprintf(x...) fprintf(stderr, x); +# define Dbench(x) time_t bench_##x = time_ms(); +# define Ddiff(x) time_ms() - bench_##x #else # define Dprintf(x...) +# define Dbench(x) +# define Ddiff(x) #endif // sections and items known by skin files @@ -117,6 +121,7 @@ enum eSkinDisplay { displayMenuCurrent, // exc: text (TODO: logo?) displayMenuGroups, // exc: text (TODO: logo?) displayReplayMode, // exc: text, logo + displayPresentTextDescription, // exc: text __DISPLAY_COUNT__ }; @@ -129,21 +134,30 @@ enum eReplayMode { replayVCD, __REPLAY_COUNT__ }; + +enum eBaseCoordinate { + baseRelative, + baseAbsolute, + __BASE_COUNT__ +}; extern const string SectionNames[__SECTION_COUNT__]; extern const string ItemNames[__ITEM_COUNT__]; extern const string DisplayNames[__DISPLAY_COUNT__]; extern const string ReplayNames[__REPLAY_COUNT__]; +extern const string BaseNames[__BASE_COUNT__]; // geometrical structures struct POINT { int x, y; + POINT(int _x = 0, int _y = 0) { x = _x; y = _y; } POINT &operator+=(const POINT &pt) { x += pt.x; y += pt.y; return *this; } }; struct SIZE { int w, h; + SIZE(int _w = 0, int _h = 0) { w = _w; h = _h; } }; // class forwards @@ -164,5 +178,8 @@ bool ParseVar(const char *Text, const char *Name, const cFont **Value); bool ParseVar(const char *Text, const char *Name, string &Value); bool ParseVar(const char *Text, const char *Name, tColor *Value); bool ParseVar(const char *Text, const char *Name, eTextAlignment *Value); +bool ParseVar(const char *Text, const char *Name, eBaseCoordinate *Value); + +void SkipQuotes(string &Value); #endif // VDR_TEXT2SKIN_COMMON_H -- cgit v1.2.3