2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 #include <exec/types.h>
7 #include <workbench/icon.h>
8 #include <proto/icon.h>
10 #include "icon_intern.h"
12 # include <aros/debug.h>
14 /*****************************************************************************
18 AROS_LH1(struct DiskObject
*, NewDiskObject
,
21 AROS_LHA(ULONG
, type
, D0
),
24 struct IconBase
*, IconBase
, 29, Icon
)
27 Create empty diskobject structure.
30 type - WBDISK, WBDRAWER, WBTOOL, WBPROJECT,
31 WBGARBAGE, WBDEVICE or WBKICK
46 *****************************************************************************/
52 struct NativeIcon
*ni
;
54 pool
= CreatePool(0,1024,1024);
55 if (!pool
) return NULL
;
57 /* AROS doesn't need the gfx to be placed in chip niory, so we can use pools */
58 ni
= (struct NativeIcon
*)AllocPooled(pool
, sizeof(struct NativeIcon
));
61 memset(ni
, 0, sizeof(*ni
));
63 ni
->ni_DiskObject
.do_Type
= type
;
65 NEWLIST(&ni
->ni_FreeList
.fl_MemList
);
66 for (i
= 0; i
< 2; i
++) {
67 ni
->ni_Image
[i
].TransparentColor
= -1;
70 AddIconToList(ni
, IconBase
);
72 return &ni
->ni_DiskObject
;
75 } /* NewDiskObject() */