vdr-plugin-skindesigner/displaytracks.c

32 lines
785 B
C
Raw Normal View History

2014-09-27 09:25:14 +02:00
#include "displaytracks.h"
2016-01-26 18:32:38 +01:00
cSDDisplayTracks::cSDDisplayTracks(cViewTracks *tracksView, const char *Title, int NumTracks, const char * const *Tracks) {
view = tracksView;
ok = view->Init();
if (!ok)
esyslog("skindesigner: Error initiating displaytracks view - aborting");
view->SetTitle(Title);
view->SetNumtracks(NumTracks);
view->SetTracks(Tracks);
2014-09-27 09:25:14 +02:00
}
cSDDisplayTracks::~cSDDisplayTracks() {
2016-01-26 18:32:38 +01:00
view->Close();
2014-09-27 09:25:14 +02:00
}
void cSDDisplayTracks::SetTrack(int Index, const char * const *Tracks) {
2016-01-26 18:32:38 +01:00
if (ok)
view->SetCurrentTrack(Index);
2014-09-27 09:25:14 +02:00
}
void cSDDisplayTracks::SetAudioChannel(int AudioChannel) {
2016-01-26 18:32:38 +01:00
if (ok)
view->SetAudiochannel(AudioChannel);
2014-09-27 09:25:14 +02:00
}
void cSDDisplayTracks::Flush(void) {
2016-01-26 18:32:38 +01:00
if (!ok)
2014-09-27 09:25:14 +02:00
return;
view->Flush(false);
2014-09-27 09:25:14 +02:00
}