amiga-bootcamp/11_libraries/icon.md
Ilia Sharin 21751c0025 docs(amiga): complete AmigaOS 3.1/3.2 developer reference — 172 files across 17 sections
Comprehensive technical documentation covering:
- Hardware: OCS/ECS/AGA custom chip registers, Copper & Blitter deep dives
- Boot sequence: cold boot through startup-sequence
- Binary format: HUNK executable spec, relocation, debug info
- Linking & ABI: .fd files, LVO tables, register calling conventions
- Exec kernel: tasks, interrupts, memory, signals, semaphores
- AmigaDOS: file I/O, FFS/OFS layout, CLI/Shell scripting
- Graphics: planar bitmaps, Copper programming, HAM/EHB modes
- Intuition: screens, windows, IDCMP, BOOPSI
- Devices: trackdisk, SCSI, serial, timer, audio, keyboard
- Libraries: utility, expansion, IFFParse, locale, ARexx
- Networking: bsdsocket API, SANA-II, TCP/IP stack comparison
- Toolchain: GCC, vasm/vlink, SAS/C, NDK, debugging
- Reverse engineering: IDA/Ghidra setup, compiler fingerprints, case studies
- CPU & MMU: 68040/060 emulation libs, PMMU, cache management
- Driver development: SANA-II, Picasso96/RTG, AHI audio

All files include breadcrumb navigation. No local paths or proprietary content.
2026-04-23 12:17:35 -04:00

1.8 KiB

← Home · Libraries

icon.library — Workbench Icons (.info Files)

Overview

Every Workbench-visible file has a companion .info file containing its icon imagery, tooltypes, and default tool. icon.library provides reading/writing these structures.


struct DiskObject

/* workbench/workbench.h — NDK39 */
struct DiskObject {
    UWORD           do_Magic;      /* $E310 = WB_DISKMAGIC */
    UWORD           do_Version;    /* WB_DISKVERSION */
    struct Gadget   do_Gadget;     /* the icon gadget */
    UBYTE           do_Type;       /* WBDISK, WBTOOL, WBPROJECT, etc. */
    char           *do_DefaultTool; /* default tool path */
    char          **do_ToolTypes;   /* NULL-terminated string array */
    LONG            do_CurrentX;   /* icon X position */
    LONG            do_CurrentY;   /* icon Y position */
    BPTR            do_DrawerData;  /* drawer window position (BPTR) */
    char           *do_ToolWindow;  /* tool window spec */
    LONG            do_StackSize;   /* stack size for tool */
};

Icon Types

Constant Value Description
WBDISK 1 Disk/volume icon
WBDRAWER 2 Drawer (directory)
WBTOOL 3 Executable tool
WBPROJECT 4 Project (document)
WBGARBAGE 5 Trashcan
WBDEVICE 6 Device
WBKICK 7 Kickstart disk
WBAPPICON 8 AppIcon (OS 2.0+)

ToolTypes

ToolTypes are key=value strings stored in do_ToolTypes:

struct DiskObject *dobj = GetDiskObject("myapp");
if (dobj) {
    char *val = FindToolType(dobj->do_ToolTypes, "PUBSCREEN");
    if (val) Printf("Screen: %s\n", val);
    if (MatchToolValue(FindToolType(dobj->do_ToolTypes, "FLAGS"), "DEBUG"))
        Printf("Debug mode\n");
    FreeDiskObject(dobj);
}

References

  • NDK39: workbench/workbench.h, workbench/icon.h