00001 00002 //Luke Lenhart, 2008 00003 //See /docs/License.txt for details on how this code may be used. 00004 00005 #pragma once 00006 00007 #include "../base/Setup.h" 00008 00009 #ifdef MPMA_COMPILE_GFXSETUP 00010 00011 #include "../base/Types.h" 00012 00013 #include <string> 00014 00016 namespace GFX 00017 { 00019 struct ScreenSize 00020 { 00022 int Width; 00023 00025 int Height; 00026 }; 00027 00029 struct GraphicsSetup: public ScreenSize 00030 { 00032 std::string Name; 00033 00036 bool FullScreen; 00037 00039 bool Resizable; 00040 00042 bool Minimized; 00043 00044 //TODO: stencil buffer and vsync options 00045 00046 inline GraphicsSetup() 00047 { 00048 Name="App"; 00049 FullScreen=false; 00050 Resizable=true; 00051 Minimized=false; 00052 Width=800; 00053 Height=600; 00054 } 00055 }; 00056 00058 bool SetupWindow(const GraphicsSetup &newState); 00059 00061 void ShutdownWindow(); 00062 00064 const GraphicsSetup* GetWindowState(); 00065 00067 void UpdateWindow(); 00068 00070 bool WindowHasFocus(); 00071 00073 ScreenSize GetCurrentScreenSize(); 00074 00075 //TODO: An api to get a list of supported screen resolutions 00076 //TODO: An api to change the current screen resolution 00077 } 00078 00079 #endif //#ifdef MPMA_COMPILE_GFXSETUP