Documentation  |   Table of Contents   |  < Previous   |  Next >  

42    Field.h

Porting Applications to Palm OS® Cobalt

Exploring Palm OS®

The Palm OS Cobalt Field APIs have very few changes. Some function parameters and return types that were formerly unsigned 16-bit integers are now unsigned 32-bit integers. The FieldType structure is now completely opaque. Finally, a couple of APIs that were defined but not ever publicly used have been removed.

Deleted APIs ^TOP^

Table 42.1  Deleted structures

Deleted API

Use instead

FieldUndoType

Nothing. This structure was defined but not used by any exported APIs.

LineInfoType

Nothing. This structure was used only in the FieldType structure, the contents of which are now completely private.

Table 42.2  Deleted types

Deleted API

Use instead

LineInfoPtr

Nothing. This type was used only in the FieldType structure, the contents of which are now completely private.

Table 42.3  Deleted enumerated types

Deleted API

Use instead

UndoMode

Nothing. This enum was only used by the FieldUndoType structure, which in turn was not used by any exported APIs.

Modified APIs ^TOP^

Table 42.4  Modified functions

Modified API

Description of change

uint32_t FldCalcFieldHeight (const char *, Coord)

This function used to return an unsigned 16-bit integer.

uint32_t FldGetNumberOfBlankLines(const FieldType *)

This function used to return an unsigned 16-bit integer.

void FldGetScrollValues (const FieldType *, uint32_t *, uint32_t *, uint32_t *)

The three final parameters used to be pointers to unsigned 16-bit integers.

uint32_t FldGetVisibleLines (const FieldType *)

This function used to return an unsigned 16-bit integer.

void FldScrollField (FieldType *, uint32_t, WinDirectionType)

linesToScroll was an unsigned 16-bit integer.

void FldSendHeightChangeNotification (const FieldType *, size_t, int32_t);

numLines was an unsigned 16-bit integer.

Table 42.5  Modified structures

Modified API

Description of change

FieldType

The internals of this structure are now completely private.

Table 42.6  Modified #defines

Modified API

Description of change

#define maxFieldTextLen SIZE_MAX

Was 0x7fff. Note that SIZE_MAX is defined in stdint.h (as 2147483647).

Table 42.7  Modified enumerated types

Modified API

Description of change

JustificationType

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

Unchanged APIs ^TOP^

Table 42.8  Unchanged functions 

FldCompactText()

FldCopy()

FldCut()

FldDelete()

FldDirty()

FldDrawField()

FldEraseField()

FldFreeMemory()

FldGetAttributes()

FldGetBounds()

FldGetFont()

FldGetInsPtPosition()

FldGetMaxChars()

FldGetScrollPosition()

FldGetSelection()

FldGetTextAllocatedSize()

FldGetTextHandle()

FldGetTextHeight()

FldGetTextLength()

FldGetTextPtr()

FldGrabFocus()

FldHandleEvent()

FldInsert()

FldMakeFullyVisible()

FldNewField()

FldPaste()

FldRecalculateField()

FldReleaseFocus()

FldScrollable()

FldSendChangeNotification()

FldSetAttributes()

FldSetBounds()

FldSetDirty()

FldSetFont()

FldSetInsertionPoint()

FldSetInsPtPosition()

FldSetMaxChars()

FldSetMaxVisibleLines()

FldSetScrollPosition()

FldSetSelection()

FldSetText()

FldSetTextAllocatedSize()

FldSetTextHandle()

FldSetTextPtr()

FldSetUsable()

FldUndo()

FldWordWrap()

Table 42.9  Unchanged structures

FieldAttrType

Table 42.10  Unchanged types

FieldAttrPtr

FieldPtr

Table 42.11  Unchanged #defines

maxFieldLines

undoBufferSize

Table 42.12  Unchanged enumerated types

justifications