int ok = OpenPopupMenu(APTR display, struct hwMenuTreeInfo *menu, int x, int y, struct hwTagList *tags);
HWEXT_DISPLAYADAPTER_POPUPMENU
extension bit has been set. See Extension plugins for details. If that is
the case, OpenPopupMenu()
will be called if Hollywood wants your display
adapter to show a popup menu. Hollywood will pass a struct hwMenuTreeInfo
pointer in menu
which contains all nodes and leaves of the menu bar.
See SetMenuBar for a description of this structure.
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.
The x
and y
parameters will contain the desired position for the popup menu
on the screen or CO_UNSPECIFIED
if the popup menu should appear under the
mouse pointer. Note that all coordinates are relative to the screen's origin,
not the display's origin.
NULL
True
to indicate success, False
to indicate failure