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

	DupDiskObjectA -- Duplicate an icon (V44)

	icon = DupDiskObjectA(icon,tags);
	D0                    A0   A1

	struct DiskObject * DupDiskObjectA(struct DiskObject *icon,
	                                   struct TagItem *tags);

	icon = DupDiskObject(icon,tag1,...);

	struct DiskObject * DupDiskObject(struct DiskObject *icon,
	                                  Tag tag1,...);

	This function is used to create a duplicate of a DiskObject
	in memory. It can also be used to create an extended
	("native") DiskObject data structure from an existing,
	traditional format DiskObject data structure.

	icon -- Pointer to the icon to be duplicated.
	tags -- Control options.

	ICONDUPA_DuplicateDrawerData (BOOL) -- Duplicate the DrawerData,
	    if available.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateImages (BOOL) -- Duplicate the icon images;
	    note that this DOES NOT include the associated image
	    data. To get the image data duplicated, too, also use
	    the ICONDUPA_DuplicateImageData tag.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateImageData (BOOL) -- Duplicate the icon image
	    data; this tag works together with the ICONDUPA_DuplicateImages
	    tag. If ICONDUPA_DuplicateImageData is set to TRUE, you must
	    also set ICONDUPA_DuplicateImages to TRUE.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateDefaultTool (BOOL) -- Duplicate the icon default
	    tool, if available.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateToolTypes (BOOL) -- Duplicate the icon tool
	    types, if available.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateToolWindow (BOOL) -- Duplicate the icon tool
	    window if available.

	    This tag defaults to TRUE.

	ICONDUPA_ActivateImageData (BOOL) -- If the source icon contains
	    palette mapped image data that was never put to use (this
	    happens if it is retrieved with the GetDiskObject() call rather
	    than the new GetIconTagList() call), this tag will cause the
	    image data to be analyzed and an attempt to be made to use that
	    image data in the duplicate. The resulting icon will be remapped
	    for display on the default screen, such as the Workbench screen.

	    This tag defaults to FALSE.

	ICONA_ErrorCode (LONG *) -- Pointer to a LONG word variable to
	    store error codes in. Note that this variable will be
	    initialized regardless of whether an error occured or not.
	    Thus, you can check for an error condition by comparing the
	    variable contents against 0; 0 indicates success, all other
	    values are error codes as defined by dos.library.

	icon -- Pointer to a struct DiskObject or NULL in case of error.
	    You can use IoErr() to retrieve the error code or use the
	    ICONA_ErrorCode tag instead.

	Any data you chose not to have duplicated will be set to NULL.
	For example, if you specified "ICONDUPA_DuplicateImages,FALSE",
	then the resulting icon's do_Gadget.GadgetRender and
	do_Gadget.SelectRender will both be NULL.


[Back to Amiga Developer Docs]