KSD_EXPORT_CLASSclass TScreen

The base class for all libksd screen types.

Inheritance:


Public Methods

[more]virtual void Init(int width, int height, int bpp = 0, unsigned int flags = DEFAULT, void* extra = NULL) throw(ECannotInitDisplay) = 0
Initializes the screen.
[more]virtual bool IsChanged() = 0
Returns true if the screen was drawn to.
[more]virtual void Update() = 0
Updates the screen.
[more]virtual void Update(const std::list<TRect>& UpdateRects) = 0
Updates only certain portions of the screen.
[more]virtual bool GetFullscreen() const = 0
Returns true if this screen is in fullscreen mode
[more]virtual bool GetHardwareBuffer() const = 0
Returns true if this screen uses the hardware buffer
[more]virtual bool GetDoubleBuffered() const = 0
Returns true if this screen is using hardware double buffering

Public Members

[more]enum Screen flags.


Documentation

The base class for all libksd screen types. This allows you to create a graphical backend for libksd. Currently, libksd ships with two backends: SDL and OpenGL/SDL. In the near future we hope to support wxWindows as well.
oenum Screen flags.
Screen flags. An OR'd group of these flags are passed to Init, requesting certain attributes for the screen. Note: These attributes won't necessarily be honored. Check to see what was actually created.

o DEFAULT
Default

o FULLSCREEN
Full screen

o HARDWARE_BUFFER
Use a hardware screen buffer

o DOUBLE_BUFFERED
Use hardware double buffering

ovirtual void Init(int width, int height, int bpp = 0, unsigned int flags = DEFAULT, void* extra = NULL) throw(ECannotInitDisplay) = 0
Initializes the screen. May be called more than once inorder to change the attributes of the screen.

Parameters:
width - The desired width of the screen.
height - The desired height of the screen.
bpp - The desired bits-per-pixel. If bpp is zero then the bits-per-pixel of the current display will be used.
flags - An OR'd group of screen flags, requesting certain attributes.
extra - Extra data needed to initialize the screen. See the documentation with the specific backend for more information.

ovirtual bool IsChanged() = 0
Returns true if the screen was drawn to. Note: Not all video backends may support this. When not supported it will always return true. Most notably, OpenGL does not support this!

ovirtual void Update() = 0
Updates the screen. Is not required by all targets, but will always be supported.

ovirtual void Update(const std::list<TRect>& UpdateRects) = 0
Updates only certain portions of the screen. Note: Not all backends may support this. If GetDoubleBuffered returns true then this function will just call Update and draw the whole screen. Calling this function will always be harmless (whether it is supported or not) but do not waste your time creating an UpdateRects list if it is not used.

ovirtual bool GetFullscreen() const = 0
Returns true if this screen is in fullscreen mode

ovirtual bool GetHardwareBuffer() const = 0
Returns true if this screen uses the hardware buffer

ovirtual bool GetDoubleBuffered() const = 0
Returns true if this screen is using hardware double buffering


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.