cSkins Class Reference

#include <skins.h>

Inheritance diagram for cSkins:

Inheritance graph
[legend]
Collaboration diagram for cSkins:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cSkins (void)
 ~cSkins ()
bool SetCurrent (const char *Name=NULL)
cSkinCurrent (void)
 Returns a pointer to the current skin.
bool IsOpen (void)
 Returns true if there is currently a skin display object active.
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)
 Processes the first queued message, if any.
void Flush (void)
 Flushes the currently active cSkinDisplay, if any.
virtual void Clear (void)
 Free up all registered skins.

Private Attributes

cSkincurrent
cSkinDisplayMessagedisplayMessage
cMutex queueMessageMutex


Detailed Description

Definition at line 316 of file skins.h.


Constructor & Destructor Documentation

cSkins::cSkins ( void   ) 

Definition at line 194 of file skins.c.

References displayMessage.

cSkins::~cSkins (  ) 

Definition at line 199 of file skins.c.

References displayMessage.


Member Function Documentation

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 204 of file skins.c.

References current, esyslog, cList< cSkin >::First(), isyslog, cSkin::Name(), and cList< cSkin >::Next().

Referenced by main(), cMenuSetupOSD::ProcessKey(), and cPluginSkinCurses::Start().

Here is the call graph for this function:

cSkin* cSkins::Current ( void   )  [inline]

bool cSkins::IsOpen ( void   )  [inline]

Returns true if there is currently a skin display object active.

Definition at line 329 of file skins.h.

References cSkinDisplay::Current().

Referenced by main().

Here is the call graph for this function:

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.

Definition at line 223 of file skins.c.

References cSkinDisplay::Current(), Current(), cSkin::DisplayMessage(), displayMessage, esyslog, cSkinDisplay::Flush(), Interface, isyslog, kNone, cStatus::MsgOsdClear(), cStatus::MsgOsdStatusMessage(), mtError, mtInfo, mtStatus, mtWarning, cSkinDisplay::SetMessage(), and cInterface::Wait().

Referenced by cControl::Attach(), cCountdown::Cancel(), cInterface::Confirm(), cShutdownHandler::ConfirmShutdown(), cDisplaySubtitleTracks::Create(), cDisplayTracks::Create(), cMenuRecordings::Delete(), cMenuChannels::Delete(), cReplayControl::EditCut(), cMenuCommands::Execute(), cMenuRecordings::GetRecording(), main(), cPluginPictures::MainMenuAction(), cMenuSetupCAM::Menu(), cRecordControls::PauseLiveVideo(), cEITScanner::Process(), cMenuSetupPlugins::ProcessKey(), cMenuCam::ProcessKey(), cMenuEditTimer::ProcessKey(), cMenuEditChannel::ProcessKey(), ProcessQueuedMessages(), cMenuSetupCAM::Reset(), cMenuCam::Select(), cRecordControls::Start(), cMenuSchedule::Switch(), cMenuWhatsOn::Switch(), cDevice::SwitchChannel(), and cCountdown::Update().

Here is the call graph for this function:

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 262 of file skins.c.

References cListBase::Add(), cSkinQueuedMessage::condVar, dsyslog, isempty(), cThread::IsMainThread(), cSkinQueuedMessage::key, kNone, cList< T >::Last(), cMutex::Lock(), mtStatus, cSkinQueuedMessage::mutex, cList< T >::Prev(), queueMessageMutex, cSkinQueuedMessage::state, cThread::ThreadId(), cCondVar::TimedWait(), and cMutex::Unlock().

Referenced by AssertFreeDiskSpace(), and cSVDRP::CmdMESG().

Here is the call graph for this function:

void cSkins::ProcessQueuedMessages ( void   ) 

void cSkins::Flush ( void   ) 

Flushes the currently active cSkinDisplay, if any.

Definition at line 360 of file skins.c.

References cSkinDisplay::Current(), and cSkinDisplay::Flush().

Referenced by cInterface::GetKey(), and cInterface::Wait().

Here is the call graph for this function:

void cSkins::Clear ( void   )  [virtual]

Free up all registered skins.

Reimplemented from cListBase.

Definition at line 366 of file skins.c.

References cListBase::Clear(), and displayMessage.

Referenced by main().

Here is the call graph for this function:


Member Data Documentation

cSkin* cSkins::current [private]

Definition at line 318 of file skins.h.

Referenced by Current(), and SetCurrent().

Definition at line 319 of file skins.h.

Referenced by Clear(), cSkins(), Message(), and ~cSkins().

Definition at line 320 of file skins.h.

Referenced by ProcessQueuedMessages(), and QueueMessage().


The documentation for this class was generated from the following files:

Generated on Tue Nov 4 20:02:04 2008 for VDR by  doxygen 1.5.6