- Inherits from:
- DGraphicDrawable
- Declared in:
- DGraphicScreen.h
Object
|
+---DGraphicDrawable
|
+---DGraphicScreen
Class Description
The DGraphicScreen class implements a class to use the graphic screen. It
is a wrapper for the sdl library. For obvious reasons there can be only
one graphic screen object in any application.
- Last modified:
- 05-Nov-2007 (DGraphicScreen.h)
Instance Variables
- private id <DScreenHandler> _handler
- the screen event handler
- private DKey *_key
- the key
- private unsigned _mask
- the current key mask
- private int _bbp
- the bits per pixel or 0 for any
- Constructors
- - (DGraphicScreen *) init
- Initialise to an unopened graphic screen object
- Returns:
- the object
- - (DGraphicScreen *) init :(unsigned) width :(unsigned) height :(unsigned) bbp :(DColor *) fgc :(DColor *) bgc
- Initialise and open a graphic screen object with a fore- and background color
- Parameters:
- width - the width of the screen
height - the height of the screen
bbp - the depth of the screen (0 = current depth)
fgc - the foreground color
bgc - the background color
- Returns:
- the object
- Copy related methods
- - shallowCopy
- Do a shallow copy of the graphic screen object (not implemented)
- Returns:
- the object
- Deconstructor
- - free
- Free the graphic screen
- Returns:
- the object
- Event handler methods
- - (id <DScreenHandler>) screenHandler
- Return the current screen event handler
- Returns:
- the (reference to the) screen handler
- - (id <DScreenHandler>) screenHandler :(id <DScreenHandler>) handler
- Set the screen event handler
- Parameters:
- handler - the (reference to the) screen handler
- Returns:
- the previous screen handler
- Screen control methods
- - (DGraphicScreen *) close
- Close the graphic screen
- Returns:
- the object
- - (BOOL) open :(unsigned) width :(unsigned) height :(unsigned) bbp :(DColor *) fgc :(DColor *) bgc
- Open the graphic screen (only one instance is opened)
- Parameters:
- width - the width of the screen
height - the height of the screen
bbp - the depth of the screen (0 = current depth)
fgc - the foreground color
bgc - the background color
- Returns:
- success
- Screen output methods
- - (DGraphicScreen *) beep
- Beep the terminal
- Returns:
- the object
- - (int) pointer :(int) state
- Set the visibility of the mouse pointer
- Parameters:
- state - the pointer state (DDW_POINTER..)
- Returns:
- the previous state of the pointer
- Drawing control methods
- - (DGraphicScreen *) stopDrawing
- Stop drawing on the screen
- Returns:
- the screen object
- Event processing
- - (DGraphicScreen *) clearEvents
- Clear any pending events
- Returns:
- the object
- - (unsigned) processEvents
- Process any pending events
- Returns:
- the number of processed events
- - (unsigned) waitEvents
- Wait (and process) events
- Returns:
- the number of processed events
generated 05-Nov-2007 by ObjcDoc 3.0.0