SDLWindow.hh
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef SDLWINDOW_HH_
00018 # define SDLWINDOW_HH_
00019
00020 # include "tools.hh"
00021
00022 # include "ResourceCenter.hh"
00023 # include "Input.hh"
00024 # include "VirtualSurface.hh"
00025
00060 class SDLWindow
00061 {
00062 public:
00063 SDLWindow();
00064 ~SDLWindow();
00065
00068 Input& getInput();
00070 VirtualSurface& getScreen();
00071
00074 bool isFullScreen() const;
00075
00078 void setFullScreen(bool enable);
00079
00082 int getFps() const;
00083
00085 bool isInitialized();
00086
00090 void init(void *conf);
00091
00093 void clearScreen();
00094
00099 bool processOneFrame(bool events_only = false);
00100
00101 private:
00102 Input input_;
00103 ResourceCenter resource_;
00104 VirtualSurface screen_;
00105
00106 bool is_fullscreen_;
00107 unsigned frame_drawed_;
00108 unsigned frame_tick_fps_;
00109 unsigned frame_previous_tick_;
00110 int fps_;
00111 };
00112
00113 #endif