struct hwIconList *list = hw_GetIconImages(lua_ID *id, struct hwTagList *tags);
lua_ID
. See Object identifiers for details.
hw_GetIconImages()
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:
Palette
member contains
a valid palette. If Data
contains 32-bit ARGB pixels, the alpha byte will always
be set for every pixel. The pixel buffer's size will be exactly width * height * bpp
.
No row padding will be used. The pixel buffer pointer will be valid until you call
hw_FreeIcons().
Width:
Height:
Flags:
HWICONFLAGS_DEFAULT:
HWICONFLAGS_SELECTED:
HWICONFLAGS_OPAQUE:
HWICONFLAGS_EXTENDED:
struct hwIconList
has the structure extensions
introduced in Hollywood 9.0. Before you access any of those extensions, e.g.
the Palette
or Depth
members, you must either check if this flag is set or
if the Hollywood version that opened your plugin is at least 9.0. (V9.0)
Palette:
ULONGs
which contains the palette colors for the image. The palette
colors are stored as raw RGB values. Note that you need to explicitly
request palette image support by setting the HWGIITAG_PALETTE
tag to True
(see below)
or hw_GetIconImages()
will never return palette images. (V9.0)
TransPen:
HWPEN_NONE
will be written to this member. Note that you need to explicitly request palette
image support by setting the HWGIITAG_PALETTE
tag to True
(see below) or this
member will never be set. (V9.0)
Depth:
hw_GetIconImages()
also accepts a tag list which allows you to configure some further
options. The following tags are currently recognized:
HWGIITAG_PALETTE:
True
, hw_GetIconImages()
will also return palette images
inside the icon. For compatibility reasons, this is not done by default because
palette images inside icons weren't supported before Hollywood 9.0. Thus, plugins
need to explicitly request them before they are returned. This can be done by setting
this tag to True
. (V9.0)
The list that is returned by this function must be freed using the hw_FreeIcons() function. See hw_FreeIcons for details.
Note that in contrast to the list returned by hw_GetIcons(), the
list returned by hw_GetIconImages()
will be sorted from small to large sizes.
NULL
NULL
on error