Documentation  |   Table of Contents   |  < Previous   |  Next >  

131    Window.h

Porting Applications to Palm OS® Cobalt

Exploring Palm OS®

The Window Manager APIs themselves have changed little in Palm OS Cobalt, beyond some cleanup of APIs that were never intended for use by applications. The Palm OS windowing system has undergone a major redesign, however, and there are many new APIs to support the new design. See Exploring Palm OS: User Interface for a complete description of the Palm OS Cobalt windowing system.


NOTE: Early in the porting process you may want to #include WindowCompatibility.h (after the #include for PalmOS.h). This header file defines a number of APIs and macros that allow applications calling certain deleted functions and functions with modified prototypes to compile and run. This compatibility header should not be counted on long-term, however, so later in the porting process you should remove the #include and fix any problems that result.

Deleted APIs ^TOP^

Table 131.1  Deleted functions 

Deleted API

Use instead

WinAddWindow()

Nothing. This function was documented as "System Use Only."

WinDisableWindow()

Nothing. This function was documented as "System Use Only."

WinDrawWindowFrame()

Nothing. This function was documented as "System Use Only."

WinEnableWindow()

Nothing. This function was documented as "System Use Only."

WinGetFirstWindow()

There is nothing comparable to this function in the Palm OS Cobalt APIs.

WinInitializeWindow()

Nothing. This function was documented as "System Use Only."

WinMoveWindowAddr()

Nothing. This function was documented as "System Use Only."

WinRemoveWindow()

Nothing. This function was documented as "System Use Only."

WinRestoreBits()

WinSaveBits()

WinScreenInit()

Nothing. This function was documented as "System Use Only."

WinSetConstraintsSize()

WinCreateWindowWithConstraints()

Table 131.2  Deleted macros

Deleted API

Use instead

PINS_TRAP()

See "Patching Shared Libraries" of Exploring Palm OS: System Management for information on function entry points.

WinGetWindowHandle()

Nothing. Windows are always referred to by their handle in Palm OS Cobalt.

WinGetWindowPointer()

Nothing. Windows are always referred to by their handle in Palm OS Cobalt.

Table 131.3  Deleted structures

Deleted API

Use instead

DrawStateFlagsType

WinGetScalingMode(), WinSetScalingMode(). This is an internal structure in Palm OS Cobalt that is no longer exported.

DrawStateType

WinPushDrawState(), WinPopDrawState(), WinSetDrawMode(), WinGetPatternType(), WinSetPatternType(), WinSetUnderlineMode(), FntSetFont(), WinGetPattern(), WinSetPattern(), WinSetForeColor(), WinSetBackColor(), WinSetTextColor(), WinSetForeColorRGB(), WinSetBackColorRGB(), WinSetTextColorRGB(), WinGetScalingMode(), WinSetScalingMode()

GraphicStateType

Nothing. This structure should not have been used by applications.

WindowFlagsType

Various Window Manager functions. In Palm OS Cobalt this structure is not exposed to application developers.

Table 131.4  Deleted types

Deleted API

Use instead

WinPtr

WinHandle. Windows are always referred to by their handle in Palm OS Cobalt.

Table 131.5  Deleted #defines

Deleted API

Use instead

pinFrm..., pinPIN..., pinStat..., pinSys..., pinWinSetConstraintsSize

See "Patching Shared Libraries" of Exploring Palm OS: System Management for information on function entry points.

winDefaultDepthFlag

Nothing. This flag was not documented and should not have been used by applications.

winPaletteInit

Nothing. This was always defined to be an internal-use-only operation.

Modified APIs ^TOP^

Table 131.6  Modified functions

Modified API

Description of change

status_t EvtGetPenNative (WinHandle, Coord *, Coord *, Boolean *)

Now declared in Event.h, this function has been updated to return a status indication. In Palm OS Cobalt this function always returns errNone.

Table 131.7  Modified structures

Modified API

Description of change

WindowType

The internals of this structure are now completely private.

Table 131.8  Modified #defines

Modified API

Description of change

#define kWinVersion 10

Was 5.

Table 131.9  Modified enumerated types

Modified API

Description of change

PatternType

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

UnderlineModeType

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

WinDirectionType

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

WindowFormatType

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

WinDrawOperation

Formerly an enum, this is now a typedef that accepts one of the values defined by the WinDrawOperationTag enum. Note that some of the drawing operations are deprecated in Palm OS Cobalt; see "WinDrawOperation" of Exploring Palm OS: User Interface, paying particular attention to the Compatibility section.

WinLockInitType

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

WinScreenAttrType

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

WinScreenModeOperation

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

Unchanged APIs ^TOP^

Table 131.10  Unchanged functions 

WinClipRectangle()

WinCopyRectangle()

WinCreateBitmapWindow()

WinCreateOffscreenWindow()

WinCreateWindow()

WinDeleteWindow()

WinDisplayToWindowPt()

WinDrawBitmap()

WinDrawChar()

WinDrawChars()

WinDrawGrayLine()

WinDrawGrayRectangleFrame()

WinDrawInvertedChars()

WinDrawLine()

WinDrawPixel()

WinDrawRectangle()

WinDrawRectangleFrame()

WinDrawTruncChars()

WinEraseChars()

WinEraseLine()

WinErasePixel()

WinEraseRectangle()

WinEraseRectangleFrame()

WinEraseWindow()

WinFillLine()

WinFillRectangle()

WinGetActiveWindow()

WinGetBitmap()

WinGetBounds()

WinGetClip()

WinGetCoordinateSystem()

WinGetDisplayExtent()

WinGetDisplayWindow()

WinGetDrawWindow()

WinGetDrawWindowBounds()

WinGetFramesRectangle()

WinGetPattern()

WinGetPatternType()

WinGetPixel()

WinGetPixelRGB()

WinGetScalingMode()

WinGetSupportedDensity()

WinGetWindowExtent()

WinGetWindowFrameRect()

WinIndexToRGB()

WinInvertChars()

WinInvertLine()

WinInvertPixel()

WinInvertRectangle()

WinInvertRectangleFrame()

WinModal()

WinPaintBitmap()

WinPaintChar()

WinPaintChars()

WinPaintLine()

WinPaintLines()

WinPaintPixel()

WinPaintPixels()

WinPaintRectangle()

WinPaintRectangleFrame()

WinPaintRoundedRectangleFrame()

WinPaintTiledBitmap()

WinPalette()

WinPopDrawState()

WinPushDrawState()

WinResetClip()

WinRGBToIndex()

WinScaleCoord()

WinScalePoint()

WinScaleRectangle()

WinScreenGetAttribute()

WinScreenLock()

WinScreenMode()

WinScreenUnlock()

WinScrollRectangle()

WinSetActiveWindow()

WinSetBackColor()

WinSetBackColorRGB()

WinSetBounds()

WinSetClip()

WinSetColors()

WinSetCoordinateSystem()

WinSetDrawMode()

WinSetDrawWindow()

WinSetForeColor()

WinSetForeColorRGB()

WinSetPattern()

WinSetPatternType()

WinSetScalingMode()

WinSetTextColor()

WinSetTextColorRGB()

WinSetUnderlineMode()

WinUnscaleCoord()

WinUnscalePoint()

WinUnscaleRectangle()

WinValidateHandle()

WinWindowToDisplayPt()

Table 131.11  Unchanged macros

ECWinValidateHandle()

WinGetWindowBounds()

WinSetWindowBounds()

Table 131.12  Unchanged structures

FrameBitsType

WinLineType

Table 131.13  Unchanged types

CustomPatternType

FrameType

IndexedColorType

WinHandle

Table 131.14  Unchanged #defines 

boldRoundFrame

dialogFrame

DrawStateStackSize

grayHLinePattern

grayHLinePatternOdd

kBitmapScalingOff

kCoordinatesDouble

kCoordinatesNative

kCoordinatesOneAndAHalf

kCoordinatesQuadruple

kCoordinatesStandard

kCoordinatesTriple

kTextPaddingOff

kTextScalingOff

menuFrame

noFrame

noPattern

popupFrame

rectangleFrame

roundFrame

simple3DFrame

simpleFrame

winErrPalette

winPaletteGet

winPaletteSet

winPaletteSetToDefault

WinUseTableIndexes