Unit 'icon' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#amunits]

IconControlA

Set and get icon and icon.library options

Declaration

Source position: icon.pas line 366

function IconControlA(

  icon: pDiskObject;

  const tags: pTagItem

):LongWord;

Arguments

icon

  

Pointer to a struct DiskObject, or NULL if global options are to be modified/queried.

tags

  

Options to modify/query.

Function result

Number of tags that were processed correctly, i.e. the number of tags whose parameters are in order, for which information could be returned, etc. If processing stops because of an error, the number returned by this function will be smaller than the number of tag items passed in. The same happens if the information you wanted to obtain is unavailable. In any case, check the error code this routine can set up for you.

Changing an icon's palette or image data does not automatically produce a different icon image you can use. To do this, you must re-layout it using LayoutIconA().

When querying parameters, make sure to always pass in a pointer to a LongWord variable to store the result in.

Some get/set operations may cause additional memory to be allocated. This may fail; be prepared.

IconControlA() processes the tag item list in sequential order. This has consequences for several tags, such as the palette size and the transparent colour. For example, if you want to make colour #14 of an icon image transparent, make sure to have the palette size set to at least 15 colours before you try to change the transparent colour. Otherwise, IconControlA() may refuse to set the transparent colour to #14 since it won't know that there should be more than 14 colours in that image at the time you try to set it. Therefore, if you wanted to change the palette size and the transparent colour in the same tag item list, make sure that the palette size change tag appears before the transparent colour change tag.

As described above, some of the operations on icons are not supported for DiskObjects not allocated through icon.library. In such cases you will receive an error code ERROR_ACTION_NOT_KNOWN.

Description

This function is used to modify and query icon and icon.library options.

See also

IoErr

  

Return extra information from the system

DupDiskObjectA

  

Duplicate an icon

GetIconTagList

  

Retrieve an icon

LayoutIconA

  

Adapt a palette-mapped icon for display

NewDiskObject

  

Create an empty icon

BltMaskBitMapRastPort

  

Blit from source bitmap to destination rastport with masking of source image.

ObtainBestPenA

  

Search for the closest color match, or allocate a new one.

CallHookPkt

  

Invoke a Hook function callback.


Documentation generated on: 2021-07-30