Workbench lib autodoc / AddAppIcon()

Have a question about our Software Developer Kit? Ask them here.
Post Reply
User avatar
trixie
Posts: 399
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Workbench lib autodoc / AddAppIcon()

Post by trixie »

In the Workbench library autodoc, in the AddAppIcon() function section, the doc says the following:
diskobj - pointer to a DiskObject structure filled in as follows:
do_Magic - NULL
do_Version - NULL
do_Gadget - a gadget structure filled in as follows:
NextGadget - NULL
LeftEdge - NULL
TopEdge - NULL
Width - width of icon hit-box
Height - height of icon hit-box
Flags - NULL or GADGHIMAGE
Activation - NULL
GadgetType - NULL
GadgetRender - pointer to Image structure filled in as
follows:
LeftEdge - NULL
TopEdge - NULL
Width - width of image (must be <= Width of hit box)
Height - height of image (must be <= Height of hit box)
Depth - # of bit-planes in image
ImageData - pointer to actual word aligned bits
(CHIP MEM)
PlanePick - Plane mask ((1 << depth) - 1)
PlaneOnOff - 0
NextImage - NULL
SelectRender - pointer to alternate Image struct or NULL
GadgetText - NULL
MutualExclude - NULL
SpecialInfo - NULL
GadgetID - NULL
UserData - NULL
do_Type - NULL
do_DefaultTool - NULL
do_ToolTypes - NULL
do_CurrentX - NO_ICON_POSITION (recommended)
do_CurrentY - NO_ICON_POSITION (recommended)
do_DrawerData - NULL
do_ToolWindow - NULL
do_StackSize - NULL
It is, of course, apparent that passing NULL pointers where integer values are expected will cause compiler warnings. So it should be changed:
diskobj - pointer to a DiskObject structure filled in as follows:
do_Magic - 0
do_Version - 0
do_Gadget - a gadget structure filled in as follows:
NextGadget - NULL
LeftEdge - 0
TopEdge - 0
Width - width of icon hit-box
Height - height of icon hit-box
Flags - 0 or GADGHIMAGE
Activation - 0
GadgetType - 0
GadgetRender - pointer to Image structure filled in as
follows:
LeftEdge - 0
TopEdge - 0
Width - width of image (must be <= Width of hit box)
Height - height of image (must be <= Height of hit box)
Depth - # of bit-planes in image
ImageData - pointer to actual word aligned bits
(CHIP MEM)
PlanePick - Plane mask ((1 << depth) - 1)
PlaneOnOff - 0
NextImage - NULL
SelectRender - pointer to alternate Image struct or NULL
GadgetText - NULL
MutualExclude - 0
SpecialInfo - NULL
GadgetID - 0
UserData - NULL
do_Type - 0
do_DefaultTool - NULL
do_ToolTypes - NULL
do_CurrentX - NO_ICON_POSITION (recommended)
do_CurrentY - NO_ICON_POSITION (recommended)
do_DrawerData - NULL
do_ToolWindow - NULL
do_StackSize - 0
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition

User avatar
Rigo
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 347
Joined: Mon Jan 17, 2011 9:42 pm

Re: Workbench lib autodoc / AddAppIcon()

Post by Rigo »

Fixed internally

Simon

User avatar
trixie
Posts: 399
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Workbench lib autodoc / AddAppIcon()

Post by trixie »

Thank you!
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition

Post Reply