Documentation  |   Table of Contents   |  < Previous   |  Next >  

70    Menu.h

Porting Applications to Palm OS® Cobalt

Exploring Palm OS®

The only real changes to the Menu APIs are:

  • the addition of a DmOpenRef parameter to a handful of functions (through which you specify a resource file from which resources are to be taken; this is to work around the fact that the resource search chain is not supported in Palm OS Cobalt),
  • the hiding of the contents of the MenuBarType structure (the contents of this structure had been exposed for debugging purposes; applications were never to have accessed this structure's contents directly),
  • the removal of some APIs that were exposed but never intended for use by application developers.

Deleted APIs ^TOP^

Table 70.1  Deleted structures 

Deleted API

Use instead

MenuBarAttrType

Nothing. This structure was only used in the definition of the MenuBarType structure, which is now opaque. Applications should not have been accessing this structure directly.

MenuCmdBarButtonType

Nothing. This structure was only used in the definition of the MenuCmdBarType structure, which was defined but not used by the public APIs.

MenuCmdBarType

Nothing. This structure was defined but not used by the public APIs.

MenuItemType

Nothing. This structure was only used in the definition of the MenuItemType structure, which is no longer exported. Applications should not have been accessing this structure directly.

MenuPullDownType

Nothing. This structure was only used in the definition of the MenuBarType structure, which is now opaque. Applications should not have been accessing this structure directly.

Table 70.2  Deleted types

Deleted API

Use instead

MenuPullDownPtr

Nothing. This type was only used in the definition of the MenuBarType structure, which is now opaque. Applications should not have been accessing this structure directly.

Modified APIs ^TOP^

Table 70.3  Modified functions

Modified API

Description of change

status_t MenuCmdBarAddButton (uint8_t, DmOpenRef, uint16_t, MenuCmdBarResultType, uint32_t, char *)

Takes an additional parameter: a DmOpenRef to the resource database that contains the bitmap to display on the button.

Boolean MenuCmdBarGetButtonData (int16_t, DmOpenRef *, uint16_t *, MenuCmdBarResultType *, uint32_t *, char *)

Takes an additional parameter: a pointer through which you can elect to receive a DmOpenRef to the resource database that contains the bitmap displayed on the button.

MenuBarType *MenuInit (DmOpenRef, uint16_t)

Takes an additional parameter: a DmOpenRef to the resource database that contains the menu.

void MenuSetActiveMenuRscID (DmOpenRef, uint16_t)

Takes an additional parameter: a DmOpenRef to the resource database that contains the menu.

Table 70.4  Modified structures

Modified API

Description of change

MenuBarType

The contents of this structure are now completely private.

Table 70.5  Modified enumerated types

Modified API

Description of change

MenuCmdBarResultType

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

Unchanged APIs ^TOP^

Table 70.6  Unchanged functions

MenuAddItem()

MenuCmdBarDisplay()

MenuDispose()

MenuDrawMenu()

MenuEraseStatus()

MenuGetActiveMenu()

MenuHandleEvent()

MenuHideItem()

MenuSetActiveMenu()

MenuShowItem()

Table 70.7  Unchanged types

MenuBarPtr

Table 70.8  Unchanged #defines

menuButtonCause

menuCmdBarMaxTextLength

menuCmdBarOnLeft

menuCmdBarOnRight

menuCommandCause

menuErr...

MenuSeparatorChar

noMenuItemSelection

noMenuSelection

separatorItemSelection