00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #ifndef SDLMM_DISPLAY_H
00023 #define SDLMM_DISPLAY_H
00024 
00025 #include "sdlmm_basesurface.h"
00026 
00027 namespace SDLmm {
00029 
00039   class Display : public BaseSurface {
00040   protected:
00042     Display& operator= (Display&);
00043     Display(Display&);
00044     
00045     Display() : BaseSurface(NULL)  {  } 
00046 
00047   public:    
00048     ~Display() {
00049       me = 0; 
00050     } 
00051 
00053     static Display& GetDisplay();
00054 
00056 
00057 
00058 
00069     void UpdateRect(Sint32 x = 0, Sint32 y = 0, Sint32 w = 0, Sint32 h = 0);
00070 
00072 
00079     void Update() { UpdateRect(); }
00080 
00082 
00088     void UpdateRect(SDL_Rect& rect);
00089 
00091 
00108     void UpdateRects(int numrects, SDL_Rect *rects);
00109 
00111 
00125     bool Flip() { return SDL_Flip(me) == 0; }
00127    
00130 
00139     bool SetVideoMode(int w, int h, int bpp = 0, Uint32 flags = 0);
00140 
00142 
00143 
00144 
00147     static bool Init();
00148 
00150     static void Quit();
00151     
00153 
00170     static int VideoModeOK(int w, int h, int bpp, Uint32 flags);
00171 
00174 
00191     static SDL_Rect **ListModes(SDL_PixelFormat *format = 0, Uint32 flags = 0);
00193 
00194 
00196 
00197 
00198 
00202     void SetCaption(const char *title, const char *icon);
00203 
00205 
00209     void SetCaption(const std::string& title, const std::string& icon);
00211 
00215     void GetCaption(char **title, char **icon);
00216 
00218 
00222     void GetCaption(std::string &title, std::string &icon);
00223 
00225 
00234     void SetIcon(BaseSurface& icon, Uint8 *mask = 0);
00235       
00237 
00249     bool Iconify();
00250 
00252 
00259     bool ToggleFullScreen();
00260 
00262 
00280     SDL_GrabMode GrabInput(SDL_GrabMode mode);
00282 
00283     
00284     
00285     bool SetDisplayFormat() { return true; }
00286     bool SetDisplayFormatAlpha() { return true; }    
00287   };
00288 }
00289 
00290 #endif // SDLMM_DISPLAY_H
00291