Page 1 of 1

Workbench lib autodoc / AddAppIcon()

PostPosted: Thu Jun 13, 2013 11:33 am
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

Re: Workbench lib autodoc / AddAppIcon()

PostPosted: Thu Jun 13, 2013 12:55 pm
by Rigo
Fixed internally

Simon

Re: Workbench lib autodoc / AddAppIcon()

PostPosted: Thu Jun 13, 2013 1:08 pm
by trixie
Thank you!