## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreSetDeviceSurface Parameter - pDS

pDS (PDEVICESURFACE) - input Pointer to information needed by the graphics engine.

ulLength Length of the DEVICESURFACE data structure.

SurfaceBmapInfo Information used by the graphics engine when rastering to a linear address. (See BMAPINFO in Data Types)

ulDSFlgs Miscellaneous flags used by the graphics engine for rendering of rasterized data.

Color format flag

DS_MONO_INVERT Mono ROPs are inverted.

Destination color format flags

DS_COLOR_RGB Color is in RGB.

DS_COLOR_RGB2 Color is in RGB2 (default).

DS_COLOR_24BIT_BGR First byte=blue (default).

DS_COLOR_24BIT_RGB First byte=red, second byte=green, third byte=blue.

DS_COLOR_16BIT_565_BGR

Blue 5 bits (default)
Green 6 bits
Red 5 bits

    |b|b|b|b|b|g|g|g|g|g|g|r|r|r|r|r|

DS_COLOR_16BIT_565_RGB

Red 5 bits
Green 6 bits
Blue 5 bits

    |r|r|r|r|r|g|g|g|g|g|g|b|b|b|b|b|

DS_COLOR_16BIT_1555_BGR

Overlay 1
Blue 5 bits
Green 5 bits
Red 5 bits

    |o|b|b|b|b|b|g|g|g|g|g|r|r|r|r|r|

DS_COLOR_16BIT_1555_RGB

Overlay 1
Red 5 bits
Green 5 bits
Blue 5 bits

    |o|r|r|r|r|r|g|g|g|g|g|b|b|b|b|b|

Direction flags

DS_BOTTOMTOP Bottom-to-top is Y position.
DS_TOPBOTTOM Top-to-bottom is Y position.

Hardcopy flag

DS_QUEUED_RAW_DEFAULT Set QUEUED to RAW as default.

Notification flag

DS_NOTIFY_LAST_SDBITBLT Last banded blit per API bit map transfer.

Scanline alignment flags

DS_BYTE_ALIGNMENT DS scan line alignment.
DS_2BYTE_ALIGNMENT DS scan line alignment.
DS_4BYTE_ALIGNMENT DS scan line alignment.
DS_KEEP_EXTFORMAT Variable alignment; let application decide.

Surface description flag

DS_MEMORY Memory surface.

ulStyleRatio Default style ratio used by the current device.

abmapinfoDefPattern[ ] Set of default patterns supplied by the graphics engine that can be changed by the presentation driver. [DEFAULT_PATTERNS_ NUMBER].

pHWPalette Default hardware palette for the current device.

DitherMatrix Default is the generic dither support for hardcopy devices.

pfnDevLockDC Pointer to allow the device driver to retrieve its device- specific information from the graphics engine. Pointer is stored by the device driver.

pfnDevUnLockDC Pointer to the function to release the lock on the current DC. Pointer is stored by the device driver.

pfnBitBlt Pointer defaults to SOFTDRAW's handling of the new SDBitBlt function. If a device does not have linear address support or would rather handle preclipped bit map transfers itself, then it should hook out this function with its own routine.

pfnLine Pointer defaults to SOFTDRAW's handling of the new SDLine function. If a device does not have linear address support or would rather handle preclipped line operations itself, then it should hook out this function with its own routine.

pfnTextBlt Used in conjunction with DS_DOWNLOAD_FONTS and DS_DEVICE_FONTS. If flags are not specified, text strings will be simulated through bitblts.

pfnLockPhysDev Pointer prevents other processes from accessing the physical hardware between the lock and unlock.

pfnUnLockPhysDev Pointer releases the physical hardware for access by other processes.

ulhddc Handle to device's device context.

ulReserved[4] Reserved by system.

ulCapsCnt Size in ULONGs of the DevCaps field.

DevCaps[ ] The device capabilities array in OS/2 2.0 and previous versions. Array must be filled out in order for the graphics engine to handle a call to the DevQueryCaps function. [CAPS_MAX_ CAPS + 1]