int ok = SetMenuBar(APTR display, struct hwMenuTreeInfo *menu,
struct hwTagList *tags);
HWEXT_DISPLAYADAPTER_MENUADAPTER
extension bit has been set. See Extension plugins for details. If that is
the case, SetMenuBar() must set the display's menu bar to the one specified
in the menu parameter. The menu parameter will be either a pointer to a
struct hwMenuTreeInfo describing the menu tree or NULL. If it is
NULL, the menu bar must be removed from the display.
struct hwMenuTreeInfo looks like this:
struct hwMenuTreeInfo
{
struct hwMenuTreeInfo *Succ;
STRPTR Name;
STRPTR ID;
STRPTR Hotkey;
ULONG Flags;
struct hwMenuTreeInfo *FirstChild;
APTR UserData;
};
|
Here is a description of the individual structure members:
Succ:NULL if this node is the last one.
Name:NULL,
you must create a separator item.
ID:NULL.
Hotkey:NULL.
Flags:
HWMENUFLAGS_TOGGLE:
HWMENUFLAGS_RADIO:
HWMENUFLAGS_SELECTED:HWMENUFLAGS_TOGGLE or HWMENUFLAGS_RADIO is set.
HWMENUFLAGS_DISABLED:
FirstChild:NULL, the menu item
doesn't have a subitem.
UserData:
Whenever the user selects a menu item, you need to post an HWEVT_MENUITEM
event to Hollywood's event queue. See hw_PostEvent for details.
NULL to remove menuNULLTrue to indicate success, False to indicate failure