diff options
Diffstat (limited to 'libcore/pixmapcontainer.c')
-rw-r--r-- | libcore/pixmapcontainer.c | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/libcore/pixmapcontainer.c b/libcore/pixmapcontainer.c index b3ea83e..3e5e60a 100644 --- a/libcore/pixmapcontainer.c +++ b/libcore/pixmapcontainer.c @@ -16,6 +16,7 @@ cPixmapContainer::cPixmapContainer(int numPixmaps) { pixmaps[i] = NULL; pixmapsTransparency[i] = 0; } + pixmapsLayer = NULL; mutex.Unlock(); checkRunning = false; fadeTime = 0; @@ -33,6 +34,9 @@ cPixmapContainer::~cPixmapContainer(void) { } delete[] pixmaps; delete[] pixmapsTransparency; + if (pixmapsLayer) + delete[] pixmapsLayer; + if (deleteOsdOnExit && osd) { mutex.Lock(); delete osd; @@ -65,12 +69,6 @@ void cPixmapContainer::OpenFlush(void) { flushState = fsOpen; } -bool cPixmapContainer::PixmapExists(int num) { - cMutexLock MutexLock(&mutex); - if (pixmaps[num]) - return true; - return false; -} void cPixmapContainer::DoFlush(void) { cMutexLock MutexLock(&mutex); @@ -81,6 +79,41 @@ void cPixmapContainer::DoFlush(void) { } } +void cPixmapContainer::HidePixmaps(void) { + cMutexLock MutexLock(&mutex); + pixmapsLayer = new int[numPixmaps]; + for(int i=0; i < numPixmaps; i++) { + if (!pixmaps[i]) { + pixmapsLayer[i] = 0; + continue; + } + pixmapsLayer[i] = pixmaps[i]->Layer(); + pixmaps[i]->SetLayer(-1); + } +} + +void cPixmapContainer::ShowPixmaps(void) { + cMutexLock MutexLock(&mutex); + if (!pixmapsLayer) + return; + for(int i=0; i < numPixmaps; i++) { + if (!pixmaps[i]) + continue; + pixmaps[i]->SetLayer(pixmapsLayer[i]); + } +} + +/****************************************************************************************************** +* Protected Functions +******************************************************************************************************/ + +bool cPixmapContainer::PixmapExists(int num) { + cMutexLock MutexLock(&mutex); + if (pixmaps[num]) + return true; + return false; +} + void cPixmapContainer::CreatePixmap(int num, int Layer, const cRect &ViewPort, const cRect &DrawPort) { cMutexLock MutexLock(&mutex); if (!osd || (checkRunning && !Running())) |