X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fscreen.h;h=bdadd8e9ad84326d5b37d61bf83e340ff7311ae8;hb=f73ce73b9cec7f1e2c265b3cbcc7bca9c4011d11;hp=2d28db2d734952e901546bead6baa3eb9afc6b43;hpb=f71f97f4fd251d02882ace4be3ead033ced434c4;p=ipdf%2Fcode.git diff --git a/src/screen.h b/src/screen.h index 2d28db2..bdadd8e 100644 --- a/src/screen.h +++ b/src/screen.h @@ -1,7 +1,7 @@ #ifndef _SCREEN_H #define _SCREEN_H -#include +#include "SDL.h" #include @@ -18,7 +18,7 @@ namespace IPDF class Screen { public: - Screen(); + Screen(bool visible = true); ~Screen(); // 'Pumps' the system event queue. @@ -69,6 +69,14 @@ namespace IPDF 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;} + + bool Valid() const {return m_window != NULL;} private: void ResizeViewport(int width, int height); void DebugFontFlush(); @@ -100,6 +108,8 @@ namespace IPDF int m_debug_font_vertex_head; int m_debug_font_index_head; View * m_view; + bool m_no_quit_requested; + bool m_show_debug_font; }; }