Merge branch 'vuplus_experimental' of 192.168.102.66:/var/ikseong/repo/enigma2 into...
[vuplus_dvbapp] / lib / gdi / sdl.h
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 <SDL.h>
8
9 class gSDLDC: public gMainDC, public eThread, public Object
10 {
11 private:
12         SDL_Surface *m_screen;
13         void exec(const gOpcode *opcode);
14
15         gSurface m_surface;
16
17         eFixedMessagePump<SDL_Event> m_pump;
18         void keyEvent(const SDL_Event &event);
19         void pumpEvent(const SDL_Event &event);
20         virtual void thread();
21
22         enum event {
23                 EV_SET_VIDEO_MODE,
24                 EV_FLIP,
25                 EV_QUIT,
26         };
27
28         void pushEvent(enum event code, void *data1 = 0, void *data2 = 0);
29         void evSetVideoMode(unsigned long xres, unsigned long yres);
30         void evFlip();
31
32 public:
33         void setResolution(int xres, int yres);
34         gSDLDC();
35         virtual ~gSDLDC();
36         int islocked() { return 0; }
37 };
38
39 #endif