Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

palm/palmutils.h File Reference

interface to some utility functions for the palm paltform More...

#include <PalmTypes.h>
#include <Form.h>
#include <sections.h>

Go to the source code of this file.

Functions

Boolean canColor (UInt16 nbits)
 can this device perform color operations at the depth requested

Err changeDepthRes (UInt32 ncolors, Boolean tryHigh)
 Change the depth.

Err restoreDepthRes (void)
 restore the screen to the original depth and resolution

UInt32 getDepth (void)
 Return the depth in bits per pixel.

UInt32 GetCreatorID (void)
 get the applications' creator ID

Boolean isZireOld (void)
 is the device an old Zire (palmos 4)

Boolean isHandEra (void)
 is this device a HandEra machine

Char ** FillStringList (UInt16 resID, UInt16 *length) LARD_SECTION
 build a string list from all the string list items from resID

void FreeStringList (Char **list) LARD_SECTION
 free the contents of a string list

void * GetObjectPtr (FormType *form, UInt16 index)
 get an object pointer from an item index

void RearrangeBitmap (FormPtr form, UInt16 oID, Int16 offsetX, Int16 offsetY)
 rearrange the location of a bitmap on screen

void RearrangeObjectOnly (FormPtr form, UInt16 oID, Int16 offsetX, Int16 offsetY, Int16 resizeX, Int16 resizeY)
 rearrange/move/resize an object on the screen

void compatBmpGetDimensions (BitmapPtr pBmp, Coord *pWidth, Coord *pHeight, UInt16 *pRowBytes)
 get a bitmap's dimensions


Detailed Description

interface to some utility functions for the palm paltform

These routines are considered useful enough to be stuffed into the same file.

Definition in file palmutils.h.


Function Documentation

Boolean canColor UInt16    nbits
 

can this device perform color operations at the depth requested

Parameters:
nbits  the number of bits (1, 2, 4, 8, 16)
Returns:
true if this depth is available

Definition at line 202 of file palmutils.c.

References UInt16, and UInt32.

Err changeDepthRes UInt32    ncolors,
Boolean    tryHigh
 

Change the depth.

This will consequently set the resolution of the screen

Parameters:
ncolors  the depth to try to set the screen resolution to
tryHigh  try to put the screen in high resolution mode.
Returns:
errNone if nothing untoward happens, otherwise an error

Definition at line 123 of file palmutils.c.

References hibit(), isHandEra(), and UInt32.

void compatBmpGetDimensions BitmapPtr    pBmp,
Coord *    pWidth,
Coord *    pHeight,
UInt16   pRowBytes
 

get a bitmap's dimensions

It's for compatibly with pre-PalmOS4 machines.

Parameters:
pBmp  pointer to the bitmap
pWidth  pointer to the width
pHeight  pointer to the height
pRowBytes  pointer to # of bytes in a row

Definition at line 305 of file palmutils.c.

References UInt16.

Char** FillStringList UInt16    resID,
UInt16   length
 

build a string list from all the string list items from resID

Parameters:
resID  the resource to get the strings from
length  (out) the # of items in the list
Returns:
the char array containing all the strings

Definition at line 256 of file palmutils.c.

References Char, Int16, UInt16, and UInt32.

Referenced by setupButtonConfig().

void FreeStringList Char **    list
 

free the contents of a string list

The list wil have been obtained from the FillStringList function

Parameters:
list  the list to free

Definition at line 291 of file palmutils.c.

References Char.

Referenced by clearButtonConfig().

UInt32 GetCreatorID void   
 

get the applications' creator ID

Returns:
the creatorID. Machine will crash otherwise

Definition at line 238 of file palmutils.c.

Referenced by BeamRegister(), BeamSend(), and OpenMyDB().

UInt32 getDepth void   
 

Return the depth in bits per pixel.

Returns:
the screen depth.

Definition at line 89 of file palmutils.c.

References UInt32.

Referenced by RenderMaps().

void* GetObjectPtr FormType *    form,
UInt16    index
 

get an object pointer from an item index

Parameters:
form  the form to obtain the pointer from
index  the index of the item on the form
Returns:
the pointer

Definition at line 298 of file palmutils.c.

References UInt16.

Referenced by budgetSetup(), cityNewSetup(), CleanSaveGameList(), cnCreateButtonPressed(), DeleteFromList(), LoadFromList(), processRepeater(), queryCleanup(), querySetup(), saveButtonConfig(), saveOptions(), setupButtonConfig(), setupOptions(), and UpdateSaveGameList().

Boolean isHandEra void   
 

is this device a HandEra machine

Returns:
true of this is a handera machine.

Definition at line 60 of file palmutils.c.

References UInt32.

Referenced by changeDepthRes().

Boolean isZireOld void   
 

is the device an old Zire (palmos 4)

Returns:
true if the item is an original zire.

Definition at line 70 of file palmutils.c.

References UInt16, and UInt32.

Referenced by buildSilkList().

void RearrangeBitmap FormPtr    form,
UInt16    oID,
Int16    offsetX,
Int16    offsetY
 

rearrange the location of a bitmap on screen

Parameters:
form  the form that the bitmap resides on
oID  the id of the bitmap item on the form
offsetX  the offset to move the bitmap by on the X axis
offsetY  the offset to move the bitmap on the y axis.

Definition at line 49 of file palmutils.c.

References Int16, and UInt16.

void RearrangeObjectOnly FormPtr    form,
UInt16    oID,
Int16    offsetX,
Int16    offsetY,
Int16    resizeX,
Int16    resizeY
 

rearrange/move/resize an object on the screen

Parameters:
form  the form who's item we wish to rearrange is on.
oID  object's ientifier
offsetX  x offset to move object by
offsetY  y offset to move object by
resizeX  amount to resize X axis by
resizeY  amount to resize Y axis by

Definition at line 31 of file palmutils.c.

References Int16, and UInt16.

Err restoreDepthRes void   
 

restore the screen to the original depth and resolution

Returns:
error if it can't restore the depth and resolution

Definition at line 189 of file palmutils.c.


Generated on Mon Aug 30 19:44:17 2004 for pocketcity by doxygen1.2.18