grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / datatypes / disposedtobject.c
blobee06bc06ca7e4112bc01b3e420fb00f009bb3b0b
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #include <datatypes/datatypesclass.h>
9 #include <proto/dos.h>
10 #include <proto/exec.h>
11 #include <proto/intuition.h>
12 #include "datatypes_intern.h"
14 /*****************************************************************************
16 NAME */
17 #include <proto/datatypes.h>
19 AROS_LH1(void, DisposeDTObject,
21 /* SYNOPSIS */
22 AROS_LHA(Object *, o, A0),
24 /* LOCATION */
25 struct Library *, DataTypesBase, 9, DataTypes)
27 /* FUNCTION
29 Dispose a data type object obtained by NewDTObjectA().
31 INPUTS
33 o -- The data type object to dispose of; may be NULL.
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 NewDTObjectA()
47 INTERNALS
49 HISTORY
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 if(o != NULL)
57 struct DTSpecialInfo *dtsi = ((struct Gadget *)o)->SpecialInfo;
58 struct IClass *cl = OCLASS(o);
59 struct Library *DTClassBase = (struct Library *)cl->cl_UserData;
61 while(dtsi->si_Flags & (DTSIF_PRINTING | DTSIF_LAYOUTPROC))
63 Delay(50);
66 DisposeObject(o);
68 CloseLibrary(DTClassBase);
71 AROS_LIBFUNC_EXIT
72 } /* DisposeDTObject */