MPMA Framework 0.4
GFXSetup.h
Go to the documentation of this file.
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 
00035         bool FullScreen;
00036 
00038         bool Resizable;
00039 
00041         bool Minimized;
00042 
00043         //TODO: stencil buffer and vsync options
00044 
00045         inline GraphicsSetup()
00046         {
00047             Name="App";
00048             FullScreen=false;
00049             Resizable=true;
00050             Minimized=false;
00051             Width=800;
00052             Height=600;
00053         }
00054     };
00055 
00057     enum SetupWindowFlags: uint32
00058     {
00059         LEAVE_FULLSCREEN_USE_ORIGINAL_SIZE=1 
00060     };
00061     
00063     const uint32 DEFAULT_SETUPWINDOW_FLAGS=LEAVE_FULLSCREEN_USE_ORIGINAL_SIZE;
00064     
00066     bool SetupWindow(const GraphicsSetup &newDesiredState, uint32 setupWindowFlags=DEFAULT_SETUPWINDOW_FLAGS);
00067 
00069     void ShutdownWindow();
00070 
00072     const GraphicsSetup* GetWindowState();
00073 
00075     void UpdateWindow();
00076 
00078     bool WindowHasFocus();
00079 
00081     ScreenSize GetCurrentScreenSize();
00082 }
00083 
00084 #endif //#ifdef MPMA_COMPILE_GFXSETUP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends