+ int ViewportWidth() const { return m_viewport_width; }
+ int ViewportHeight() const { return m_viewport_height; }
+
+ // Debug Font handling
+ void DebugFontInit(const char *font_name, float font_size = 12);
+ void DebugFontClear();
+ void DebugFontPrint(const char *str);
+ void DebugFontPrintF(const char *fmt, ...);
+
+ // Handle mouse input.
+ typedef void(*MouseHandler)(int x, int y, int button, int wheel, Screen * scr, View * view);
+ void SetMouseHandler(MouseHandler handler)
+ {
+ m_mouse_handler = handler;
+ }
+
+ enum MouseCursors
+ {
+ CursorArrow,
+ CursorWait,
+ CursorWaitArrow,
+ CursorMove,
+ CursorHand
+ };
+ void SetMouseCursor(MouseCursors cursor);
+
+ void ScreenShot(const char * filename) const;
+ void RenderBMP(const char * filename) const;
+ void RenderPixels(int x, int y, int w, int h, uint8_t * pixels) const;
+
+
+ void SetView(View * new_view) {m_view = new_view;}
+
+ // Returns the CPU time (in seconds) it took to render the last completed frame.
+ double GetLastFrameTimeCPU() const { return m_last_frame_time / SDL_GetPerformanceFrequency(); }
+ // Returns the GPU time (in seconds) it took to render the last completed frame.
+ double GetLastFrameTimeGPU() const;
+
+ void RequestQuit() {m_no_quit_requested = false;}
+ bool QuitRequested() const {return !m_no_quit_requested;}
+
+ void ShowDebugFont(bool show = true) {m_show_debug_font = show;}
+ bool DebugFontShown() const {return m_show_debug_font;}