Metatarget for copying of testfile fixed.
[AROS.git] / workbench / libs / icon / newdiskobject.c
blob1acf16e0738f6228c218a001df85af39408cf687
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
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 /*****************************************************************************
16 NAME */
18 AROS_LH1(struct DiskObject *, NewDiskObject,
20 /* SYNOPSIS */
21 AROS_LHA(ULONG, type, D0),
23 /* LOCATION */
24 struct IconBase *, IconBase, 29, Icon)
26 /* FUNCTION
27 Create empty diskobject structure.
29 INPUTS
30 type - WBDISK, WBDRAWER, WBTOOL, WBPROJECT,
31 WBGARBAGE, WBDEVICE or WBKICK
33 RESULT
35 NOTES
36 Not implemented.
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 int i;
51 APTR pool;
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));
59 if (!ni) return NULL;
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;
74 AROS_LIBFUNC_EXIT
75 } /* NewDiskObject() */