grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / datatypes / adddtobject.c
blob23c20ad722ac52822cca91635a824bc78c2ec993
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #include <proto/intuition.h>
9 #include <intuition/intuition.h>
10 #include "datatypes_intern.h" /* Must be after <intuition/intuition.h> */
12 /*****************************************************************************
14 NAME */
15 #include <proto/datatypes.h>
17 AROS_LH4(LONG, AddDTObject,
19 /* SYNOPSIS */
20 AROS_LHA(struct Window *, win, A0),
21 AROS_LHA(struct Requester *, req, A1),
22 AROS_LHA(Object *, obj, A2),
23 AROS_LHA(LONG , pos, D0),
25 /* LOCATION */
26 struct Library *, DataTypesBase, 12, DataTypes)
28 /* FUNCTION
30 Add an object to the window 'win' or requester 'req' at the position
31 in the gadget list specified by the 'pos' argument.
33 INPUTS
35 win -- window the object should be added to; may be NULL in which case
36 nothing is done
37 req -- requester the object should be added to
38 obj -- the object to add; may be NULL in which case nothing is done
39 pos -- the position of the object in the list
42 RESULT
44 The position where the object was added (may be different from what
45 you asked for).
47 NOTES
49 The object will receice a GM_LAYOUT message with the gpl_Initial field
50 set to 1 when the object is added.
52 EXAMPLE
54 BUGS
56 SEE ALSO
58 RemoveDTObject(), intuition.library/AddGList()
60 INTERNALS
62 HISTORY
64 *****************************************************************************/
66 AROS_LIBFUNC_INIT
68 if(obj == NULL || win == NULL)
69 return -1;
71 return AddGList(win, (struct Gadget *)obj, pos, 1, req);
73 AROS_LIBFUNC_EXIT
74 } /* AddDTObject */