1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
#ifndef __XINEOSD_H
#define __XINEOSD_H
#include "xineCommon.h"
#if APIVERSNUM < 10307
#include <vdr/osdbase.h>
#else
#include <vdr/osd.h>
#endif
#include <vdr/thread.h>
namespace PluginXine
{
class cXineDevice;
class cXineLib;
#if APIVERSNUM < 10307
class cXineOsd : public cOsdBase
#else
class cXineOsd : public cOsd
#endif
{
cXineDevice &m_xineDevice;
cXineLib &m_xineLib;
cMutex &m_osdMutex;
const int m_extentWidth;
const int m_extentHeight;
#if APIVERSNUM < 10307
bool m_windowVisible[ MAXNUMWINDOWS ];
#endif
#if APIVERSNUM >= 10717
cPixmapMemory *m_pRawOsd;
#endif
void callSendWindow(const int maxOsdWidth, const int maxOsdHeight, const int videoLeft, const int videoTop, const int videoWidth, const int videoHeight, const int videoZoomX, const int videoZoomY, const bool dontOptimize = false);
#if APIVERSNUM < 10307
virtual bool OpenWindow(cWindow *Window);
virtual void CommitWindow(cWindow *Window);
virtual void ShowWindow(cWindow *Window);
virtual void HideWindow(cWindow *Window, bool Hide);
virtual void MoveWindow(cWindow *Window, int x, int y);
virtual void CloseWindow(cWindow *Window);
#else
virtual void SetActive(bool On);
#if APIVERSNUM >= 10717
virtual cPixmap *CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort = cRect::Null);
virtual void DestroyPixmap(cPixmap *Pixmap);
virtual void DrawImage(const cPoint &Point, const cImage &Image);
virtual void DrawImage(const cPoint &Point, int ImageHandle);
#endif
virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas);
virtual eOsdError SetAreas(const tArea *Areas, int NumAreas);
virtual void SaveRegion(int x1, int y1, int x2, int y2);
virtual void RestoreRegion(void);
virtual eOsdError SetPalette(const cPalette &Palette, int Area);
virtual void DrawPixel(int x, int y, tColor Color);
#if APIVERSNUM < 10327
virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0);
#elif APIVERSNUM < 10344
virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0, bool ReplacePalette = false);
#else
virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0, bool ReplacePalette = false, bool Overlay = false);
#endif
virtual void DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width = 0, int Height = 0, int Alignment = taDefault);
virtual void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color);
virtual void DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quadrants = 0);
virtual void DrawSlope(int x1, int y1, int x2, int y2, tColor Color, int Type);
virtual void Flush(void);
#endif
void HideOsd();
void GetMaxOsdSize(int &maxOsdWidth, int &maxOsdHeight);
public:
#if APIVERSNUM < 10509
cXineOsd(cXineDevice &device, int w, int h, int x, int y);
#else
cXineOsd(cXineDevice &device, int w, int h, int x, int y, uint Level);
#endif
virtual ~cXineOsd();
void ReshowCurrentOsd(const bool dontOptimize, const int frameLeft = -1, const int frameTop = -1, const int frameWidth = -1, const int frameHeight = -1, const int frameZoomX = -1, const int frameZoomY = -1);
friend class cXineLib;
};
class cXineOsdMutexLock
{
cMutexLock *m_pOsdLock;
#if APIVERSNUM >= 10717
cPixmapMutexLock *m_pPixmapMutexLock;
#endif
public:
cXineOsdMutexLock(cMutex *const pOsdMutex);
~cXineOsdMutexLock();
};
#if APIVERSNUM >= 10307
class cXineOsdProvider : public cOsdProvider
{
cXineDevice &m_xineDevice;
public:
cXineOsdProvider(cXineDevice &xineDevice);
#if APIVERSNUM < 10509
virtual cOsd *CreateOsd(int Left, int Top);
#else
virtual cOsd *CreateOsd(int Left, int Top, uint Level);
virtual cOsd *CreateOsd(int ExtentWidth, int ExtentHeight, int Left, int Top, uint Level);
#endif
#if APIVERSNUM >= 10717
virtual bool ProvidesTrueColor(void);
#endif
};
#endif
};
#endif //__XINEOSD_H
|