~flosoft/s25rttr/trunk

« back to all changes in this revision

Viewing changes to driver/video/SDL/src/SDL.h

  • Committer: FloSoft
  • Date: 2014-04-25 15:35:50 UTC
  • Revision ID: flosoft@siedler25.org-20140425153550-9muu4vodhlqu58m0
committing subversion revision 9357 by FloSoft
astyle

modified:
s25client/trunk/
s25client/trunk/contrib/lua/lin32/include/
s25client/trunk/contrib/lua/lin64/include/
s25client/trunk/contrib/lua/mac/include/
s25client/trunk/contrib/lua/win32/include/
s25client/trunk/contrib/lua/win64/include/
s25client/trunk/driver/audio/SDL/src/
s25client/trunk/driver/src/
s25client/trunk/driver/video/GLFW/src/
s25client/trunk/driver/video/SDL/src/
s25client/trunk/driver/video/WinAPI/src/
s25client/trunk/src/
s25client/trunk/win32/
s25client/trunk/win32/prebuild-mutex/src/

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: SDL.h 7521 2011-09-08 20:45:55Z FloSoft $
 
1
// $Id: SDL.h 9357 2014-04-25 15:35:25Z FloSoft $
2
2
//
3
3
// Copyright (c) 2005 - 2011 Settlers Freaks (sf-team at siedler25.org)
4
4
//
26
26
/// Klasse f�r den SDL Videotreiber.
27
27
class VideoSDL : public VideoDriver
28
28
{
29
 
public:
30
 
        /// Konstruktor von @p VideoSDL.
31
 
        VideoSDL(VideoDriverLoaderInterface * CallBack);
32
 
 
33
 
        /// Destruktor von @p VideoSDL.
34
 
        ~VideoSDL(void);
35
 
 
36
 
        /// Funktion zum Auslesen des Treibernamens.
37
 
        const char *GetName(void) const;
38
 
 
39
 
        /// Treiberinitialisierungsfunktion.
40
 
        bool Initialize(void);
41
 
 
42
 
        /// Treiberaufr�umfunktion.
43
 
        void CleanUp(void);
44
 
 
45
 
        /// Erstellt das Fenster mit entsprechenden Werten.
46
 
        bool CreateScreen(unsigned short width, unsigned short height, const bool fullscreen);
47
 
 
48
 
        /// Erstellt oder ver�ndert das Fenster mit entsprechenden Werten.
49
 
        bool ResizeScreen(unsigned short width, unsigned short height, const bool fullscreen);
50
 
 
51
 
        /// Schliesst das Fenster.
52
 
        void DestroyScreen(void);
53
 
 
54
 
        /// Wechselt die OpenGL-Puffer.
55
 
        bool SwapBuffers(void);
56
 
 
57
 
        /// Die Nachrichtenschleife.
58
 
        bool MessageLoop(void);
59
 
 
60
 
        /// Funktion zum Auslesen des TickCounts.
61
 
        unsigned long GetTickCount(void) const;
62
 
 
63
 
        /// Funktion zum Holen einer Subfunktion.
64
 
        void *GetFunction(const char *function) const;
65
 
 
66
 
        /// Listet verf�gbare Videomodi auf
67
 
        void ListVideoModes(std::vector<VideoMode>& video_modes) const;
68
 
 
69
 
        /// Funktion zum Setzen der Mauskoordinaten.
70
 
        void SetMousePos(int x, int y);
71
 
 
72
 
        /// Funktion zum Setzen der X-Koordinate der Maus.
73
 
        void SetMousePosX(int x);
74
 
 
75
 
        /// Funktion zum Setzen der Y-Koordinate der Maus.
76
 
        void SetMousePosY(int y);
77
 
 
78
 
        /// Get state of the modifier keys
79
 
        KeyEvent GetModKeyState(void) const;
80
 
 
81
 
        /// Gibt Pointer auf ein Fenster zur�ck (device-dependent!), HWND unter Windows
82
 
        void * GetWindowPointer() const;
83
 
 
84
 
private:
85
 
        SDL_Surface *screen; ///< Das Fenster-SDL-Surface.
 
29
    public:
 
30
        /// Konstruktor von @p VideoSDL.
 
31
        VideoSDL(VideoDriverLoaderInterface* CallBack);
 
32
 
 
33
        /// Destruktor von @p VideoSDL.
 
34
        ~VideoSDL(void);
 
35
 
 
36
        /// Funktion zum Auslesen des Treibernamens.
 
37
        const char* GetName(void) const;
 
38
 
 
39
        /// Treiberinitialisierungsfunktion.
 
40
        bool Initialize(void);
 
41
 
 
42
        /// Treiberaufr�umfunktion.
 
43
        void CleanUp(void);
 
44
 
 
45
        /// Erstellt das Fenster mit entsprechenden Werten.
 
46
        bool CreateScreen(unsigned short width, unsigned short height, const bool fullscreen);
 
47
 
 
48
        /// Erstellt oder ver�ndert das Fenster mit entsprechenden Werten.
 
49
        bool ResizeScreen(unsigned short width, unsigned short height, const bool fullscreen);
 
50
 
 
51
        /// Schliesst das Fenster.
 
52
        void DestroyScreen(void);
 
53
 
 
54
        /// Wechselt die OpenGL-Puffer.
 
55
        bool SwapBuffers(void);
 
56
 
 
57
        /// Die Nachrichtenschleife.
 
58
        bool MessageLoop(void);
 
59
 
 
60
        /// Funktion zum Auslesen des TickCounts.
 
61
        unsigned long GetTickCount(void) const;
 
62
 
 
63
        /// Funktion zum Holen einer Subfunktion.
 
64
        void* GetFunction(const char* function) const;
 
65
 
 
66
        /// Listet verf�gbare Videomodi auf
 
67
        void ListVideoModes(std::vector<VideoMode>& video_modes) const;
 
68
 
 
69
        /// Funktion zum Setzen der Mauskoordinaten.
 
70
        void SetMousePos(int x, int y);
 
71
 
 
72
        /// Funktion zum Setzen der X-Koordinate der Maus.
 
73
        void SetMousePosX(int x);
 
74
 
 
75
        /// Funktion zum Setzen der Y-Koordinate der Maus.
 
76
        void SetMousePosY(int y);
 
77
 
 
78
        /// Get state of the modifier keys
 
79
        KeyEvent GetModKeyState(void) const;
 
80
 
 
81
        /// Gibt Pointer auf ein Fenster zur�ck (device-dependent!), HWND unter Windows
 
82
        void* GetWindowPointer() const;
 
83
 
 
84
    private:
 
85
        SDL_Surface* screen; ///< Das Fenster-SDL-Surface.
86
86
};
87
87
 
88
88
#endif // !SDL_H_INCLUDED