forked from EmuELEC/rs97-commander-sdl2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
window.h
executable file
·54 lines (36 loc) · 943 Bytes
/
window.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef _WINDOW_H_
#define _WINDOW_H_
#include <SDL.h>
class CWindow
{
public:
// Destructor
virtual ~CWindow(void);
// Execute main loop of the window
const int execute(void);
// Return value
const int getReturnValue(void) const;
// Draw window
virtual void render(const bool p_focus) const = 0;
// Is window full screen?
virtual bool isFullScreen(void) const;
protected:
// Constructor
CWindow(void);
// Key press management
virtual const bool keyPress(const SDL_Event &p_event);
// Key hold management
virtual const bool keyHold(void);
// Timer tick
const bool tick(const Uint8 p_held);
// Timer for key hold
unsigned int m_timer;
SDL_Keycode m_lastPressed;
// Return value
int m_retVal;
private:
// Forbidden
CWindow(const CWindow &p_source);
const CWindow &operator =(const CWindow &p_source);
};
#endif