a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 icon.library
  AddFreeList
  BumpRevision
  ChangeToSelectedIconColor
  DeleteDiskObject
  DrawIconStateA
  DupDiskObjectA
  FindToolType
  FreeDiskObject
  FreeFreeList
  GetDefDiskObject
  GetDiskObject
  GetDiskObjectNew
  GetIconRectangleA
  GetIconTagList
  IconControlA
  LayoutIconA
  MatchToolValue
  NewDiskObject
  PutDefDiskObject
  PutDiskObject
  PutIconTagList
Include
GuruMeditation
Docs » Autodocs » icon.library » DupDiskObjectA

NAME

	DupDiskObjectA -- Duplicate an icon (V44)

SYNOPSIS

	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,...);

FUNCTION

	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.

INPUTS

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

TAGS

	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
unless you use the ICONGETA_Screen tag (see below).
This tag defaults to FALSE.
ICONGETA_Screen (struct Screen *) -- If you specified that the
palette mapped image data attached to an icon should be
activated (via "ICONDUPA_ActivateImageData,TRUE") this
tag allows you to choose the screen the icon is to be remapped
to. It works just like the corresponding tag for the
icon.library/GetIconTagList call.
There is no default value for this tag, i.e. if the tag is
omitted, the icon will be remapped to the default screen.
This tag was introduced in icon.library 44.535.
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.

RESULT

	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.

NOTES

	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.

BUGS

	icon.library will try to preserve the original bitmapped image
data loaded with a palette mapped icon. If you duplicated this
type of icon, the preserved original bitmapped image data would
not be transferred to the copy. This was fixed in V44.527.
For this feature to work, you must specify that the image data
should be duplicated via "ICONDUPA_DuplicateImages,TRUE".

SEE ALSO

dos.library/IoErr(), icon.library/GetIconTagList(), <workbench/icon.h>, <workbench/workbench.h>

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Red Sector Inc.

CSL
ATX
SNT
RSI

Comments:

$VER: d0.se 1.14 Copyright © 2011-2020 Tobias Geijersson support at d0 dot se