vdr 2.6.1
|
#include <skins.h>
Public Member Functions | |
cSkins (void) | |
~cSkins () | |
bool | SetCurrent (const char *Name=NULL) |
cSkin * | Current (void) |
bool | IsOpen (void) |
eKeys | Message (eMessageType Type, const char *s, int Seconds=0) |
int | QueueMessage (eMessageType Type, const char *s, int Seconds=0, int Timeout=0) |
void | ProcessQueuedMessages (void) |
void | Flush (void) |
virtual void | Clear (void) |
cSkins (void) | |
~cSkins () | |
bool | SetCurrent (const char *Name=NULL) |
cSkin * | Current (void) |
bool | IsOpen (void) |
eKeys | Message (eMessageType Type, const char *s, int Seconds=0) |
int | QueueMessage (eMessageType Type, const char *s, int Seconds=0, int Timeout=0) |
void | ProcessQueuedMessages (void) |
void | Flush (void) |
virtual void | Clear (void) |
![]() | |
cList (const char *NeedsLocking=NULL) | |
cList (const char *NeedsLocking=NULL) | |
const cSkin * | Get (int Index) const |
cSkin * | Get (int Index) |
const cSkin * | Get (int Index) const |
cSkin * | Get (int Index) |
const cSkin * | First (void) const |
cSkin * | First (void) |
const cSkin * | First (void) const |
cSkin * | First (void) |
const cSkin * | Last (void) const |
cSkin * | Last (void) |
const cSkin * | Last (void) const |
cSkin * | Last (void) |
const cSkin * | Prev (const cSkin *Object) const |
cSkin * | Prev (const cSkin *Object) |
const cSkin * | Prev (const cSkin *Object) const |
cSkin * | Prev (const cSkin *Object) |
const cSkin * | Next (const cSkin *Object) const |
cSkin * | Next (const cSkin *Object) |
const cSkin * | Next (const cSkin *Object) const |
cSkin * | Next (const cSkin *Object) |
![]() | |
virtual | ~cListBase () |
bool | Lock (cStateKey &StateKey, bool Write=false, int TimeoutMs=0) const |
void | SetSyncStateKey (cStateKey &StateKey) |
void | SetUseGarbageCollector (void) |
void | SetExplicitModify (void) |
void | SetModified (void) |
void | Add (cListObject *Object, cListObject *After=NULL) |
void | Ins (cListObject *Object, cListObject *Before=NULL) |
void | Del (cListObject *Object, bool DeleteObject=true) |
virtual void | Move (int From, int To) |
void | Move (cListObject *From, cListObject *To) |
virtual void | Clear (void) |
bool | Contains (const cListObject *Object) const |
const cListObject * | Get (int Index) const |
cListObject * | Get (int Index) |
int | Count (void) const |
void | Sort (void) |
virtual | ~cListBase () |
bool | Lock (cStateKey &StateKey, bool Write=false, int TimeoutMs=0) const |
void | SetSyncStateKey (cStateKey &StateKey) |
void | SetUseGarbageCollector (void) |
void | SetExplicitModify (void) |
void | SetModified (void) |
void | Add (cListObject *Object, cListObject *After=NULL) |
void | Ins (cListObject *Object, cListObject *Before=NULL) |
void | Del (cListObject *Object, bool DeleteObject=true) |
virtual void | Move (int From, int To) |
void | Move (cListObject *From, cListObject *To) |
virtual void | Clear (void) |
bool | Contains (const cListObject *Object) const |
const cListObject * | Get (int Index) const |
cListObject * | Get (int Index) |
int | Count (void) const |
void | Sort (void) |
Private Attributes | |
cSkin * | current |
cSkinDisplayMessage * | displayMessage |
cMutex | queueMessageMutex |
Additional Inherited Members | |
![]() | |
cListBase (const char *NeedsLocking=NULL) | |
cListBase (const char *NeedsLocking=NULL) | |
![]() | |
cListObject * | objects |
cListObject * | lastObject |
int | count |
cStateLock | stateLock |
const char * | needsLocking |
bool | useGarbageCollector |
Definition at line 457 of file include/vdr/skins.h.
cSkins::cSkins | ( | void | ) |
Definition at line 221 of file skins.c.
References displayMessage.
cSkins::~cSkins | ( | ) |
Definition at line 226 of file skins.c.
References displayMessage.
cSkins::cSkins | ( | void | ) |
cSkins::~cSkins | ( | ) |
|
virtual |
Free up all registered skins.
Reimplemented from cListBase.
Definition at line 408 of file skins.c.
References cListBase::Clear(), and displayMessage.
Referenced by main().
|
virtual |
Free up all registered skins.
Reimplemented from cListBase.
|
inline |
Returns a pointer to the current skin.
Definition at line 468 of file include/vdr/skins.h.
References current.
Referenced by cDisplayChannel::cDisplayChannel(), cDisplaySubtitleTracks::cDisplaySubtitleTracks(), cDisplayTracks::cDisplayTracks(), cDisplayVolume::cDisplayVolume(), cMenuSetupOSD::cMenuSetupOSD(), cInterface::LearnKeys(), main(), cDisplayChannel::ProcessKey(), cMenuSetupOSD::ProcessKey(), cOsdMenu::SetDisplayMenu(), cReplayControl::ShowMode(), and cReplayControl::ShowProgress().
|
inline |
void cSkins::Flush | ( | void | ) |
Flushes the currently active cSkinDisplay, if any.
Definition at line 402 of file skins.c.
References cSkinDisplay::Current(), and cSkinDisplay::Flush().
Referenced by cInterface::GetKey(), and cInterface::Wait().
void cSkins::Flush | ( | void | ) |
Flushes the currently active cSkinDisplay, if any.
|
inline |
Returns true if there is currently a skin display object active.
Definition at line 470 of file include/vdr/skins.h.
References cSkinDisplay::Current().
|
inline |
Returns true if there is currently a skin display object active.
Definition at line 470 of file skins.h.
References cSkinDisplay::Current().
eKeys cSkins::Message | ( | eMessageType | Type, |
const char * | s, | ||
int | Seconds = 0 |
||
) |
Displays the given message, either through a currently visible display object that is capable of doing so, or by creating a temporary cSkinDisplayMessage object.
The return value is the key pressed by the user. If no user input has been received within Seconds (the default value of 0 results in the value defined for "Message time" in the setup), kNone will be returned. If Message() is called from a background thread and Type is not mtStatus, the call will be automatically forwarded to QueueMessage().
Definition at line 250 of file skins.c.
References cSkinDisplay::Current(), displayMessage, dsyslog, esyslog, cSkinDisplay::Flush(), Interface, cThread::IsMainThread(), isyslog, kNone, cStatus::MsgOsdClear(), cStatus::MsgOsdStatusMessage(), mtError, mtInfo, mtStatus, mtWarning, QueueMessage(), cSkinDisplay::SetMessage(), and cInterface::Wait().
Referenced by cMenuRecordingEdit::Action(), cMenuSetupCAM::Activate(), cMenuPathEdit::ApplyChanges(), cMenuRecordingEdit::ApplyChanges(), cControl::Attach(), cCountdown::Cancel(), cInterface::Confirm(), cMenuEditFolder::Confirm(), cShutdownHandler::ConfirmShutdown(), cDisplayTracks::Create(), cDisplaySubtitleTracks::Create(), cMenuRecordings::Delete(), cMenuChannels::Delete(), cMenuRecordingEdit::Delete(), cReplayControl::EditCut(), cMenuCommands::Execute(), main(), cPluginPictures::MainMenuAction(), cMenuSetupCAM::Menu(), cRecordControls::PauseLiveVideo(), cEITScanner::Process(), cMenuEditTimer::ProcessKey(), cMenuEditChannel::ProcessKey(), cMenuCam::ProcessKey(), cMenuSetupPlugins::ProcessKey(), ProcessQueuedMessages(), cMenuRecordingEdit::RefreshRecording(), cMenuRecording::RefreshRecording(), RemoteTimerError(), cMenuSetupCAM::Reset(), cMenuCam::Select(), cMenuEditTimer::SetPatternItem(), cRecordControls::Start(), cReplayControl::Stop(), cMenuWhatsOn::Switch(), cMenuSchedule::Switch(), and cCountdown::Update().
eKeys cSkins::Message | ( | eMessageType | Type, |
const char * | s, | ||
int | Seconds = 0 |
||
) |
Displays the given message, either through a currently visible display object that is capable of doing so, or by creating a temporary cSkinDisplayMessage object.
The return value is the key pressed by the user. If no user input has been received within Seconds (the default value of 0 results in the value defined for "Message time" in the setup), kNone will be returned. If Message() is called from a background thread and Type is not mtStatus, the call will be automatically forwarded to QueueMessage().
void cSkins::ProcessQueuedMessages | ( | void | ) |
Processes the first queued message, if any.
Definition at line 352 of file skins.c.
References cCondVar::Broadcast(), cSkinQueuedMessage::condVar, cSkinDisplay::Current(), dsyslog, cThread::IsMainThread(), cSkinQueuedMessage::key, cMutex::Lock(), Message(), cSkinQueuedMessage::message, cSkinQueuedMessage::mutex, queueMessageMutex, cSkinQueuedMessage::seconds, SkinQueuedMessages, Skins, cSkinQueuedMessage::state, cSkinQueuedMessage::timeout, cSkinQueuedMessage::type, and cMutex::Unlock().
Referenced by main().
void cSkins::ProcessQueuedMessages | ( | void | ) |
Processes the first queued message, if any.
int cSkins::QueueMessage | ( | eMessageType | Type, |
const char * | s, | ||
int | Seconds = 0 , |
||
int | Timeout = 0 |
||
) |
Like Message(), but this function may be called from a background thread.
The given message is put into a queue and the main program loop will display it as soon as this is suitable. If Timeout is 0, QueueMessage() returns immediately and the return value will be kNone. If a positive Timeout is given, the thread will wait at most the given number of seconds for the message to be actually displayed (note that the user may currently be doing something that doesn't allow for queued messages to be displayed immediately). If the timeout expires and the message hasn't been displayed yet, the return value is -1 and the message will be removed from the queue without being displayed. Positive values of Timeout are only allowed for background threads. If QueueMessage() is called from the foreground thread with a Timeout greater than 0, the call is ignored and nothing is displayed. Queued messages will be displayed in the sequence they have been put into the queue, so messages from different threads may appear mingled. If a particular thread queues a message with a Timeout of -1, and the previous message from the same thread also had a Timeout of -1, only the last message will be displayed. This can be used for progress displays, where only the most recent message is actually important. Type may only be mtInfo, mtWarning or mtError. A call with mtStatus will be ignored. A call with an empty message from a background thread removes all queued messages from the calling thread. A call with an empty message from the main thread will be ignored.
Definition at line 296 of file skins.c.
References cSkinQueuedMessage::condVar, dsyslog, isempty(), cThread::IsMainThread(), cSkinQueuedMessage::key, kNone, cMutex::Lock(), mtStatus, cSkinQueuedMessage::mutex, queueMessageMutex, SkinQueuedMessages, cSkinQueuedMessage::state, cThread::ThreadId(), cCondVar::TimedWait(), and cMutex::Unlock().
Referenced by cIndexFileGenerator::Action(), AssertFreeDiskSpace(), cSVDRPServer::CmdMESG(), HandleRemoteModifications(), main(), Message(), cCaActivationReceiver::Receive(), and cDevice::SwitchChannel().
int cSkins::QueueMessage | ( | eMessageType | Type, |
const char * | s, | ||
int | Seconds = 0 , |
||
int | Timeout = 0 |
||
) |
Like Message(), but this function may be called from a background thread.
The given message is put into a queue and the main program loop will display it as soon as this is suitable. If Timeout is 0, QueueMessage() returns immediately and the return value will be kNone. If a positive Timeout is given, the thread will wait at most the given number of seconds for the message to be actually displayed (note that the user may currently be doing something that doesn't allow for queued messages to be displayed immediately). If the timeout expires and the message hasn't been displayed yet, the return value is -1 and the message will be removed from the queue without being displayed. Positive values of Timeout are only allowed for background threads. If QueueMessage() is called from the foreground thread with a Timeout greater than 0, the call is ignored and nothing is displayed. Queued messages will be displayed in the sequence they have been put into the queue, so messages from different threads may appear mingled. If a particular thread queues a message with a Timeout of -1, and the previous message from the same thread also had a Timeout of -1, only the last message will be displayed. This can be used for progress displays, where only the most recent message is actually important. Type may only be mtInfo, mtWarning or mtError. A call with mtStatus will be ignored. A call with an empty message from a background thread removes all queued messages from the calling thread. A call with an empty message from the main thread will be ignored.
bool cSkins::SetCurrent | ( | const char * | Name = NULL | ) |
Sets the current skin to the one indicated by name.
If no such skin can be found, the first one will be used.
Definition at line 231 of file skins.c.
References cSkinDisplay::current, esyslog, cList< cSkin >::First(), isyslog, and cList< cSkin >::Next().
Referenced by main(), cMenuSetupOSD::ProcessKey(), and cPluginSkinCurses::Start().
bool cSkins::SetCurrent | ( | const char * | Name = NULL | ) |
Sets the current skin to the one indicated by name.
If no such skin can be found, the first one will be used.
|
private |
Definition at line 459 of file include/vdr/skins.h.
Referenced by Current().
|
private |
|
private |
Definition at line 461 of file include/vdr/skins.h.
Referenced by ProcessQueuedMessages(), and QueueMessage().