1 |
dpavlin |
1 |
/* |
2 |
|
|
* HT Editor |
3 |
|
|
* syssdl.h |
4 |
|
|
* |
5 |
|
|
* Copyright (C) 2004 Stefan Weyergraf |
6 |
|
|
* |
7 |
|
|
* This program is free software; you can redistribute it and/or modify |
8 |
|
|
* it under the terms of the GNU General Public License version 2 as |
9 |
|
|
* published by the Free Software Foundation. |
10 |
|
|
* |
11 |
|
|
* This program 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 this program; if not, write to the Free Software |
18 |
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 |
|
|
*/ |
20 |
|
|
|
21 |
|
|
#ifndef __SYSSDL_H__ |
22 |
|
|
#define __SYSSDL_H__ |
23 |
|
|
|
24 |
|
|
#include <SDL.h> |
25 |
|
|
|
26 |
|
|
#include "system/display.h" |
27 |
|
|
#include "system/systhread.h" |
28 |
|
|
|
29 |
|
|
extern SDL_Surface * gSDLScreen; |
30 |
|
|
|
31 |
|
|
class SDLSystemDisplay: public SystemDisplay { |
32 |
|
|
protected: |
33 |
|
|
DisplayCharacteristics mSDLChar; |
34 |
|
|
byte * mSDLFrameBuffer; |
35 |
|
|
bool mChangingScreen; |
36 |
|
|
SDL_Surface * mSDLClientScreen; |
37 |
|
|
sys_mutex mRedrawMutex; |
38 |
|
|
SDL_Cursor * mVisibleCursor; |
39 |
|
|
SDL_Cursor * mInvisibleCursor; |
40 |
|
|
|
41 |
|
|
uint bitsPerPixelToXBitmapPad(uint bitsPerPixel); |
42 |
|
|
void dumpDisplayChar(const DisplayCharacteristics &chr); |
43 |
|
|
public: |
44 |
|
|
char * mTitle; |
45 |
|
|
DisplayCharacteristics mSDLChartemp; |
46 |
|
|
SDL_cond *mWaitcondition; |
47 |
|
|
bool mChangeResRet; |
48 |
|
|
uint32 mEventThreadID; |
49 |
|
|
|
50 |
|
|
SDLSystemDisplay(const char *title, const DisplayCharacteristics &chr, int redraw_ms); |
51 |
|
|
|
52 |
|
|
void finishMenu(); |
53 |
|
|
virtual void updateTitle(); |
54 |
|
|
virtual int toString(char *buf, int buflen) const; |
55 |
|
|
void toggleFullScreen(); |
56 |
|
|
virtual void displayShow(); |
57 |
|
|
virtual void convertCharacteristicsToHost(DisplayCharacteristics &aHostChar, const DisplayCharacteristics &aClientChar); |
58 |
|
|
virtual bool changeResolution(const DisplayCharacteristics &aCharacteristics); |
59 |
|
|
virtual bool changeResolutionREAL(const DisplayCharacteristics &aCharacteristics); |
60 |
|
|
virtual void getHostCharacteristics(Container &modes); |
61 |
|
|
virtual void setMouseGrab(bool enable); |
62 |
|
|
virtual void initCursor(); |
63 |
|
|
}; |
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
#endif |