Wiki source for ioScreenDepth


Show raw source

======**sqInt ioScreenDepth(void)**======

**Parms**: NONE
**return**: sqInt, bits the screen supports
**From**: Interpreter
**Why**:
To figureout how many bits the display surface is.

**Responsibility**:
Must consider the hardware and window type and return the current depth.
This implies it's screen/device hardware based. However we really are dealing with what the window will support.

**MacIntosh**
//os-9/OSXCarbon//
Gets the dominate screen hardware device and it's supported depth, if you have multiple screens this is the one with the menu bar.

//Cocoa://
This is a work in progress because we are still writting code to determine what depths the UIView logic will support

**iPhone**
32 is returned, device does not support other depths

**Unix**
Returns depth of 1 if not connected to an X server, otherwise the XGetGeometry

**Windows**
return GetDeviceCaps depth based on current window, otherwise zero if error

**BUGS**
if you have multiple screens, then something has to figure out what the main screen is.
Also since we are actually dealing with a window the window might have different colour depth than the screen.

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki