Documentation  |   Table of Contents   |  < Previous   |  Next >  

21    Control.h

Porting Applications to Palm OS® Cobalt

Exploring Palm OS®

Because Palm OS Cobalt has no concept of a resource search chain, you must explicitly identify the resource database from which resources are to be taken. This adds an additional parameter to CtlNewGraphicControl(), CtlNewSliderControl(), and CtlSetGraphics().

The internals of a number of structures are now private.

Modified APIs ^TOP^

Table 21.1  Modified functions 

Modified API

Description of change

GraphicControlType *CtlNewGraphicControl (void **formPP, uint16_t, ControlStyleType, DmOpenRef, DmResourceID, DmResourceID, Coord, Coord, Coord, Coord, uint8_t, Boolean)

Now contains an additional parameter through which you explicitly identify the resource database that contains the bitmap and selected bitmap resources.

SliderControlType *CtlNewSliderControl (void **formPP, uint16_t, ControlStyleType, DmOpenRef, DmResourceID, DmResourceID, Coord, Coord, Coord, Coord, uint16_t, uint16_t, uint16_t, uint16_t)

Now contains an additional parameter through which you explicitly identify the resource database that contains the bitmaps to use for the slider thumb and background.

void CtlSetGraphics (ControlType *, DmOpenRef, DmResourceID, DmResourceID)

Now contains an additional parameter through which you explicitly identify the resource database that contains the bitmap and selected bitmap resources.

Table 21.2  Modified structures

Modified API

Description of change

ControlAttrType

The internals of this structure are now private.

ControlType

The internals of this structure are now private.

GraphicControlType

The internals of this structure are now private.

SliderControlType

The internals of this structure are now private.

Table 21.3  Modified enumerated types

Modified API

Description of change

ButtonFrameType

Formerly an enum, this is now a typedef that takes one of the values defined by the buttonFrames enum.

ControlStyleType

Formerly an enum, this is now a typedef that takes one of the values defined by the controlStyles enum.

Unchanged APIs ^TOP^

Table 21.4  Unchanged functions 

CtlDrawControl()

CtlEnabled()

CtlEraseControl()

CtlGetLabel()

CtlGetSliderValues()

CtlGetValue()

CtlHandleEvent()

CtlHideControl()

CtlHitControl()

CtlNewControl()

CtlSetEnabled()

CtlSetLabel()

CtlSetSliderValues()

CtlSetUsable()

CtlSetValue()

CtlShowControl()

CtlValidatePointer()

Table 21.5  Unchanged types

ControlPtr

Table 21.6  Unchanged enumerated types

buttonFrames

controlStyles