]> git.vomp.tv Git - vompclient.git/blob - osd.h
Rename TCP class to TCPOld
[vompclient.git] / osd.h
1 /*
2     Copyright 2004-2005 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP.  If not, see <https://www.gnu.org/licenses/>.
18 */
19
20 #ifndef OSD_H
21 #define OSD_H
22
23 class Surface;
24
25 class Osd
26 {
27   public:
28     Osd();
29     virtual ~Osd();
30     static Osd* getInstance();
31
32     virtual int init()=0;
33     virtual int shutdown()=0;
34     virtual int restore() { return 1; };
35     virtual int stopUpdate() { return 1; };
36
37     virtual Surface * createNewSurface()=0; // For Boxx
38     virtual int charSet() { return 1; };
39
40     bool isInitted() { return initted; };
41
42     virtual int getFD()=0;
43
44     virtual void screenShot(const char* fileName)=0;
45
46     virtual int getFontNames(const char*** /* names */,const char*** /* names_keys */) { return 0; };
47     virtual void setFont(const char* /* fontname */) {};
48
49     virtual float getPixelAspect() { return 1.f; };
50
51   protected:
52     static Osd* instance;
53     bool initted{};
54     Surface* screen;
55     int fdOsd;
56 };
57
58 #endif