PDL_GetScreenMetrics

Description

Fills the passed PDL_ScreenMetrics struct (that your app has allocated) with the device's screen metrics.

For a Palm Pre 2 it would be set like this:

outMetrics->horizontalPixels = 320; // Number of pixels horizontally
outMetrics->verticalPixels = 480;   // Number of pixels vertically
outMetrics->horizontalDPI = 213;    // Number of pixels per inch horizontally
outMetrics->verticalDPI = 183;      // Number of pixels per inch vertically
outMetrics->aspectRatio = 1.164;    // horizontalDPI/verticalDPI

Device(s) horizontalPixels verticalPixels horizontalDPI verticalDPI aspectRatio
Pre, Pre2, Pre+ 320 480 213 183 1.164
Pixi, Veer 320 400 190 190 1.0
Pre3 480 800 260 260 1.0
TouchPad 1024 768 132 132 1.0
TouchPad GO 1024 768 182 182 1.0

Syntax

PDL_Err PDL_GetScreenMetrics(PDL_ScreenMetrics *outMetrics);

Argument Description
outMetrics Pointer to a PDL_ScreenMetrics struct that your app has allocated.

Returns

PDL_INVALIDINPUT - outMetrics must not be NULL.
PDL_EOTHER - Unknown hardware.
PDL_NOERROR - Success.