Cosmetic change in osdmanager.*

This commit is contained in:
kamel5 2019-11-10 15:37:28 +01:00
parent d8663ff309
commit 93af9304c8
17 changed files with 231 additions and 206 deletions

View File

@ -47,7 +47,7 @@ void cChannelGroupGrid::SetGeometry(int start, int end) {
width = geoManager.channelGroupsWidth; width = geoManager.channelGroupsWidth;
height = (end - start + 1) * geoManager.rowHeight; height = (end - start + 1) * geoManager.rowHeight;
} }
pixmap = osdManager.requestPixmap(1, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(1, cRect(x, y, width, height));
} }
void cChannelGroupGrid::Draw(void) { void cChannelGroupGrid::Draw(void) {

View File

@ -18,17 +18,17 @@ cChannelJump::cChannelJump(cChannelGroups *channelGroups, int lastValidChannel)
} }
cChannelJump::~cChannelJump(void) { cChannelJump::~cChannelJump(void) {
osdManager.releasePixmap(pixmapBack); osdManager.DestroyPixmap(pixmapBack);
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
} }
void cChannelJump::SetPixmaps(void) { void cChannelJump::SetPixmaps(void) {
int x = (geoManager.osdWidth - geoManager.channelJumpWidth)/2; int x = (geoManager.osdWidth - geoManager.channelJumpWidth)/2;
int y = (geoManager.osdHeight - geoManager.channelJumpHeight)/2; int y = (geoManager.osdHeight - geoManager.channelJumpHeight)/2;
pixmapBack = osdManager.requestPixmap(4, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight)); pixmapBack = osdManager.CreatePixmap(4, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight));
pixmap = osdManager.requestPixmap(5, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight)); pixmap = osdManager.CreatePixmap(5, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight));
pixmapText = osdManager.requestPixmap(6, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight)); pixmapText = osdManager.CreatePixmap(6, cRect(x, y, geoManager.channelJumpWidth, geoManager.channelJumpHeight));
} }
void cChannelJump::Draw(void) { void cChannelJump::Draw(void) {

View File

@ -149,14 +149,14 @@ eOSState cDetailView::ProcessKey(eKeys Key) {
bool scrolled = view->KeyUp(); bool scrolled = view->KeyUp();
if (scrolled) { if (scrolled) {
view->DrawScrollbar(); view->DrawScrollbar();
osdManager.flush(); osdManager.Flush();
} }
break; } break; }
case kDown: { case kDown: {
bool scrolled = view->KeyDown(); bool scrolled = view->KeyDown();
if (scrolled) { if (scrolled) {
view->DrawScrollbar(); view->DrawScrollbar();
osdManager.flush(); osdManager.Flush();
} }
break; } break; }
case kLeft: case kLeft:

View File

@ -34,10 +34,10 @@ void cDummyGrid::PositionPixmap() {
y0 += (StartTime() - column->Start())/60*geoManager.minutePixel; y0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight));
} else if (dirty) { } else if (dirty) {
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(pixmap);
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight));
} else { } else {
pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
} }
@ -48,10 +48,10 @@ void cDummyGrid::PositionPixmap() {
x0 += (StartTime() - column->Start())/60*geoManager.minutePixel; x0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight)); pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight));
} else if (dirty) { } else if (dirty) {
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(pixmap);
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight)); pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight));
} else { } else {
pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight)); pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight));
} }

View File

@ -40,7 +40,7 @@ void cEpgGrid::PositionPixmap() {
y0 += (StartTime() - column->Start()) / 60 * geoManager.minutePixel; y0 += (StartTime() - column->Start()) / 60 * geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight), pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight),
cRect(0, 0, geoManager.colWidth, Duration() / 60 * geoManager.minutePixel)); cRect(0, 0, geoManager.colWidth, Duration() / 60 * geoManager.minutePixel));
} else { } else {
pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight)); pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
@ -52,7 +52,7 @@ void cEpgGrid::PositionPixmap() {
x0 += (StartTime() - column->Start()) / 60 * geoManager.minutePixel; x0 += (StartTime() - column->Start()) / 60 * geoManager.minutePixel;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight), pixmap = osdManager.CreatePixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight),
cRect(0, 0, Duration() / 60 * geoManager.minutePixel, geoManager.rowHeight)); cRect(0, 0, Duration() / 60 * geoManager.minutePixel, geoManager.rowHeight));
} else { } else {
pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight )); pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight ));

View File

@ -8,7 +8,7 @@ cFooter::cFooter(cChannelGroups *channelGroups) {
currentGroup = -1; currentGroup = -1;
buttonY = (geoManager.footerHeight - geoManager.buttonHeight)/2; buttonY = (geoManager.footerHeight - geoManager.buttonHeight)/2;
SetButtonPositions(); SetButtonPositions();
footer = osdManager.requestPixmap(2, cRect( 0, footer = osdManager.CreatePixmap(2, cRect( 0,
geoManager.footerY, geoManager.footerY,
geoManager.osdWidth, geoManager.osdWidth,
geoManager.footerHeight), geoManager.footerHeight),
@ -17,7 +17,7 @@ cFooter::cFooter(cChannelGroups *channelGroups) {
} }
cFooter::~cFooter(void) { cFooter::~cFooter(void) {
osdManager.releasePixmap(footer); osdManager.DestroyPixmap(footer);
} }
void cFooter::drawRedButton() { void cFooter::drawRedButton() {

View File

@ -8,7 +8,7 @@ cHeaderGrid::cHeaderGrid(void) : cGridElement(NULL) {
} }
cHeaderGrid::~cHeaderGrid(void) { cHeaderGrid::~cHeaderGrid(void) {
osdManager.releasePixmap(pixmapLogo); osdManager.DestroyPixmap(pixmapLogo);
} }
void cHeaderGrid::createBackground(int num) { void cHeaderGrid::createBackground(int num) {
@ -22,8 +22,8 @@ void cHeaderGrid::createBackground(int num) {
x = geoManager.channelGroupsWidth; x = geoManager.channelGroupsWidth;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight; y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
} }
pixmap = osdManager.requestPixmap(1, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight)); pixmap = osdManager.CreatePixmap(1, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight));
pixmapLogo = osdManager.requestPixmap(2, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight)); pixmapLogo = osdManager.CreatePixmap(2, cRect(x, y, geoManager.channelLogoWidth, geoManager.channelLogoHeight));
if ((!pixmap) || (!pixmapLogo)){ if ((!pixmap) || (!pixmapLogo)){
return; return;
} }

View File

@ -2,9 +2,18 @@
#include "osdmanager.h" #include "osdmanager.h"
cOsdManager::cOsdManager(void) { cOsdManager::cOsdManager(void) {
osd = NULL;
} }
bool cOsdManager::setOsd() { void cOsdManager::Lock(void) {
mutex.Lock();
}
void cOsdManager::Unlock(void) {
mutex.Unlock();
}
bool cOsdManager::CreateOsd(void) {
osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop()); osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop());
if (osd) { if (osd) {
tArea Area = { 0, 0, cOsd::OsdWidth() - 1, cOsd::OsdHeight() - 1, 32 }; tArea Area = { 0, 0, cOsd::OsdWidth() - 1, cOsd::OsdHeight() - 1, 32 };
@ -15,7 +24,14 @@ bool cOsdManager::setOsd() {
return false; return false;
} }
void cOsdManager::setBackground() { void cOsdManager::DeleteOsd(void) {
Lock();
delete osd;
osd = NULL;
Unlock();
}
void cOsdManager::SetBackground(void) {
if (config.displayStatusHeader && config.scaleVideo) { if (config.displayStatusHeader && config.scaleVideo) {
int widthStatus = cOsd::OsdWidth() - geoManager.statusHeaderHeight * 16 / 9; int widthStatus = cOsd::OsdWidth() - geoManager.statusHeaderHeight * 16 / 9;
@ -27,12 +43,20 @@ void cOsdManager::setBackground() {
} }
cPixmap *cOsdManager::requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort) { cPixmap *cOsdManager::CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort) {
return osd->CreatePixmap(Layer, ViewPort, DrawPort); if (osd)
return osd->CreatePixmap(Layer, ViewPort, DrawPort);
return NULL;
} }
void cOsdManager::releasePixmap(cPixmap *pixmap) { void cOsdManager::DestroyPixmap(cPixmap *pixmap) {
if (!pixmap) if (!osd || !pixmap)
return; return;
osd->DestroyPixmap(pixmap); osd->DestroyPixmap(pixmap);
} }
void cOsdManager::Flush(void) {
if (osd) {
osd->Flush();
}
}

View File

@ -4,20 +4,23 @@
#include <vdr/osd.h> #include <vdr/osd.h>
class cOsdManager { class cOsdManager {
private: private:
cOsd *osd; cOsd *osd;
public: cMutex mutex;
cOsdManager(void); public:
bool setOsd(); cOsdManager(void);
void setBackground(); void Lock(void);
void flush() {osd->Flush();}; void Unlock(void);
cPixmap *requestPixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null); bool CreateOsd(void);
void releasePixmap(cPixmap *pixmap); void DeleteOsd(void);
void deleteOsd() {delete osd;}; void SetBackground(void);
int Width() { return osd->Width(); }; cPixmap *CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null);
int Height() { return osd->Height(); }; void DestroyPixmap(cPixmap *pixmap);
int Top() { return osd->Top(); }; void Flush(void);
int Left() { return osd->Left(); }; int Width(void) { return osd->Width(); };
int Height(void) { return osd->Height(); };
int Top(void) { return osd->Top(); };
int Left(void) { return osd->Left(); };
}; };
#endif //__TVGUIDE_OSDMANAGER_H #endif //__TVGUIDE_OSDMANAGER_H

View File

@ -28,7 +28,7 @@ cRecMenu::~cRecMenu(void) {
if (footer) if (footer)
delete footer; delete footer;
if (pixmapScrollBar) if (pixmapScrollBar)
osdManager.releasePixmap(pixmapScrollBar); osdManager.DestroyPixmap(pixmapScrollBar);
if (imgScrollBar) if (imgScrollBar)
delete imgScrollBar; delete imgScrollBar;
} }
@ -81,15 +81,15 @@ bool cRecMenu::CalculateHeight(bool reDraw) {
void cRecMenu::CreatePixmap(void) { void cRecMenu::CreatePixmap(void) {
if (pixmap) if (pixmap)
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(pixmap);
pixmap = osdManager.requestPixmap(3, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(3, cRect(x, y, width, height));
if (scrollable) { if (scrollable) {
int scrollBarX = x + width - scrollbarWidth - border; int scrollBarX = x + width - scrollbarWidth - border;
int scrollBarY = y + border + headerHeight; int scrollBarY = y + border + headerHeight;
int scrollBarHeight = height - headerHeight - footerHeight - 2 * border; int scrollBarHeight = height - headerHeight - footerHeight - 2 * border;
if (pixmapScrollBar) if (pixmapScrollBar)
osdManager.releasePixmap(pixmapScrollBar); osdManager.DestroyPixmap(pixmapScrollBar);
pixmapScrollBar = osdManager.requestPixmap(4, cRect(scrollBarX, scrollBarY, scrollbarWidth, scrollBarHeight)); pixmapScrollBar = osdManager.CreatePixmap(4, cRect(scrollBarX, scrollBarY, scrollbarWidth, scrollBarHeight));
} else } else
pixmapScrollBar = NULL; pixmapScrollBar = NULL;
} }
@ -133,11 +133,11 @@ void cRecMenu::InitMenu(bool complete) {
numItems = 0; numItems = 0;
if (scrollable) { if (scrollable) {
width -= scrollbarWidth + border; width -= scrollbarWidth + border;
osdManager.releasePixmap(pixmapScrollBar); osdManager.DestroyPixmap(pixmapScrollBar);
pixmapScrollBar = NULL; pixmapScrollBar = NULL;
DELETENULL(imgScrollBar); DELETENULL(imgScrollBar);
} }
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(pixmap);
pixmap = NULL; pixmap = NULL;
for (std::list<cRecMenuItem*>::iterator it = menuItems.begin(); it != menuItems.end(); it++) { for (std::list<cRecMenuItem*>::iterator it = menuItems.begin(); it != menuItems.end(); it++) {
if (deleteMenuItems) if (deleteMenuItems)

View File

@ -30,7 +30,7 @@ void cRecMenuItem::SetGeometry(int x, int y, int width) {
void cRecMenuItem::SetPixmaps(void) { void cRecMenuItem::SetPixmaps(void) {
if (!pixmap) if (!pixmap)
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
else else
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
} }
@ -76,7 +76,7 @@ cRecMenuItemButton::cRecMenuItemButton(const char *text, eRecMenuState action, b
cRecMenuItemButton::~cRecMenuItemButton(void) { cRecMenuItemButton::~cRecMenuItemButton(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
} }
int cRecMenuItemButton::GetWidth(void) { int cRecMenuItemButton::GetWidth(void) {
@ -89,8 +89,8 @@ void cRecMenuItemButton::SetPixmaps(void) {
width = width / 2; width = width / 2;
} }
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapText->SetViewPort(cRect(x, y, width, height)); pixmapText->SetViewPort(cRect(x, y, width, height));
@ -158,8 +158,8 @@ void cRecMenuItemButtonYesNo::SetPixmaps(void) {
int noX = x + 52 * width / 100; int noX = x + 52 * width / 100;
int yPixmaps = y + geoManager.borderRecMenus / 2; int yPixmaps = y + geoManager.borderRecMenus / 2;
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(yesX, yPixmaps, buttonWidth, height)); pixmap = osdManager.CreatePixmap(4, cRect(yesX, yPixmaps, buttonWidth, height));
pixmapNo = new cStyledPixmap(osdManager.requestPixmap(4, cRect(noX, yPixmaps, buttonWidth, height))); pixmapNo = new cStyledPixmap(osdManager.CreatePixmap(4, cRect(noX, yPixmaps, buttonWidth, height)));
} else { } else {
pixmap->SetViewPort(cRect(yesX, yPixmaps, buttonWidth, height)); pixmap->SetViewPort(cRect(yesX, yPixmaps, buttonWidth, height));
pixmapNo->SetViewPort(cRect(noX, yPixmaps, buttonWidth, height)); pixmapNo->SetViewPort(cRect(noX, yPixmaps, buttonWidth, height));
@ -343,13 +343,13 @@ cRecMenuItemInt::cRecMenuItemInt(cString text,
cRecMenuItemInt::~cRecMenuItemInt(void) { cRecMenuItemInt::~cRecMenuItemInt(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemInt::SetPixmaps(void) { void cRecMenuItemInt::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@ -464,13 +464,13 @@ cRecMenuItemBool::cRecMenuItemBool(cString text,
cRecMenuItemBool::~cRecMenuItemBool(void) { cRecMenuItemBool::~cRecMenuItemBool(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemBool::SetPixmaps(void) { void cRecMenuItemBool::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@ -551,13 +551,13 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
cRecMenuItemSelect::~cRecMenuItemSelect(void) { cRecMenuItemSelect::~cRecMenuItemSelect(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemSelect::SetPixmaps(void) { void cRecMenuItemSelect::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@ -659,13 +659,13 @@ cRecMenuItemSelectDirectory::cRecMenuItemSelectDirectory(cString text,
cRecMenuItemSelectDirectory::~cRecMenuItemSelectDirectory(void) { cRecMenuItemSelectDirectory::~cRecMenuItemSelectDirectory(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemSelectDirectory::SetPixmaps(void) { void cRecMenuItemSelectDirectory::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@ -793,13 +793,13 @@ cRecMenuItemText::cRecMenuItemText(cString title,
cRecMenuItemText::~cRecMenuItemText(void) { cRecMenuItemText::~cRecMenuItemText(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
if (pixmapKeyboard) if (pixmapKeyboard)
delete pixmapKeyboard; delete pixmapKeyboard;
if (pixmapKeyboardHighlight) if (pixmapKeyboardHighlight)
osdManager.releasePixmap(pixmapKeyboardHighlight); osdManager.DestroyPixmap(pixmapKeyboardHighlight);
if (pixmapKeyboardIcons) if (pixmapKeyboardIcons)
osdManager.releasePixmap(pixmapKeyboardIcons); osdManager.DestroyPixmap(pixmapKeyboardIcons);
delete[] valueUtf8; delete[] valueUtf8;
delete[] allowedUtf8; delete[] allowedUtf8;
delete[] charMapUtf8; delete[] charMapUtf8;
@ -813,11 +813,11 @@ void cRecMenuItemText::SetPixmaps(void) {
int keyboardX = x + (100 - keyboardWidth)*width / 100; int keyboardX = x + (100 - keyboardWidth)*width / 100;
int keyboardY = y + height; int keyboardY = y + height;
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(xPixmapVal, yPixmapVal, widthPixmapVal, heightPixmapVal)); pixmapVal = osdManager.CreatePixmap(5, cRect(xPixmapVal, yPixmapVal, widthPixmapVal, heightPixmapVal));
pixmapKeyboard = new cStyledPixmap(osdManager.requestPixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight))); pixmapKeyboard = new cStyledPixmap(osdManager.CreatePixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight)));
pixmapKeyboardHighlight = osdManager.requestPixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight)); pixmapKeyboardHighlight = osdManager.CreatePixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight));
pixmapKeyboardIcons = osdManager.requestPixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight)); pixmapKeyboardIcons = osdManager.CreatePixmap(-1, cRect(keyboardX, keyboardY, keyboardWidth*width/100, keyboardHeight));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(xPixmapVal, yPixmapVal, widthPixmapVal, heightPixmapVal)); pixmapVal->SetViewPort(cRect(xPixmapVal, yPixmapVal, widthPixmapVal, heightPixmapVal));
@ -1350,13 +1350,13 @@ cRecMenuItemTime::cRecMenuItemTime(cString text,
cRecMenuItemTime::~cRecMenuItemTime(void) { cRecMenuItemTime::~cRecMenuItemTime(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemTime::SetPixmaps(void) { void cRecMenuItemTime::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@ -1489,13 +1489,13 @@ cRecMenuItemDay::cRecMenuItemDay(cString text,
cRecMenuItemDay::~cRecMenuItemDay(void) { cRecMenuItemDay::~cRecMenuItemDay(void) {
if (pixmapVal) if (pixmapVal)
osdManager.releasePixmap(pixmapVal); osdManager.DestroyPixmap(pixmapVal);
} }
void cRecMenuItemDay::SetPixmaps(void) { void cRecMenuItemDay::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapVal = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapVal = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapVal->SetViewPort(cRect(x, y, width, height)); pixmapVal->SetViewPort(cRect(x, y, width, height));
@ -1580,16 +1580,16 @@ cRecMenuItemTimer::cRecMenuItemTimer(const cTimer *timer,
cRecMenuItemTimer::~cRecMenuItemTimer(void) { cRecMenuItemTimer::~cRecMenuItemTimer(void) {
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
if (pixmapStatus) if (pixmapStatus)
osdManager.releasePixmap(pixmapStatus); osdManager.DestroyPixmap(pixmapStatus);
} }
void cRecMenuItemTimer::SetPixmaps(void) { void cRecMenuItemTimer::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapStatus = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapStatus = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapStatus->SetViewPort(cRect(x, y, width, height)); pixmapStatus->SetViewPort(cRect(x, y, width, height));
@ -1765,13 +1765,13 @@ cRecMenuItemTimerConflictHeader::cRecMenuItemTimerConflictHeader(time_t conflict
cRecMenuItemTimerConflictHeader::~cRecMenuItemTimerConflictHeader(void) { cRecMenuItemTimerConflictHeader::~cRecMenuItemTimerConflictHeader(void) {
if (pixmapStatus) if (pixmapStatus)
osdManager.releasePixmap(pixmapStatus); osdManager.DestroyPixmap(pixmapStatus);
} }
void cRecMenuItemTimerConflictHeader::SetPixmaps(void) { void cRecMenuItemTimerConflictHeader::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapStatus = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapStatus = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapStatus->SetViewPort(cRect(x, y, width, height)); pixmapStatus->SetViewPort(cRect(x, y, width, height));
@ -1845,17 +1845,17 @@ cRecMenuItemEvent::cRecMenuItemEvent(const cEvent *event,
cRecMenuItemEvent::~cRecMenuItemEvent(void) { cRecMenuItemEvent::~cRecMenuItemEvent(void) {
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
} }
void cRecMenuItemEvent::SetPixmaps(void) { void cRecMenuItemEvent::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width - height / 2 - 10, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width - height / 2 - 10, height));
pixmapText->Fill(clrTransparent); pixmapText->Fill(clrTransparent);
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
pixmapIcons->Fill(clrTransparent); pixmapIcons->Fill(clrTransparent);
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
@ -1998,13 +1998,13 @@ cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text,
cRecMenuItemChannelChooser::~cRecMenuItemChannelChooser(void) { cRecMenuItemChannelChooser::~cRecMenuItemChannelChooser(void) {
if (pixmapChannel) if (pixmapChannel)
osdManager.releasePixmap(pixmapChannel); osdManager.DestroyPixmap(pixmapChannel);
} }
void cRecMenuItemChannelChooser::SetPixmaps(void) { void cRecMenuItemChannelChooser::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapChannel = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapChannel = osdManager.CreatePixmap(5, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapChannel->SetViewPort(cRect(x, y, width, height)); pixmapChannel->SetViewPort(cRect(x, y, width, height));
@ -2151,16 +2151,16 @@ cRecMenuItemDayChooser::cRecMenuItemDayChooser(cString text,
cRecMenuItemDayChooser::~cRecMenuItemDayChooser(void) { cRecMenuItemDayChooser::~cRecMenuItemDayChooser(void) {
if (pixmapWeekdays) if (pixmapWeekdays)
osdManager.releasePixmap(pixmapWeekdays); osdManager.DestroyPixmap(pixmapWeekdays);
if (pixmapWeekdaysSelect) if (pixmapWeekdaysSelect)
osdManager.releasePixmap(pixmapWeekdaysSelect); osdManager.DestroyPixmap(pixmapWeekdaysSelect);
} }
void cRecMenuItemDayChooser::SetPixmaps(void) { void cRecMenuItemDayChooser::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapWeekdays = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapWeekdays = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapWeekdaysSelect = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapWeekdaysSelect = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapWeekdays->SetViewPort(cRect(x, y, width, height)); pixmapWeekdays->SetViewPort(cRect(x, y, width, height));
@ -2286,13 +2286,13 @@ cRecMenuItemRecording::cRecMenuItemRecording(const cRecording *recording, bool a
cRecMenuItemRecording::~cRecMenuItemRecording(void) { cRecMenuItemRecording::~cRecMenuItemRecording(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
} }
void cRecMenuItemRecording::SetPixmaps(void) { void cRecMenuItemRecording::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapText->Fill(clrTransparent); pixmapText->Fill(clrTransparent);
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
@ -2371,20 +2371,20 @@ cRecMenuItemTimelineHeader::cRecMenuItemTimelineHeader(time_t day, int numTimers
cRecMenuItemTimelineHeader::~cRecMenuItemTimelineHeader(void) { cRecMenuItemTimelineHeader::~cRecMenuItemTimelineHeader(void) {
if (pixmapTimeline) if (pixmapTimeline)
osdManager.releasePixmap(pixmapTimeline); osdManager.DestroyPixmap(pixmapTimeline);
if (pixmapTimerInfo) if (pixmapTimerInfo)
osdManager.releasePixmap(pixmapTimerInfo); osdManager.DestroyPixmap(pixmapTimerInfo);
if (pixmapTimerConflicts) if (pixmapTimerConflicts)
osdManager.releasePixmap(pixmapTimerConflicts); osdManager.DestroyPixmap(pixmapTimerConflicts);
} }
void cRecMenuItemTimelineHeader::SetPixmaps(void) { void cRecMenuItemTimelineHeader::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapTimeline = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapTimeline = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapTimerInfo = osdManager.requestPixmap(6, cRect(x, y + 3 * font->Height() / 2, width, 2 * font->Height())); pixmapTimerInfo = osdManager.CreatePixmap(6, cRect(x, y + 3 * font->Height() / 2, width, 2 * font->Height()));
if (conflicts.size() > 0) { if (conflicts.size() > 0) {
pixmapTimerConflicts = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapTimerConflicts = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} }
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
@ -2560,17 +2560,17 @@ cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(const cTimer *timer, time_t
cRecMenuItemTimelineTimer::~cRecMenuItemTimelineTimer(void) { cRecMenuItemTimelineTimer::~cRecMenuItemTimelineTimer(void) {
if (pixmapBack) if (pixmapBack)
osdManager.releasePixmap(pixmapBack); osdManager.DestroyPixmap(pixmapBack);
if (pixmapTimerConflicts) if (pixmapTimerConflicts)
osdManager.releasePixmap(pixmapTimerConflicts); osdManager.DestroyPixmap(pixmapTimerConflicts);
} }
void cRecMenuItemTimelineTimer::SetPixmaps(void) { void cRecMenuItemTimelineTimer::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmapBack = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmapBack = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmap = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(5, cRect(x, y, width, height));
if (conflicts.size() > 0) { if (conflicts.size() > 0) {
pixmapTimerConflicts = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapTimerConflicts = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} }
} else { } else {
pixmapBack->SetViewPort(cRect(x, y, width, height)); pixmapBack->SetViewPort(cRect(x, y, width, height));
@ -2727,16 +2727,16 @@ cRecMenuItemSearchTimer::cRecMenuItemSearchTimer(cTVGuideSearchTimer timer,
cRecMenuItemSearchTimer::~cRecMenuItemSearchTimer(void) { cRecMenuItemSearchTimer::~cRecMenuItemSearchTimer(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
} }
void cRecMenuItemSearchTimer::SetPixmaps(void) { void cRecMenuItemSearchTimer::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapText->SetViewPort(cRect(x, y, width, height)); pixmapText->SetViewPort(cRect(x, y, width, height));
@ -2854,16 +2854,16 @@ cRecMenuItemFavorite::cRecMenuItemFavorite(cTVGuideSearchTimer favorite,
cRecMenuItemFavorite::~cRecMenuItemFavorite(void) { cRecMenuItemFavorite::~cRecMenuItemFavorite(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
} }
void cRecMenuItemFavorite::SetPixmaps(void) { void cRecMenuItemFavorite::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapText->SetViewPort(cRect(x, y, width, height)); pixmapText->SetViewPort(cRect(x, y, width, height));
@ -2929,16 +2929,16 @@ cRecMenuItemFavoriteStatic::cRecMenuItemFavoriteStatic(std::string text, eRecMen
cRecMenuItemFavoriteStatic::~cRecMenuItemFavoriteStatic(void) { cRecMenuItemFavoriteStatic::~cRecMenuItemFavoriteStatic(void) {
if (pixmapText) if (pixmapText)
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
if (pixmapIcons) if (pixmapIcons)
osdManager.releasePixmap(pixmapIcons); osdManager.DestroyPixmap(pixmapIcons);
} }
void cRecMenuItemFavoriteStatic::SetPixmaps(void) { void cRecMenuItemFavoriteStatic::SetPixmaps(void) {
if (!pixmap) { if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height)); pixmap = osdManager.CreatePixmap(4, cRect(x, y, width, height));
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height)); pixmapText = osdManager.CreatePixmap(5, cRect(x, y, width, height));
pixmapIcons = osdManager.requestPixmap(6, cRect(x, y, width, height)); pixmapIcons = osdManager.CreatePixmap(6, cRect(x, y, width, height));
} else { } else {
pixmap->SetViewPort(cRect(x, y, width, height)); pixmap->SetViewPort(cRect(x, y, width, height));
pixmapText->SetViewPort(cRect(x, y, width, height)); pixmapText->SetViewPort(cRect(x, y, width, height));

View File

@ -37,7 +37,7 @@ void cRecMenuView::Start(const cEvent *event) {
this->event = event; this->event = event;
activeMenu = new cRecMenuMain(recManager->EpgSearchAvailable(), recManager->CheckEventForTimer(event), SwitchTimers.EventInSwitchList(event)); activeMenu = new cRecMenuMain(recManager->EpgSearchAvailable(), recManager->CheckEventForTimer(event), SwitchTimers.EventInSwitchList(event));
activeMenu->Display(); activeMenu->Display();
osdManager.flush(); osdManager.Flush();
} }
void cRecMenuView::StartFavorites(void) { void cRecMenuView::StartFavorites(void) {
@ -49,7 +49,7 @@ void cRecMenuView::StartFavorites(void) {
recManager->GetFavorites(&favorites); recManager->GetFavorites(&favorites);
activeMenu = new cRecMenuFavorites(favorites); activeMenu = new cRecMenuFavorites(favorites);
activeMenu->Display(); activeMenu->Display();
osdManager.flush(); osdManager.Flush();
} }
@ -70,7 +70,7 @@ void cRecMenuView::Close(void) {
void cRecMenuView::SetBackground(void) { void cRecMenuView::SetBackground(void) {
int backgroundWidth = geoManager.osdWidth; int backgroundWidth = geoManager.osdWidth;
int backgroundHeight = geoManager.osdHeight; int backgroundHeight = geoManager.osdHeight;
pixmapBackground = osdManager.requestPixmap(3, cRect(0, 0, backgroundWidth, backgroundHeight)); pixmapBackground = osdManager.CreatePixmap(3, cRect(0, 0, backgroundWidth, backgroundHeight));
pixmapBackground->Fill(theme.Color(clrRecMenuBackground)); pixmapBackground->Fill(theme.Color(clrRecMenuBackground));
if (config.scaleVideo) { if (config.scaleVideo) {
int tvHeight = geoManager.statusHeaderHeight; int tvHeight = geoManager.statusHeaderHeight;
@ -81,7 +81,7 @@ void cRecMenuView::SetBackground(void) {
} }
void cRecMenuView::DeleteBackground(void) { void cRecMenuView::DeleteBackground(void) {
osdManager.releasePixmap(pixmapBackground); osdManager.DestroyPixmap(pixmapBackground);
} }
void cRecMenuView::DisplaySearchTimerList(void) { void cRecMenuView::DisplaySearchTimerList(void) {
@ -994,12 +994,12 @@ eOSState cRecMenuView::ProcessKey(eKeys Key) {
activeMenu->UpdateActiveMenuItem(); activeMenu->UpdateActiveMenuItem();
activeMenu->Show(); activeMenu->Show();
state = osContinue; state = osContinue;
osdManager.flush(); osdManager.Flush();
} }
return state; return state;
} }
state = StateMachine(nextState); state = StateMachine(nextState);
} }
osdManager.flush(); osdManager.Flush();
return state; return state;
} }

View File

@ -9,14 +9,14 @@ cStatusHeader::cStatusHeader(void) {
height = geoManager.statusHeaderHeight; height = geoManager.statusHeaderHeight;
width = geoManager.headerContentWidth; width = geoManager.headerContentWidth;
tvFrameWidth = geoManager.tvFrameWidth; tvFrameWidth = geoManager.tvFrameWidth;
pixmap = osdManager.requestPixmap(1, cRect(0, 0, width, height)); pixmap = osdManager.CreatePixmap(1, cRect(0, 0, width, height));
pixmapText = osdManager.requestPixmap(2, cRect(0, 0, width, height)); pixmapText = osdManager.CreatePixmap(2, cRect(0, 0, width, height));
pixmapTVFrame = osdManager.requestPixmap(1, cRect(width, 0, tvFrameWidth, height)); pixmapTVFrame = osdManager.CreatePixmap(1, cRect(width, 0, tvFrameWidth, height));
} }
cStatusHeader::~cStatusHeader(void) { cStatusHeader::~cStatusHeader(void) {
osdManager.releasePixmap(pixmapText); osdManager.DestroyPixmap(pixmapText);
osdManager.releasePixmap(pixmapTVFrame); osdManager.DestroyPixmap(pixmapTVFrame);
if (config.scaleVideo) { if (config.scaleVideo) {
cRect vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null); cRect vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null);
cDevice::PrimaryDevice()->ScaleVideo(vidWin); cDevice::PrimaryDevice()->ScaleVideo(vidWin);

View File

@ -12,7 +12,7 @@ cStyledPixmap::cStyledPixmap(cPixmap *pixmap) {
cStyledPixmap::~cStyledPixmap(void) { cStyledPixmap::~cStyledPixmap(void) {
if (pixmap) if (pixmap)
osdManager.releasePixmap(pixmap); osdManager.DestroyPixmap(pixmap);
} }
void cStyledPixmap::setPixmap(cPixmap *pixmap) { void cStyledPixmap::setPixmap(cPixmap *pixmap) {

View File

@ -25,9 +25,9 @@ cTimeLine::cTimeLine(cTimeManager *timeManager) {
y12 = geoManager.statusHeaderHeight; y12 = geoManager.statusHeaderHeight;
y22 = geoManager.timeLineHeight; y22 = geoManager.timeLineHeight;
} }
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(x11, y11, x21, y21))); dateViewer = new cStyledPixmap(osdManager.CreatePixmap(1, cRect(x11, y11, x21, y21)));
timeline = osdManager.requestPixmap(2, cRect(x12, y12, x22, y22)); timeline = osdManager.CreatePixmap(2, cRect(x12, y12, x22, y22));
clock = new cStyledPixmap(osdManager.requestPixmap(3, cRect(0, clock = new cStyledPixmap(osdManager.CreatePixmap(3, cRect(0,
geoManager.statusHeaderHeight, geoManager.statusHeaderHeight,
geoManager.clockWidth, geoManager.clockWidth,
geoManager.clockHeight))); geoManager.clockHeight)));
@ -36,8 +36,8 @@ cTimeLine::cTimeLine(cTimeManager *timeManager) {
cTimeLine::~cTimeLine(void) { cTimeLine::~cTimeLine(void) {
if (clock) if (clock)
delete clock; delete clock;
osdManager.releasePixmap(timeBase); osdManager.DestroyPixmap(timeBase);
osdManager.releasePixmap(timeline); osdManager.DestroyPixmap(timeline);
if (dateViewer) if (dateViewer)
delete dateViewer; delete dateViewer;
} }
@ -205,7 +205,7 @@ void cTimeLine::DrawTimeIndicator(void) {
return; return;
} }
int deltaTime = (time(0) - timeManager->GetStart()) / 60 * geoManager.minutePixel; int deltaTime = (time(0) - timeManager->GetStart()) / 60 * geoManager.minutePixel;
osdManager.releasePixmap(timeBase); osdManager.DestroyPixmap(timeBase);
int x1, x2, y1, y2; int x1, x2, y1, y2;
if (config.displayMode == eVertical) { if (config.displayMode == eVertical) {
x1 = 0; x1 = 0;
@ -218,7 +218,7 @@ void cTimeLine::DrawTimeIndicator(void) {
x2 = 4; x2 = 4;
y2 = geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight; y2 = geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight;
} }
timeBase = osdManager.requestPixmap(3, cRect(x1, y1, x2, y2)); timeBase = osdManager.CreatePixmap(3, cRect(x1, y1, x2, y2));
timeBase->Fill(clrTransparent); timeBase->Fill(clrTransparent);
timeBase->DrawRectangle(cRect(0, 0, timeBase->ViewPort().Width(), timeBase->ViewPort().Height()), theme.Color(clrTimeBase)); timeBase->DrawRectangle(cRect(0, 0, timeBase->ViewPort().Width(), timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
} }

View File

@ -33,14 +33,12 @@ cTvGuideOsd::~cTvGuideOsd() {
delete recMenuView; delete recMenuView;
if (channelJumper) if (channelJumper)
delete channelJumper; delete channelJumper;
osdManager.deleteOsd(); osdManager.DeleteOsd();
} }
void cTvGuideOsd::Show(void) { void cTvGuideOsd::Show(void) {
int start = cTimeMs::Now(); int start = cTimeMs::Now();
bool ok = false; if (osdManager.CreateOsd()) {
ok = osdManager.setOsd();
if (ok) {
bool themeChanged = config.LoadTheme(); bool themeChanged = config.LoadTheme();
config.SetStyle(); config.SetStyle();
config.setDynamicValues(); config.setDynamicValues();
@ -51,7 +49,7 @@ void cTvGuideOsd::Show(void) {
imgCache.Clear(); imgCache.Clear();
imgCache.CreateCache(); imgCache.CreateCache();
} }
osdManager.setBackground(); osdManager.SetBackground();
timeManager = new cTimeManager(); timeManager = new cTimeManager();
timeManager->Now(); timeManager->Now();
SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf")); SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf"));
@ -125,10 +123,10 @@ void cTvGuideOsd::drawOsd() {
footer->drawYellowButton(); footer->drawYellowButton();
} }
footer->drawBlueButton(false); footer->drawBlueButton(false);
osdManager.flush(); osdManager.Flush();
readChannels(newStartChannel); readChannels(newStartChannel);
drawGridsChannelJump(offset); drawGridsChannelJump(offset);
osdManager.flush(); osdManager.Flush();
cPixmap::Unlock(); cPixmap::Unlock();
} }
@ -289,7 +287,7 @@ void cTvGuideOsd::channelForward() {
if (activeGrid && (config.channelJumpMode == eGroupJump)) { if (activeGrid && (config.channelJumpMode == eGroupJump)) {
footer->UpdateGroupButtons(activeGrid->column->getChannel()); footer->UpdateGroupButtons(activeGrid->column->getChannel());
} }
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::channelBack() { void cTvGuideOsd::channelBack() {
@ -347,7 +345,7 @@ void cTvGuideOsd::channelBack() {
if (activeGrid && (config.channelJumpMode == eGroupJump)) { if (activeGrid && (config.channelJumpMode == eGroupJump)) {
footer->UpdateGroupButtons(activeGrid->column->getChannel()); footer->UpdateGroupButtons(activeGrid->column->getChannel());
} }
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::timeForward() { void cTvGuideOsd::timeForward() {
@ -367,7 +365,7 @@ void cTvGuideOsd::timeForward() {
if (!actionDone) { if (!actionDone) {
ScrollForward(); ScrollForward();
} }
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::ScrollForward() { void cTvGuideOsd::ScrollForward() {
@ -406,7 +404,7 @@ void cTvGuideOsd::timeBack() {
if (!actionDone) { if (!actionDone) {
ScrollBack(); ScrollBack();
} }
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::ScrollBack() { void cTvGuideOsd::ScrollBack() {
@ -518,7 +516,7 @@ void cTvGuideOsd::processKeyGreen() {
else else
drawGridsChannelJump(currentCol); drawGridsChannelJump(currentCol);
} }
osdManager.flush(); osdManager.Flush();
} }
} }
@ -568,7 +566,7 @@ void cTvGuideOsd::processKeyYellow() {
else else
drawGridsChannelJump(currentCol); drawGridsChannelJump(currentCol);
} }
osdManager.flush(); osdManager.Flush();
} }
} }
@ -619,9 +617,9 @@ void cTvGuideOsd::DetailedEPG() {
detailViewActive = true; detailViewActive = true;
detailView = new cDetailView(activeGrid->GetEvent(), footer); detailView = new cDetailView(activeGrid->GetEvent(), footer);
footer->SetDetailedViewMode(); footer->SetDetailedViewMode();
osdManager.flush(); osdManager.Flush();
detailView->Start(); detailView->Start();
osdManager.flush(); osdManager.Flush();
} }
} }
@ -675,7 +673,7 @@ void cTvGuideOsd::TimeJump(int mode) {
timeLine->DrawDateViewer(); timeLine->DrawDateViewer();
timeLine->DrawClock(); timeLine->DrawClock();
timeLine->DrawTimeline(); timeLine->DrawTimeline();
osdManager.flush(); osdManager.Flush();
} }
int cTvGuideOsd::GetLastValidChannel(void) { int cTvGuideOsd::GetLastValidChannel(void) {
@ -689,7 +687,7 @@ void cTvGuideOsd::ChannelJump(int num) {
} }
channelJumper->Set(num); channelJumper->Set(num);
channelJumper->DrawText(); channelJumper->DrawText();
osdManager.flush(); osdManager.Flush();
} }
void cTvGuideOsd::CheckTimeout(void) { void cTvGuideOsd::CheckTimeout(void) {
@ -714,7 +712,7 @@ void cTvGuideOsd::CheckTimeout(void) {
drawGridsChannelJump(); drawGridsChannelJump();
} }
} }
osdManager.flush(); osdManager.Flush();
} }
} }
@ -732,7 +730,7 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
state = recMenuView->ProcessKey(Key); state = recMenuView->ProcessKey(Key);
if (state == osEnd) { if (state == osEnd) {
SetTimers(); SetTimers();
osdManager.flush(); osdManager.Flush();
} }
state = osContinue; state = osContinue;
} else if (detailViewActive) { } else if (detailViewActive) {
@ -748,7 +746,7 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
if ((config.blueKeyMode == eBlueKeySwitch) || (config.blueKeyMode == eBlueKeyFavorites)) { if ((config.blueKeyMode == eBlueKeySwitch) || (config.blueKeyMode == eBlueKeyFavorites)) {
state = ChannelSwitch(&alreadyUnlocked); state = ChannelSwitch(&alreadyUnlocked);
} else { } else {
osdManager.flush(); osdManager.Flush();
state = osContinue; state = osContinue;
} }
} else if ((Key & ~k_Repeat) == kOk && (config.blueKeyMode == eBlueKeyEPG)) { } else if ((Key & ~k_Repeat) == kOk && (config.blueKeyMode == eBlueKeyEPG)) {
@ -762,7 +760,7 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
delete detailView; delete detailView;
detailView = NULL; detailView = NULL;
detailViewActive = false; detailViewActive = false;
osdManager.flush(); osdManager.Flush();
state = osContinue; state = osContinue;
} }
} }
@ -787,7 +785,7 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
default: break; default: break;
} }
if (timeLine->DrawClock()) { if (timeLine->DrawClock()) {
osdManager.flush(); osdManager.Flush();
} }
} }
if (!alreadyUnlocked) { if (!alreadyUnlocked) {

68
view.c
View File

@ -41,19 +41,19 @@ cView::cView(void) : cThread("View") {
cView::~cView(void) { cView::~cView(void) {
if (pixmapBackground) if (pixmapBackground)
osdManager.releasePixmap(pixmapBackground); osdManager.DestroyPixmap(pixmapBackground);
if (pixmapHeader) if (pixmapHeader)
delete pixmapHeader; delete pixmapHeader;
if (pixmapHeaderLogo) if (pixmapHeaderLogo)
osdManager.releasePixmap(pixmapHeaderLogo); osdManager.DestroyPixmap(pixmapHeaderLogo);
if (pixmapContent) if (pixmapContent)
osdManager.releasePixmap(pixmapContent); osdManager.DestroyPixmap(pixmapContent);
if (pixmapTabs) if (pixmapTabs)
osdManager.releasePixmap(pixmapTabs); osdManager.DestroyPixmap(pixmapTabs);
if (pixmapScrollbar) if (pixmapScrollbar)
osdManager.releasePixmap(pixmapScrollbar); osdManager.DestroyPixmap(pixmapScrollbar);
if (pixmapScrollbarBack) if (pixmapScrollbarBack)
osdManager.releasePixmap(pixmapScrollbarBack); osdManager.DestroyPixmap(pixmapScrollbarBack);
if (imgScrollBar) if (imgScrollBar)
delete imgScrollBar; delete imgScrollBar;
} }
@ -81,11 +81,11 @@ void cView::SetGeometry(void) {
void cView::DrawHeader(void) { void cView::DrawHeader(void) {
if (!pixmapHeader) { if (!pixmapHeader) {
pixmapHeader = new cStyledPixmap(osdManager.requestPixmap(5, cRect(0, 0, headerWidth, headerHeight))); pixmapHeader = new cStyledPixmap(osdManager.CreatePixmap(5, cRect(0, 0, headerWidth, headerHeight)));
pixmapHeader->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending)); pixmapHeader->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
} }
if (!pixmapHeaderLogo) { if (!pixmapHeaderLogo) {
pixmapHeaderLogo = osdManager.requestPixmap(6, cRect(0, 0, width, headerHeight)); pixmapHeaderLogo = osdManager.CreatePixmap(6, cRect(0, 0, width, headerHeight));
} }
pixmapHeader->Fill(clrTransparent); pixmapHeader->Fill(clrTransparent);
pixmapHeaderLogo->Fill(clrTransparent); pixmapHeaderLogo->Fill(clrTransparent);
@ -168,7 +168,7 @@ void cView::DrawHeader(void) {
void cView::DrawTabs(void) { void cView::DrawTabs(void) {
if (!pixmapTabs) { if (!pixmapTabs) {
pixmapTabs = osdManager.requestPixmap(4, cRect(0, y + headerHeight + contentHeight, width + scrollbarWidth, tabHeight)); pixmapTabs = osdManager.CreatePixmap(4, cRect(0, y + headerHeight + contentHeight, width + scrollbarWidth, tabHeight));
} }
tColor bgColor = theme.Color(clrTabInactive); tColor bgColor = theme.Color(clrTabInactive);
pixmapTabs->Fill(clrTransparent); pixmapTabs->Fill(clrTransparent);
@ -195,18 +195,18 @@ void cView::DrawTabs(void) {
void cView::ClearContent(void) { void cView::ClearContent(void) {
if (pixmapContent && Running()) { if (pixmapContent && Running()) {
osdManager.releasePixmap(pixmapContent); osdManager.DestroyPixmap(pixmapContent);
pixmapContent = NULL; pixmapContent = NULL;
} }
if (pixmapBackground && Running()) { if (pixmapBackground && Running()) {
osdManager.releasePixmap(pixmapBackground); osdManager.DestroyPixmap(pixmapBackground);
pixmapBackground = NULL; pixmapBackground = NULL;
} }
} }
void cView::CreateContent(int fullHeight) { void cView::CreateContent(int fullHeight) {
scrollable = false; scrollable = false;
pixmapBackground = osdManager.requestPixmap(3, cRect(x, y + headerHeight, width + scrollbarWidth, contentHeight + tabHeight)); pixmapBackground = osdManager.CreatePixmap(3, cRect(x, y + headerHeight, width + scrollbarWidth, contentHeight + tabHeight));
pixmapBackground->Fill(theme.Color(clrBackground)); pixmapBackground->Fill(theme.Color(clrBackground));
int drawPortHeight = contentHeight; int drawPortHeight = contentHeight;
@ -214,7 +214,7 @@ void cView::CreateContent(int fullHeight) {
drawPortHeight = fullHeight; drawPortHeight = fullHeight;
scrollable = true; scrollable = true;
} }
pixmapContent = osdManager.requestPixmap(4, cRect(x, y + headerHeight, width, contentHeight), cRect(0, 0, width, drawPortHeight)); pixmapContent = osdManager.CreatePixmap(4, cRect(x, y + headerHeight, width, contentHeight), cRect(0, 0, width, drawPortHeight));
pixmapContent->Fill(clrTransparent); pixmapContent->Fill(clrTransparent);
} }
@ -264,7 +264,7 @@ void cView::DrawFloatingContent(std::string *infoText, cTvMedia *img, cTvMedia *
pixmapContent->DrawText(cPoint(border, yText), wTextFull.GetLine(i), theme.Color(clrFont), clrTransparent, font); pixmapContent->DrawText(cPoint(border, yText), wTextFull.GetLine(i), theme.Color(clrFont), clrTransparent, font);
yText += lineHeight; yText += lineHeight;
} }
osdManager.flush(); osdManager.Flush();
cImageLoader imgLoader; cImageLoader imgLoader;
if (imgLoader.LoadPoster(img->path.c_str(), imgWidth, imgHeight)) { if (imgLoader.LoadPoster(img->path.c_str(), imgWidth, imgHeight)) {
if (Running() && pixmapContent) if (Running() && pixmapContent)
@ -272,7 +272,7 @@ void cView::DrawFloatingContent(std::string *infoText, cTvMedia *img, cTvMedia *
} }
if (!img2) if (!img2)
return; return;
osdManager.flush(); osdManager.Flush();
if (imgLoader.LoadPoster(img2->path.c_str(), imgWidth2, imgHeight2)) { if (imgLoader.LoadPoster(img2->path.c_str(), imgWidth2, imgHeight2)) {
if (Running() && pixmapContent) if (Running() && pixmapContent)
pixmapContent->DrawImage(cPoint(width - imgWidth2 - border, imgHeight + 2 * border), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint(width - imgWidth2 - border, imgHeight + 2 * border), imgLoader.GetImage());
@ -401,7 +401,7 @@ void cView::DrawActors(std::vector<cActor> *actors) {
} }
actor++; actor++;
} }
osdManager.flush(); osdManager.Flush();
x = 0; x = 0;
y += thumbHeight + 2 * fontSmall->Height() + border + border/2; y += thumbHeight + 2 * fontSmall->Height() + border + border/2;
} }
@ -427,11 +427,11 @@ void cView::DrawScrollbar(void) {
return; return;
if (!pixmapScrollbar) { if (!pixmapScrollbar) {
pixmapScrollbar = osdManager.requestPixmap(6, cRect(width, y + headerHeight, scrollbarWidth, contentHeight)); pixmapScrollbar = osdManager.CreatePixmap(6, cRect(width, y + headerHeight, scrollbarWidth, contentHeight));
pixmapScrollbar->Fill(clrTransparent); pixmapScrollbar->Fill(clrTransparent);
} }
if (!pixmapScrollbarBack) { if (!pixmapScrollbarBack) {
pixmapScrollbarBack = osdManager.requestPixmap(5, cRect(width, y + headerHeight, scrollbarWidth, contentHeight)); pixmapScrollbarBack = osdManager.CreatePixmap(5, cRect(width, y + headerHeight, scrollbarWidth, contentHeight));
pixmapScrollbarBack->Fill(clrTransparent); pixmapScrollbarBack->Fill(clrTransparent);
} }
@ -587,7 +587,7 @@ void cEPGView::DrawImages(void) {
if (drawPic) { if (drawPic) {
pixmapContent->DrawImage(cPoint((width - imgWidth) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - imgWidth) / 2, yPic), imgLoader.GetImage());
yPic += imgHeight + border; yPic += imgHeight + border;
osdManager.flush(); osdManager.Flush();
} }
} }
} }
@ -612,7 +612,7 @@ void cEPGView::Action(void) {
ClearContent(); ClearContent();
if (!headerDrawn) { if (!headerDrawn) {
DrawHeader(); DrawHeader();
osdManager.flush(); osdManager.Flush();
headerDrawn = true; headerDrawn = true;
} }
if (tabs.size() == 0) { if (tabs.size() == 0) {
@ -632,7 +632,7 @@ void cEPGView::Action(void) {
break; break;
} }
DrawScrollbar(); DrawScrollbar();
osdManager.flush(); osdManager.Flush();
} }
/******************************************************************************************** /********************************************************************************************
@ -755,32 +755,32 @@ void cSeriesView::DrawImages(void) {
if (imgLoader.LoadPoster(series.banners[i].path.c_str(), series.banners[i].width, series.banners[i].height) && Running()) { if (imgLoader.LoadPoster(series.banners[i].path.c_str(), series.banners[i].width, series.banners[i].height) && Running()) {
pixmapContent->DrawImage(cPoint((width - series.banners[i].width) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - series.banners[i].width) / 2, yPic), imgLoader.GetImage());
yPic += series.banners[i].height + border; yPic += series.banners[i].height + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (imgLoader.LoadPoster(series.fanarts[i].path.c_str(), fanartWidth, fanartHeight) && Running()) { if (imgLoader.LoadPoster(series.fanarts[i].path.c_str(), fanartWidth, fanartHeight) && Running()) {
pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage());
yPic += fanartHeight + border; yPic += fanartHeight + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (numPosters >= 1) { if (numPosters >= 1) {
if (imgLoader.LoadPoster(series.posters[0].path.c_str(), posterWidth, posterHeight) && Running()) { if (imgLoader.LoadPoster(series.posters[0].path.c_str(), posterWidth, posterHeight) && Running()) {
pixmapContent->DrawImage(cPoint(border, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint(border, yPic), imgLoader.GetImage());
osdManager.flush(); osdManager.Flush();
yPic += posterHeight + border; yPic += posterHeight + border;
} }
} }
if (numPosters >= 2) { if (numPosters >= 2) {
if (imgLoader.LoadPoster(series.posters[1].path.c_str(), posterWidth, posterHeight) && Running()) { if (imgLoader.LoadPoster(series.posters[1].path.c_str(), posterWidth, posterHeight) && Running()) {
pixmapContent->DrawImage(cPoint(2 * border + posterWidth, yPic - posterHeight - border), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint(2 * border + posterWidth, yPic - posterHeight - border), imgLoader.GetImage());
osdManager.flush(); osdManager.Flush();
} }
} }
if (numPosters == 3) { if (numPosters == 3) {
if (imgLoader.LoadPoster(series.posters[2].path.c_str(), posterWidth, posterHeight) && Running()) { if (imgLoader.LoadPoster(series.posters[2].path.c_str(), posterWidth, posterHeight) && Running()) {
pixmapContent->DrawImage(cPoint((width - posterWidth) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - posterWidth) / 2, yPic), imgLoader.GetImage());
osdManager.flush(); osdManager.Flush();
} }
} }
} }
@ -814,7 +814,7 @@ void cSeriesView::Action(void) {
ClearContent(); ClearContent();
if (!headerDrawn) { if (!headerDrawn) {
DrawHeader(); DrawHeader();
osdManager.flush(); osdManager.Flush();
headerDrawn = true; headerDrawn = true;
} }
if (tabs.size() == 0) { if (tabs.size() == 0) {
@ -856,7 +856,7 @@ void cSeriesView::Action(void) {
break; break;
} }
DrawScrollbar(); DrawScrollbar();
osdManager.flush(); osdManager.Flush();
} }
/******************************************************************************************** /********************************************************************************************
@ -982,28 +982,28 @@ void cMovieView::DrawImages(void) {
if (imgLoader.LoadPoster(movie.fanart.path.c_str(), fanartWidth, fanartHeight) && Running()) { if (imgLoader.LoadPoster(movie.fanart.path.c_str(), fanartWidth, fanartHeight) && Running()) {
pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage());
yPic += fanartHeight + border; yPic += fanartHeight + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (movie.collectionFanart.width > 0 && movie.collectionFanart.height > 0 && movie.collectionFanart.path.size() > 0) { if (movie.collectionFanart.width > 0 && movie.collectionFanart.height > 0 && movie.collectionFanart.path.size() > 0) {
if (imgLoader.LoadPoster(movie.collectionFanart.path.c_str(), collectionFanartWidth, collectionFanartHeight) && Running()) { if (imgLoader.LoadPoster(movie.collectionFanart.path.c_str(), collectionFanartWidth, collectionFanartHeight) && Running()) {
pixmapContent->DrawImage(cPoint((width - collectionFanartWidth)/2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - collectionFanartWidth)/2, yPic), imgLoader.GetImage());
yPic += collectionFanartHeight + border; yPic += collectionFanartHeight + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (movie.poster.width > 0 && movie.poster.height > 0 && movie.poster.path.size() > 0) { if (movie.poster.width > 0 && movie.poster.height > 0 && movie.poster.path.size() > 0) {
if (imgLoader.LoadPoster(movie.poster.path.c_str(), movie.poster.width, movie.poster.height) && Running()) { if (imgLoader.LoadPoster(movie.poster.path.c_str(), movie.poster.width, movie.poster.height) && Running()) {
pixmapContent->DrawImage(cPoint((width - movie.poster.width) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - movie.poster.width) / 2, yPic), imgLoader.GetImage());
yPic += movie.poster.height + border; yPic += movie.poster.height + border;
osdManager.flush(); osdManager.Flush();
} }
} }
if (movie.collectionPoster.width > 0 && movie.collectionPoster.height > 0 && movie.collectionPoster.path.size() > 0) { if (movie.collectionPoster.width > 0 && movie.collectionPoster.height > 0 && movie.collectionPoster.path.size() > 0) {
if (imgLoader.LoadPoster(movie.collectionPoster.path.c_str(), movie.collectionPoster.width, movie.collectionPoster.height) && Running()) { if (imgLoader.LoadPoster(movie.collectionPoster.path.c_str(), movie.collectionPoster.width, movie.collectionPoster.height) && Running()) {
pixmapContent->DrawImage(cPoint((width - movie.collectionPoster.width) / 2, yPic), imgLoader.GetImage()); pixmapContent->DrawImage(cPoint((width - movie.collectionPoster.width) / 2, yPic), imgLoader.GetImage());
yPic += movie.collectionPoster.height + border; yPic += movie.collectionPoster.height + border;
osdManager.flush(); osdManager.Flush();
} }
} }
} }
@ -1028,7 +1028,7 @@ void cMovieView::Action(void) {
ClearContent(); ClearContent();
if (!headerDrawn) { if (!headerDrawn) {
DrawHeader(); DrawHeader();
osdManager.flush(); osdManager.Flush();
headerDrawn = true; headerDrawn = true;
} }
if (tabs.size() == 0) { if (tabs.size() == 0) {
@ -1064,5 +1064,5 @@ void cMovieView::Action(void) {
break; break;
} }
DrawScrollbar(); DrawScrollbar();
osdManager.flush(); osdManager.Flush();
} }