103 for (
int i = 1; i <
MaxTabs; i++) {
120 static char buffer[1000];
122 const char *b = strchrnul(a,
'\t');
123 while (*b &&
Tab-- > 0) {
125 b = strchrnul(a,
'\t');
128 return (
Tab <= 0) ? a : NULL;
129 unsigned int n = b - a;
130 if (n >=
sizeof(buffer))
131 n =
sizeof(buffer) - 1;
132 strncpy(buffer, a, n);
154:
cSkinDisplayReplay::
cProgressBar::
cProgressBar(
Width,
Height,
Current, Total, Marks, NULL, ColorSeen, ColorRest, ColorSelected, ColorMark, ColorCurrent,
clrBlack)
158cSkinDisplayReplay::cProgressBar::cProgressBar(
int Width,
int Height,
int Current,
int Total,
const cMarks *Marks,
const cErrors *Errors,
tColor ColorSeen,
tColor ColorRest,
tColor ColorSelected,
tColor ColorMark,
tColor ColorCurrent,
tColor ColorError)
169 int p1 =
Pos(m->Position());
176 Mark(p1, Start, m->Position() ==
Current, ColorMark, ColorCurrent);
182 for (
int i = 0; i < Errors->
Size(); i++) {
183 int p1 = Errors->
At(i);
197 for (
int i = 0; i < d; i++) {
198 int h = Start ? i :
Height() - 1 - i;
205 const int d = (
Height() / 9) & ~0x01;
206 const int h =
Height() / 2;
207 const int e =
Height() / 4;
210 for (
int i = 1; i <= d; i++) {
211 DrawRectangle(x - d + i, h - i, x + d - i, h - i, ColorError);
212 DrawRectangle(x - d + i, h + i, x + d - i, h + i, ColorError);
273 if (strcmp(Skin->Name(), Name) == 0) {
274 isyslog(
"setting current skin to \"%s\"", Name);
282 isyslog(
"skin \"%s\" not available - using \"%s\" instead", Name,
current->Name());
284 esyslog(
"ERROR: no skin available");
294 dsyslog(
"cSkins::Message(%d, \"%s\", %d) called from background thread - ignored! (Use cSkins::QueueMessage() instead)", Type, s, Seconds);
337 dsyslog(
"cSkins::QueueMessage() called with mtStatus - ignored!");
350 dsyslog(
"cSkins::QueueMessage() called with empty message from main thread - ignored!");
356 dsyslog(
"cSkins::QueueMessage() called from main thread with Timeout = %d - ignored!", Timeout);
377 if (m->state == 0 && m->timeout == -1)
393 dsyslog(
"cSkins::ProcessQueuedMessages() called from background thread - ignored!");
418 if (msg->
state == 1) {
431 if (m && m->
state == 2) {
void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color)
Draws a filled rectangle defined by the upper left (x1, y1) and lower right (x2, y2) corners with the...
cBitmap(int Width, int Height, int Bpp, int X0=0, int Y0=0)
Creates a bitmap with the given Width, Height and color depth (Bpp).
bool TimedWait(cMutex &Mutex, int TimeoutMs)
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
cListObject(const cListObject &ListObject)
const T * First(void) const
Returns the first element in this list, or NULL if the list is empty.
const T * Next(const T *Object) const
< Returns the element immediately before Object in this list, or NULL if Object is the first element ...
A steerable satellite dish generally points to the south on the northern hemisphere,...
const char * Title(char Delimiter=' ', bool NewIndicator=false, int Level=-1) const
virtual void SetPositioner(const cPositioner *Positioner)
Sets the Positioner used to move the satellite dish.
cSkinDisplayChannel(void)
virtual void SetMessage(eMessageType Type, const char *Text) override=0
Sets a one line message Text, with the given Type.
const cPositioner * positioner
< This class is used to display the current channel, together with the present and following EPG even...
void Mark(int x, bool Start, bool Current, tColor ColorMark, tColor ColorCurrent)
cProgressBar(int Width, int Height, int Current, int Total, const cMarks *Marks, tColor ColorSeen, tColor ColorRest, tColor ColorSelected, tColor ColorMark, tColor ColorCurrent)
void Error(int x, tColor ColorError)
virtual void SetErrors(const cErrors *Errors)
Sets the errors found in the recording to Errors, which shall be used to display the progress bar thr...
virtual void SetMarks(const cMarks *Marks)
Sets the editing marks to Marks, which shall be used to display the progress bar through a cProgressB...
virtual void SetTitle(const char *Title)=0
Sets the title of the recording.
virtual void SetRecording(const cRecording *Recording)
Sets the recording that is currently being played.
const cMarks * marks
< This class implements the progress display used during replay of a recording.
static cSkinDisplay * Current(void)
Returns the currently active cSkinDisplay.
static cSkinDisplay * current
virtual void Flush(void)
Actually draws the OSD display to the output device.
virtual void SetMessage(eMessageType Type, const char *Text)
Sets a one line message Text, with the given Type.
static int AvgCharWidth(void)
Returns the average width of a character in pixel (just a raw estimate).
cSkinQueuedMessage(eMessageType Type, const char *s, int Seconds, int Timeout)
virtual ~cSkinQueuedMessage() override
virtual ~cSkin() override
cSkin(const char *Name, cTheme *Theme=NULL)
Creates a new skin class, with the given Name and Theme.
bool SetCurrent(const char *Name=NULL)
Sets the current skin to the one indicated by name.
eKeys Message(eMessageType Type, const char *s, int Seconds=0)
Displays the given message, either through a currently visible display object that is capable of doin...
void Flush(void)
Flushes the currently active cSkinDisplay, if any.
cSkinDisplayMessage * displayMessage
void ProcessQueuedMessages(void)
Processes the first queued message, if any.
virtual void Clear(void) override
Free up all registered skins.
int QueueMessage(eMessageType Type, const char *s, int Seconds=0, int Timeout=0)
Like Message(), but this function may be called from a background thread.
static void MsgOsdStatusMessage(const char *Message)
static void MsgOsdClear(void)
static cString sprintf(const char *fmt,...) __attribute__((format(printf
static void Save(const char *SkinName, cTheme *Theme)
static tThreadId IsMainThread(void)
static tThreadId ThreadId(void)
cList< cSkinQueuedMessage > SkinQueuedMessages