[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

The icon library functions do all the work needed to read, write and
examine an icon's .info file and corresponding DiskObject structure:

struct DiskObject *GetDiskObject(UBYTE *name);
struct DiskObject *GetDiskObjectNew(UBYTE *name);                     (V36)
BOOL               PutDiskObject(UBYTE *name, struct DiskObject *diskobj);
void               FreeDiskObject(struct DiskObject *diskobj);
BOOL               DeleteDiskObject(UBYTE *);                         (V37)

UBYTE             *FindToolType(UBYTE **toolTypeArray, UBYTE *typeName);
BOOL               MatchToolValue(UBYTE *typeString, UBYTE *value);

struct DiskObject *GetDefDiskObjectNew(LONG type);                    (V36)
BOOL               PutDefDiskObject(struct DiskObject *diskobj);      (V36)

UBYTE             *BumpRevision(UBYTE *newbuf, UBYTE *oldname);

The icon library routine GetDiskObject() reads an icon's .info file from
disk into a DiskObject structure it creates in memory where it can be
examined or altered.  PutDiskObject() writes the DiskObject out to disk
and FreeDiskObject() frees the memory it used. If you modify any pointers
in a DiskObject acquired via GetDiskObject(), replace the old pointers
before calling FreeDiskObject() so that the proper memory will be freed.

Release 2 includes a new function named GetDiskObjectNew() that works the
same as GetDiskObject(), except that if no .info file is found, a default
DiskObject will be created for you.  Also new for Release 2 is
DeleteDiskObject() for removing .info files from disk, and the functions
GetDefDiskObject() and PutDefDiskObject() which allow the default icons in
ROM to be copied or replaced with new defaults in RAM.

Once an icon's .info file has been read into a DiskObject structure, the
functions FindToolType() and MatchToolValue() can be used to examine the
icon's Tool Types array.

[Back to Amiga Developer Docs]