|
NAMESDLmm::Display - The video frame buffer surface.SYNOPSIS#include <sdlmm_display.h> Inherits SDLmm::BaseSurface. 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. bool SetDisplayFormat () Convert the surface to the display format. bool SetDisplayFormatAlpha () Convert the surface to the display format. Methods updating the screen
Window Management
Static Public MethodsDisplay& GetDisplay () The one and only display. Video Modes / Setup
Protected MethodsDisplay& operator= (Display &) Dummy implementation of operator=() to stop initialization. Display (Display &) Display () A NOOP constructor. DETAILED DESCRIPTIONThe video frame buffer surface.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). Note:
CONSTRUCTOR & DESTRUCTOR DOCUMENTATIONSDLmm::Display::Display (Display &) [protected]SDLmm::Display::Display () [inline, protected]A NOOP constructor.SDLmm::Display::~Display () [inline]MEMBER FUNCTION DOCUMENTATIONbool SDLmm::Display::Flip () [inline]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. Returns:
void SDLmm::Display::GetCaption (std::string & title, std::string & icon)Gets the window title and icon name.Parameters:
void SDLmm::Display::GetCaption (char ** title, char ** icon)Gets the window title and icon name.Parameters:
Display & SDLmm::Display::GetDisplay () [static]The one and only display.SDL_GrabMode SDLmm::Display::GrabInput (SDL_GrabMode mode)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. Parameters:
typedef enum { SDL_GRAB_QUERY, // Query the current mode SDL_GRAB_OFF, // Ungrab the mouse and keyboard SDL_GRAB_ON // Grab the mouse and keyboard } SDL_GrabMode; bool SDLmm::Display::Iconify ()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. See also:
Returns:
bool SDLmm::Display::Init () [static]Initializes the video subsystem.Call this method to setup the video subsystem. Returns:
SDL_Rect ** SDLmm::Display::ListModes (SDL_PixelFormat * format = 0, Uint32 flags = 0) [static]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. See also:
void SDLmm::Display::Quit () [static]Shut down the video subsystem.void SDLmm::Display::SetCaption (const std::string & title, const std::string & icon)Sets the window title and icon name of the application.Parameters:
void SDLmm::Display::SetCaption (const char * title, const char * icon)Sets the window title and icon name of the application.Parameters:
bool SDLmm::Display::SetDisplayFormat () [inline, virtual]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. Returns:
Note:
See also:
Reimplemented from SDLmm::BaseSurface. bool SDLmm::Display::SetDisplayFormatAlpha () [inline, virtual]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. Returns:
Note:
See also:
Reimplemented from SDLmm::BaseSurface. void SDLmm::Display::SetIcon (BaseSurface & icon, Uint8 * mask = 0)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. bool SDLmm::Display::SetVideoMode (int w, int h, int bpp = 0, Uint32 flags = 0)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. Returns:
Parameters:
bool SDLmm::Display::ToggleFullScreen ()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). Returns:
void SDLmm::Display::Update () [inline]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! See also:
void SDLmm::Display::UpdateRect (SDL_Rect & rect)Makes sure the given area is updated on the display.This function should not be called if Display is locked! Parameters:
See also:
void SDLmm::Display::UpdateRect (Sint32 x = 0, Sint32 y = 0, Sint32 w = 0, Sint32 h = 0)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! Parameters:
See also:
void SDLmm::Display::UpdateRects (int numrects, SDL_Rect * rects)Makes sure the given list of rectangles is updated on the display.This function should not be called if Display is locked! Note:
The rectangles are not automatically merged or checked for overlap. In general, the programmer can use his knowledge about his particular rectangles to merge them in an efficient way, to avoid overdraw. Parameters:
See also:
int SDLmm::Display::VideoModeOK (int w, int h, int bpp, Uint32 flags) [static]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. See also:
Display & SDLmm::Display::operator= (Display &) [protected]Dummy implementation of operator=() to stop initialization.AUTHORGenerated automatically by Doxygen for SDLmm from the source code.
Visit the GSP FreeBSD Man Page Interface. |