#include <sdlmm_display.h>
Inheritance diagram for SDLmm::Display::
Public Methods | |
~Display () | |
bool | SetVideoMode (int w, int h, int bpp=0, Uint32 flags=0) |
Setup the video mode with the specified width, height and color depth. More... | |
bool | SetDisplayFormat () |
Convert the surface to the display format. More... | |
bool | SetDisplayFormatAlpha () |
Convert the surface to the display format. More... | |
Methods updating the screen | |
void | UpdateRect (Sint32 x=0, Sint32 y=0, Sint32 w=0, Sint32 h=0) |
Makes sure the given area is updated on the screen. More... | |
void | Update () |
Makes sure the entire screen is updated. More... | |
void | UpdateRect (SDL_Rect &rect) |
Makes sure the given area is updated on the display. More... | |
void | UpdateRects (int numrects, SDL_Rect *rects) |
Makes sure the given list of rectangles is updated on the display. More... | |
bool | Flip () |
Swaps screen buffers. More... | |
Window Management | |
void | SetCaption (const char *title, const char *icon) |
Sets the window title and icon name of the application. More... | |
void | SetCaption (const std::string &title, const std::string &icon) |
Sets the window title and icon name of the application. More... | |
void | GetCaption (char **title, char **icon) |
Gets the window title and icon name. More... | |
void | GetCaption (std::string &title, std::string &icon) |
Gets the window title and icon name. More... | |
void | SetIcon (BaseSurface &icon, Uint8 *mask=0) |
Sets the icon for the display window. More... | |
bool | Iconify () |
Iconify / minimize the application. More... | |
bool | ToggleFullScreen () |
Toggles between fullscreen and windowed mode. More... | |
SDL_GrabMode | GrabInput (SDL_GrabMode mode) |
Grabs mouse and keyboard input. More... | |
Static Public Methods | |
Display& | GetDisplay () |
The one and only display. More... | |
Video Modes / Setup | |
bool | Init () |
Initializes the video subsystem. More... | |
void | Quit () |
Shut down the video subsystem. More... | |
int | VideoModeOK (int w, int h, int bpp, Uint32 flags) |
Check to see if a particular video mode is supported. More... | |
SDL_Rect** | ListModes (SDL_PixelFormat *format=0, Uint32 flags=0) |
Returns a pointer to an array of available screen dimensions for the given format and video flags. More... | |
Protected Methods | |
Display& | operator= (Display &) |
Dummy implementation of operator=() to stop initialization. More... | |
Display (Display &) | |
Display () | |
A NOOP constructor. More... |
This class represents the actual video frame buffer memory. If you are using hardware video support, the actual memory is stored on the graphics card. Please note that if you create more than one Display instance, they will all reference the same actual surface (i.e the current display).
Definition at line 39 of file sdlmm_display.h.
|
|
|
A NOOP constructor.
Definition at line 45 of file sdlmm_display.h. |
|
Definition at line 48 of file sdlmm_display.h. |
|
Swaps screen buffers. On hardware that supports double-buffering, this function sets up a flip and returns. The hardware will wait for vertical retrace, and then swap video buffers before the next video surface Blit or Lock will return. On hardware that doesn't support double-buffering, this is equivalent to calling UpdateRect() (i.e w/o parameters). The SDL_DOUBLEBUF flag must have been passed to SetVideoMode, when setting the video mode for this function to perform hardware flipping.
Definition at line 125 of file sdlmm_display.h. |
|
Gets the window title and icon name.
Definition at line 67 of file sdlmm_display.cpp. |
|
Gets the window title and icon name.
Definition at line 63 of file sdlmm_display.cpp. |
|
The one and only display.
Definition at line 33 of file sdlmm_display.cpp. |
|
Grabs mouse and keyboard input. Grabbing means that the mouse is confined to the application window, and nearly all keyboard input is passed directly to the application, and not interpreted by a window manager, if any. When mode is SDL_GRAB_QUERY the grab mode is not changed, but the current grab mode is returned.
Definition at line 86 of file sdlmm_display.cpp. |
|
Iconify / minimize the application. If the application is running in a window managed environment SDL attempts to iconify / minimize it. If Iconify() is successful, the application will receive a SDL_APPACTIVE loss event.
Definition at line 78 of file sdlmm_display.cpp. |
|
Initializes the video subsystem. Call this method to setup the video subsystem.
Definition at line 106 of file sdlmm_display.cpp. |
|
Returns a pointer to an array of available screen dimensions for the given format and video flags. Return a pointer to an array of available screen dimensions for the given format and video flags, sorted largest to smallest. Returns 0 if there are no dimensions available for a particular format, or -1 if any dimension is okay for the given format. If format is 0, the mode list will be for the format returned by VideoInfo()->vfmt(). The flag parameter is an OR'd combination of surface flags. The flags are the same as those used SetVideoMode and they play a strong role in deciding what modes are valid. For instance, if you pass SDL_HWSURFACE as a flag only modes that support hardware video surfaces will be returned.
Definition at line 102 of file sdlmm_display.cpp. |
|
Shut down the video subsystem.
Definition at line 117 of file sdlmm_display.cpp. |
|
Sets the window title and icon name of the application.
Definition at line 58 of file sdlmm_display.cpp. |
|
Sets the window title and icon name of the application.
Definition at line 54 of file sdlmm_display.cpp. |
|
Convert the surface to the display format. This function converts the surface to the pixel format and colors of the video framebuffer, making it suitable for fast blitting onto the display surface. If you want to take advantage of hardware colorkey or alpha blit acceleration, you should set the colorkey and alpha value before calling this function.
Reimplemented from SDLmm::BaseSurface. Definition at line 285 of file sdlmm_display.h. |
|
Convert the surface to the display format. This function converts the surface to the pixel format and colors of the video framebuffer plus an alpha channel, making it suitable for fast blitting onto the display surface. If you want to take advantage of hardware colorkey or alpha blit acceleration, you should set the colorkey and alpha value before calling this function.
Reimplemented from SDLmm::BaseSurface. Definition at line 286 of file sdlmm_display.h. |
|
Sets the icon for the display window. This function must be called before the first call to SetVideoMode(). It takes an icon surface, and a mask in MSB format. If mask is zero (default), the entire icon surface will be used as the icon. Definition at line 74 of file sdlmm_display.cpp. |
|
Setup the video mode with the specified width, height and color depth. If bpp is zero, the color depth uses is that of the current display.
Definition at line 90 of file sdlmm_display.cpp. |
|
Toggles between fullscreen and windowed mode. Toggles the application between windowed and fullscreen mode, if supported. (X11 is the only target currently supported, BeOS support is experimental).
Definition at line 82 of file sdlmm_display.cpp. |
|
Makes sure the entire screen is updated. This call is identical to calling UpdateRect() without arguments. This function should not be called if Display is locked!
Definition at line 79 of file sdlmm_display.h. |
|
Makes sure the given area is updated on the display. This function should not be called if Display is locked!
Definition at line 46 of file sdlmm_display.cpp. |
|
Makes sure the given area is updated on the screen. If 'x', 'y', 'w' and 'h' are all 0 (the default), UpdateRect() will update the entire display. This function should not be called if Display is locked!
Definition at line 42 of file sdlmm_display.cpp. Referenced by Update().
|
|
Makes sure the given list of rectangles is updated on the display. This function should not be called if Display is locked!
Definition at line 50 of file sdlmm_display.cpp. |
|
Check to see if a particular video mode is supported. VideoModeOK returns 0 if the requested mode is not supported under any bit depth, or returns the bits-per-pixel of the closest available mode with the given width, height and requested surface flags (see SetVideoMode). The bits-per-pixel value returned is only a suggested mode. You can usually request any bpp you want when setting the video mode and SDL will emulate that color depth with a shadow video surface. The arguments to VideoModeOK are the same ones you would pass to SetVideoMode.
Definition at line 98 of file sdlmm_display.cpp. |
|
Dummy implementation of operator=() to stop initialization.
|
Documentation automatically generated by written by Dimitri van Heesch. | Project hosted at |