1 #include <workbench/workbench.h>
2 #include <workbench/icon.h>
4 #include <proto/icon.h>
8 int main(int argc
, char **argv
)
10 const char * const typeNames
[] =
25 LONG isDefault
= FALSE
;
26 struct DiskObject
*icon
= GetIconTags
29 ICONGETA_FailIfUnavailable
, FALSE
,
30 ICONGETA_IsDefaultIcon
, (IPTR
) &isDefault
,
42 "Position: x = %ld (0x%lx), y = %ld (0x%lx)\n"
46 argv
[1], isDefault
? "yes" : "no",
47 typeNames
[icon
->do_Type
], icon
->do_Type
, icon
->do_DefaultTool
,
48 (long)icon
->do_CurrentX
, (unsigned long)icon
->do_CurrentX
,
49 (long)icon
->do_CurrentY
, (unsigned long)icon
->do_CurrentY
,
50 icon
->do_DrawerData
!= NULL
? "yes" : "no",
51 (long)icon
->do_StackSize
,
52 icon
->do_ToolTypes
!= NULL
? "yes" : "no"
55 if (icon
->do_ToolTypes
!= NULL
)
60 printf("Tooltype data:\n");
62 while ((tt
= icon
->do_ToolTypes
[i
]) != NULL
)
73 printf("ERROR: Failed to open icon.\n");
79 printf("Usage: %s <name> (without trailing \".info\")\n", argv
[0]);