openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
sdl.h
Go to the documentation of this file.
1
#ifndef __lib_gdi_sdl_h
2
#define __lib_gdi_sdl_h
3
4
#include <
lib/base/thread.h
>
5
#include <
lib/gdi/gmaindc.h
>
6
7
#include <SDL2/SDL.h>
8
9
class
gSDLDC
:
public
gMainDC
,
public
eThread
,
public
sigc::trackable
10
{
11
private
:
12
SDL_Surface *m_screen;
13
SDL_Window *m_window;
14
SDL_Renderer *m_render;
15
SDL_Texture *m_osd_tex;
16
SDL_Surface *m_osd;
17
18
void
exec(
const
gOpcode
*opcode);
19
20
gUnmanagedSurface
m_surface;
21
22
eFixedMessagePump<SDL_Event>
m_pump;
23
void
keyEvent(
const
SDL_Event &event);
24
void
pumpEvent(
const
SDL_Event &event);
25
virtual
void
thread();
26
27
enum
event
{
28
EV_SET_VIDEO_MODE,
29
EV_FLIP,
30
EV_QUIT,
31
};
32
33
void
pushEvent(
enum
event code,
void
*data1 = 0,
void
*data2 = 0);
34
void
evSetVideoMode(
unsigned
long
xres,
unsigned
long
yres);
35
void
evFlip();
36
37
public
:
38
void
setResolution
(
int
xres,
int
yres,
int
bpp = 32);
39
gSDLDC
();
40
virtual
~gSDLDC
();
41
int
islocked
()
const
{
return
0; }
42
};
43
44
#endif
eFixedMessagePump< SDL_Event >
eThread
Definition:
thread.h:27
gMainDC
Definition:
gmaindc.h:10
gSDLDC
Definition:
sdl.h:10
gSDLDC::gSDLDC
gSDLDC()
Definition:
sdl.cpp:10
gSDLDC::~gSDLDC
virtual ~gSDLDC()
Definition:
sdl.cpp:29
gSDLDC::setResolution
void setResolution(int xres, int yres, int bpp=32)
Definition:
sdl.cpp:86
gSDLDC::islocked
int islocked() const
Definition:
sdl.h:41
gmaindc.h
gOpcode
Definition:
grc.h:31
gUnmanagedSurface
Definition:
gpixmap.h:163
thread.h
lib
gdi
sdl.h
Generated by
1.9.1