GetIconImages -- get all images inside icon (V9.0)
struct hwIconList *list = GetIconImages(APTR handle, struct hwTagList
This function must return a list of all images stored inside an icon object. It is expected to return a pointer to the first node of a struct hwIconList list.

Note that your plugin is responsible for freeing the list returned by this function. The list can't be freed by hw_FreeIcons() because it has been allocated by your plugin. You may free a list returned by GetIconImages() as soon as Hollywood calls GetIconImages() again or when Hollywood calls your ClosePlugin() function.

The struct hwIconList that GetIconImages() needs to return looks like this:

struct hwIconList
    struct hwIconList *Succ;
    APTR Data;
    int Width;
    int Height;
    ULONG Flags;
    ULONG *Palette;
    ULONG TransPen;
    int Depth;
    APTR UserData;

For each node in the list, struct hw_IconList must be initialized as follows:

Must be set to a pointer to the next list node or NULL if this node is the last one.

Must be set to the image's pixel data. For RGB images, this must be set to a 32-bit ARGB pixel buffer, for CLUT images to an 8-bit pixel buffer. For 32-bit images the alpha byte must always be set for every pixel. For CLUT images, you must also set the Palette member (see below). The pixel buffer's size must be exactly width * height * bpp. No row padding must be used.

Must be set to the image's width.

Must be set to the image's height.

Must be set to a combination of flags for this image. The following flags are currently supported:

This flag marks the default icon. Hollywood's icon type allows scripts to designate an icon as the default one. It's up to you how you interpret and handle the default icon.

If this flag is set, the image in this list node describes a selected icon state. On AmigaOS and compatibles, icon images usually have two states: normal and selected. You can set this flag to mark an image as selected.

This flag should be set if the image doesn't use any transparency and all alpha bytes are set to 255 (i.e. visible).

If the image is a CLUT image, this must be set to a pointer to an array of ULONGs which contains the palette colors for the image. The palette colors are stored as raw RGB values. Note that this must always be set to a buffer containing 256 ULONG entries. Even if you set Depth to something less than 8, the palette you specify here must still contain 256 entries.

If the image is a CLUT image and has a transparent pen, set this member to the pen that should be transparent. If there is no transparent pen, set TransPen to HWPEN_NONE.

Set this to the image's depth. This must be a bit depth either between 1 and 8 for CLUT images or 32 for RGB images with alpha channel. Do not set it to anything else.

Designer compatibility

icon handle returned by LoadIcon()
reserved for future use, currently always NULL
a list containing all images in the icon object or NULL on error

Show TOC