grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / datatypes / removedtobject.c
blobff81275d3b6e78cc656a51c43277e876fc81e25a
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #define USE_BOOPSI_STUBS
10 #include <proto/alib.h>
11 #include <intuition/intuition.h>
12 #include <intuition/classusr.h>
13 #include <datatypes/datatypesclass.h>
14 #include <clib/boopsistubs.h>
15 #include <proto/dos.h>
16 #include <proto/intuition.h>
17 #include "datatypes_intern.h"
20 /*****************************************************************************
22 NAME */
23 #include <proto/datatypes.h>
25 AROS_LH2(LONG, RemoveDTObject,
27 /* SYNOPSIS */
28 AROS_LHA(struct Window *, window, A0),
29 AROS_LHA(Object *, object, A1),
31 /* LOCATION */
32 struct Library *, DataTypesBase, 16, DataTypes)
34 /* FUNCTION
36 Remove an object from the specified window's object list; this will wait
37 until the AsyncLayout process is ready. The object will receive a message
38 of type DTM_REMOVEDTOBJECT as a sign of it having been removed.
40 INPUTS
42 window -- pointer to the window in question
43 object -- pointer to the object to remove
45 RESULT
47 The position of the object in the list before it was removed; if the
48 object wasn't found -1 is returned.
50 NOTES
52 EXAMPLE
54 BUGS
56 SEE ALSO
58 AddDTObject(), intuition.library/RemoveGList()
60 INTERNALS
62 HISTORY
64 *****************************************************************************/
66 AROS_LIBFUNC_INIT
68 LONG retval = 0;
70 if(object != NULL)
72 struct DTSpecialInfo *dtsi = ((struct Gadget *)object)->SpecialInfo;
74 while(dtsi->si_Flags & DTSIF_LAYOUTPROC)
76 Delay(50);
79 retval = RemoveGList(window, (struct Gadget *)object, 1);
81 DoMethod(object, DTM_REMOVEDTOBJECT, 0);
84 return retval;
86 AROS_LIBFUNC_EXIT
87 } /* RemoveDTObject */