OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
WindowSDL.h
Go to the documentation of this file.
1 
8 #ifndef _WINDOW_SDL_H_
9 #define _WINDOW_SDL_H_
10 
11 #include <glm/gtc/type_precision.hpp>
12 
13 #include "SDL.h"
14 
15 class WindowSDL {
16  public:
17  static int initialize();
18  static void eventHandling();
19  static void swapBuffers();
20  static void shutdown();
21 
22  static void setSize(glm::i32vec2 s);
23  static glm::i32vec2 getSize() { return size; }
24 
25  static void setFullscreen(bool f);
26  static bool getFullscreen() { return fullscreen; }
27 
28  static void setMousegrab(bool g);
29  static bool getMousegrab() { return mousegrab; }
30 
31  static void setTextInput(bool t);
32  static bool getTextInput() { return textinput; }
33 
34  static void setClipboard(const char* s);
35  static const char* getClipboard();
36 
37  static void inputPositionCallback(int x, int y);
38 
39  private:
40  static glm::i32vec2 size;
41  static bool fullscreen;
42  static bool mousegrab;
43  static bool textinput;
44  static SDL_Window* window;
45  static SDL_GLContext context;
46  static SDL_GameController* controller;
47 };
48 
49 #endif
50 
static int initialize()
Definition: WindowSDL.cpp:25
static SDL_Window * window
Definition: WindowSDL.h:44
static void swapBuffers()
Definition: WindowSDL.cpp:493
static void setMousegrab(bool g)
Definition: WindowSDL.cpp:537
static bool getTextInput()
Definition: WindowSDL.h:32
static bool getFullscreen()
Definition: WindowSDL.h:26
static void setClipboard(const char *s)
Definition: WindowSDL.cpp:557
static void setTextInput(bool t)
Definition: WindowSDL.cpp:549
static SDL_GameController * controller
Definition: WindowSDL.h:46
static void inputPositionCallback(int x, int y)
Definition: WindowSDL.cpp:578
static bool fullscreen
Definition: WindowSDL.h:41
static bool mousegrab
Definition: WindowSDL.h:42
static void setFullscreen(bool f)
Definition: WindowSDL.cpp:526
static glm::i32vec2 size
Definition: WindowSDL.h:40
static void shutdown()
Definition: WindowSDL.cpp:497
static glm::i32vec2 getSize()
Definition: WindowSDL.h:23
static bool textinput
Definition: WindowSDL.h:43
static SDL_GLContext context
Definition: WindowSDL.h:45
static bool getMousegrab()
Definition: WindowSDL.h:29
static void setSize(glm::i32vec2 s)
Definition: WindowSDL.cpp:516
static void eventHandling()
Definition: WindowSDL.cpp:112
static const char * getClipboard()
Definition: WindowSDL.cpp:565