Wt::SDLDisplay Class Reference

interface to the underlying SDL_VideoSurface More...

#include <sdldisplay.h>

Inherits Wt::SDLSurface, and Wt::Singleton< DERIVED >< Wt::SDLDisplay >.

Inherited by Wt::PixmapOf< Wt::SDLDisplay >.

List of all members.

Public Types

 defaultWidth = 640
 defaultHeight = 480
 defaultDepth = 32
enum  DefaultSurface { defaultWidth = 640, defaultHeight = 480, defaultDepth = 32 }

Public Member Functions

 SDLDisplay (int w=defaultWidth, int h=defaultHeight, int depth=defaultDepth, int flags=0)
 Initialize the target screen surface.
Informative methods
bool isAnyFormat () const
bool hasDoubleBuffer () const
bool isFullScreen () const
bool hasOpenGL () const
bool hasOpenGLBlit () const
bool isResizable () const
bool hasFrame () const
update methods
void update ()
 Update the surface.
void update (const SDLRect &rect)
 Update a rectangle on the surface.
void update (const std::vector< SDLRect > &rects)
 Update a region on the surface.
void flip ()
 If doublebuffered(), flip the surface and its buffer, otherwise update().
Gamma methods
int setGamma (float red, float green, float blue)
int setGammaRamp (const std::vector< Uint16 > &red, const std::vector< Uint16 > &green, const std::vector< Uint16 > &blue)
 ???
resize methods
int toggleFullScreen ()
 returns true if the surface is full screen
void resize (int w, int h)
 resize the SDL window

Protected Member Functions

 SDLDisplay (SDLSurface &src)
 copy constructor takes ownership. It is called from load()

Static Protected Member Functions

static SDLDisplayload (int w=defaultWidth, int h=defaultHeight, int depth=defaultDepth, int flags=0)

Friends

class Singleton< SDLDisplay >


Detailed Description

interface to the underlying SDL_VideoSurface


Member Enumeration Documentation

enum Wt::SDLDisplay::DefaultSurface

Enumerator:
defaultWidth 
defaultHeight 
defaultDepth 


Constructor & Destructor Documentation

Wt::SDLDisplay::SDLDisplay ( int  w = defaultWidth,
int  h = defaultHeight,
int  depth = defaultDepth,
int  flags = 0 
)

Initialize the target screen surface.

Wt::SDLDisplay::SDLDisplay ( SDLSurface src  )  [protected]

copy constructor takes ownership. It is called from load()


Member Function Documentation

void Wt::SDLDisplay::flip (  ) 

If doublebuffered(), flip the surface and its buffer, otherwise update().

bool Wt::SDLDisplay::hasDoubleBuffer (  )  const [inline]

bool Wt::SDLDisplay::hasFrame (  )  const [inline]

bool Wt::SDLDisplay::hasOpenGL (  )  const [inline]

bool Wt::SDLDisplay::hasOpenGLBlit (  )  const [inline]

bool Wt::SDLDisplay::isAnyFormat (  )  const [inline]

bool Wt::SDLDisplay::isFullScreen (  )  const [inline]

bool Wt::SDLDisplay::isResizable (  )  const [inline]

SDLDisplay * Wt::SDLDisplay::load ( int  w = defaultWidth,
int  h = defaultHeight,
int  depth = defaultDepth,
int  flags = 0 
) [static, protected]

void Wt::SDLDisplay::resize ( int  w,
int  h 
)

resize the SDL window

Note:
first we delete our reference to VideoSurface before SDL frees it under our feet SDL proctects us from deleting the Display surface and auto deletes it in case we call SDL_SetVideoMode, However SDL does not protect against deletion of the previous VideoSurface.

Reimplemented from Wt::SDLSurface.

int Wt::SDLDisplay::setGamma ( float  red,
float  green,
float  blue 
)

int Wt::SDLDisplay::setGammaRamp ( const std::vector< Uint16 > &  red,
const std::vector< Uint16 > &  green,
const std::vector< Uint16 > &  blue 
)

???

int Wt::SDLDisplay::toggleFullScreen (  ) 

returns true if the surface is full screen

void Wt::SDLDisplay::update ( const std::vector< SDLRect > &  rects  ) 

Update a region on the surface.

void Wt::SDLDisplay::update ( const SDLRect rect  ) 

Update a rectangle on the surface.

void Wt::SDLDisplay::update (  ) 

Update the surface.


Friends And Related Function Documentation

friend class Singleton< SDLDisplay > [friend]


The documentation for this class was generated from the following files:

Generated Fri Jul 28 19:22:38 2006.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.