struct hwIconList *list = hw_GetIcons(void);
@APPICON
preprocessor command, inbuilt default Hollywood icons or icons that
have been linked to an applet or executable.
This function is especially useful for display adapters which redirect Hollywood's
output to a custom display device and want to register the script's icons with
this custom display device or toolkit. By calling hw_GetIcons()
display adapters
can easily obtain a list with all icons currently defined by the script. hw_GetIcons()
will return a pointer to a struct hwIconList
which looks like this:
struct hwIconList { struct hwIconList *Succ; APTR Data; int Width; int Height; ULONG Flags; ULONG *Palette; // V9.0 ULONG TransPen; // V9.0 int Depth; // V9.0 APTR UserData; // V9.0 }; |
For each node in the list, struct hw_IconList
will be initialized as
follows:
Succ:
NULL
if this node is the last one.
Data:
hw_GetIcons()
currently doesn't
support CLUT images. The alpha byte will always be set for every pixel. The pixel buffer's size will
be exactly width * height * 4
. No row padding will be used. The pixel
buffer pointer will be valid until you call hw_FreeIcons().
Width:
Height:
Flags:
HWICONFLAGS_DEFAULT:
@APPICON
preprocessor command
allows scripts to designate an icon as the default one. It's up to you how you
interpret and handle the default icon. On most systems you can probably ignore
this flag because icons are chosen depending on the current screen resolution.
HWICONFLAGS_SELECTED:
Palette:
NULL
because hw_GetIcons()
currently won't return palette images. (V9.0)
TransPen:
HWPEN_NONE
because hw_GetIcons()
currently won't return palette
images. (V9.0)
Depth:
hw_GetIcons()
currently won't return palette images. (V9.0)
The list that is returned by this function must be freed using the hw_FreeIcons() function. See hw_FreeIcons for details.
Do not expect this list to be sorted. The individual icons can be stored in an order that is completely random inside this list.
NULL
on error