Workbench lib autodoc / AddAppIcon()

Have a question about our Software Developer Kit? Ask them here.

Workbench lib autodoc / AddAppIcon()

Postby trixie » Thu Jun 13, 2013 11:33 am

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
trixie
 
Posts: 395
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: Workbench lib autodoc / AddAppIcon()

Postby Rigo » Thu Jun 13, 2013 12:55 pm

Fixed internally

Simon
User avatar
Rigo
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 340
Joined: Mon Jan 17, 2011 10:42 pm

Re: Workbench lib autodoc / AddAppIcon()

Postby trixie » Thu Jun 13, 2013 1:08 pm

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
User avatar
trixie
 
Posts: 395
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic


Return to SDK Support

Who is online

Users browsing this forum: No registered users and 0 guests