API Guide Home
(Online version only)

PalmDisplayExtent.h File Reference


Detailed Description

Public API for the Display Extent Library.

Version:
1.0

Definition in file PalmDisplayExtent.h.

Include dependency graph for PalmDisplayExtent.h:

Go to the source code of this file.

Defines

Library type and creator
Library Traps

Functions


Define Documentation

#define dexFtrNumVersion   (0)

PalmDisplayExtent feature number.

Definition at line 41 of file PalmDisplayExtent.h.

#define dexLibCreator   'rotM'

PalmDisplayExtent Creator ID.

Definition at line 39 of file PalmDisplayExtent.h.

#define dexLibName   "rotmgr"

PalmDisplayExtent library name.

Definition at line 38 of file PalmDisplayExtent.h.

#define dexLibType   sysFileTLibrary

PalmDisplayExtent type.

Definition at line 40 of file PalmDisplayExtent.h.

#define kDexLibTrapClose   sysLibTrapClose

Definition at line 51 of file PalmDisplayExtent.h.

#define kDexLibTrapDexGetDisplayAddress   (sysLibTrapCustom + 4)

Definition at line 54 of file PalmDisplayExtent.h.

#define kDexLibTrapDexGetDisplayDimensions   (sysLibTrapCustom + 5)

Definition at line 55 of file PalmDisplayExtent.h.

#define kDexLibTrapOpen   sysLibTrapOpen

Definition at line 50 of file PalmDisplayExtent.h.


Function Documentation

void* DexGetDisplayAddress ( UInt16  refnum  ) 

Get the physical screen buffer (Display Address).

Parameters:
refnum,: IN: Reference number of the Display Extent Manager library.
Return values:
Returns a pointer to the physical screen buffer.
Remarks:
You should only use this function if direct screen access is required. This function returns a pointer to the physical display. If you need to do direct screen access in 90, 180, and 270 rotation, use this function. If you use the regular APIs (eg something like BmpGetBits(WinGetBimatp(WinDisplay()))) you would get a back buffer pointer instead and would not see anything until you force a screen copy of this back buffer. Note that the address points to the top-left corner of the device in potrait mode always.
      // this code draws 6400 red pixels in the screen.

        RGBColorType color = { 0, 255, 0, 0 }; 
        IndexedColorType index = WinRGBToIndex(&color); 
        UInt8 *bufferP = (UInt8*)DexGetDisplayAddress(gDexLibRefNum);
        UInt32 x = 0; 
        
        for( x = 0; x < 6400; x++) 
             bufferP[x] = index; 
 *

void DexGetDisplayDimensions ( UInt16  refnum,
Coord *  width,
Coord *  height,
UInt16 rowBytes 
)

Get the physical screen width, height, and rowbytes.

Parameters:
refnum,: IN: Reference number of the Display Extent Manager library.
width IN: Pointer to the width of the screen.
height IN: Pointer to the height of the screen.
rowBytes IN: Pointer to the rowbytes of the screen.
Return values:
Nothing 


Top Palm Developer Network
© 2004-2008, Palm, Inc. All rights reserved.
Generated on Fri Jun 13 10:07:42 2008 for Palm API Guide