summaryrefslogtreecommitdiff
path: root/osdmanager.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-11-10 15:37:28 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-06-18 17:03:15 +0200
commit93af9304c8d798e71f86fc5166cc4d323ed0f9f6 (patch)
treec96d878edeba357cedb0f07fc429d408fa715130 /osdmanager.c
parentd8663ff3096fcea38bf7d7b93dceec90a5fbabe2 (diff)
downloadvdr-plugin-tvguide-93af9304c8d798e71f86fc5166cc4d323ed0f9f6.tar.gz
vdr-plugin-tvguide-93af9304c8d798e71f86fc5166cc4d323ed0f9f6.tar.bz2
Cosmetic change in osdmanager.*
Diffstat (limited to 'osdmanager.c')
-rw-r--r--osdmanager.c36
1 files changed, 30 insertions, 6 deletions
diff --git a/osdmanager.c b/osdmanager.c
index e5dd46d..83a0fde 100644
--- a/osdmanager.c
+++ b/osdmanager.c
@@ -2,9 +2,18 @@
#include "osdmanager.h"
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());
if (osd) {
tArea Area = { 0, 0, cOsd::OsdWidth() - 1, cOsd::OsdHeight() - 1, 32 };
@@ -15,7 +24,14 @@ bool cOsdManager::setOsd() {
return false;
}
-void cOsdManager::setBackground() {
+void cOsdManager::DeleteOsd(void) {
+ Lock();
+ delete osd;
+ osd = NULL;
+ Unlock();
+}
+
+void cOsdManager::SetBackground(void) {
if (config.displayStatusHeader && config.scaleVideo) {
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) {
- return osd->CreatePixmap(Layer, ViewPort, DrawPort);
+cPixmap *cOsdManager::CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort) {
+ if (osd)
+ return osd->CreatePixmap(Layer, ViewPort, DrawPort);
+ return NULL;
}
-void cOsdManager::releasePixmap(cPixmap *pixmap) {
- if (!pixmap)
+void cOsdManager::DestroyPixmap(cPixmap *pixmap) {
+ if (!osd || !pixmap)
return;
osd->DestroyPixmap(pixmap);
}
+
+void cOsdManager::Flush(void) {
+ if (osd) {
+ osd->Flush();
+ }
+}