Name
SetTrayIcon -- change the tray icon (V9.0)
Synopsis
int ok = SetTrayIcon(APTR display, ULONG *rgb, int width, int height,
             struct hwTagList *tags);
Function
This function is optional and must only be implemented if the HWEXT_DISPLAYADAPTER_TRAYICON extension bit has been set. See Extension plugins for details. If that is the case, it must set the tray icon to the image passed in the rgb parameter. rgb will be a pointer to a memory buffer of raw ARGB pixels in the size specified by width and height. The alpha byte in that buffer will always be set. Note that rgb may also be NULL. In that case, the tray icon needs to be removed.

Additionally, Hollywood may pass a tag list to SetTrayIcon() which can contain the following tags:

HWSTITAG_TOOLTIP:
If this tag is in the list, the pData member of it will be set to a string that should be installed as the tray icon's tooltip.

Note that if you want Hollywood to call this function, you also must set the HWSDAFLAGS_SETTRAYICON flag in your call to hw_SetDisplayAdapter(). See hw_SetDisplayAdapter for details.

When the user clicks on the tray icon, you should post a HWEVT_TRAYICON event to Hollywood's event queue. See hw_PostEvent for details.

Inputs
handle
display handle returned by OpenDisplay()
rgb
ARGB image data of new tray icon or NULL to remove the tray icon
width
width of the ARGB pixel buffer
height
height of the ARGB pixel buffer
tags
tag list containing additional options (see above)

Show TOC