Listtree.mcc: implement proxying of DisplayHook
[AROS.git] / workbench / libs / muimaster / mui_newobject.c
blob148b3744f790f0a3815e73cf59acecf8402eb4a0
1 /*
2 Copyright © 2002-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
7 #include <proto/intuition.h>
8 #include <proto/muimaster.h>
10 #include "mui.h"
11 #include "muimaster_intern.h"
13 /* #define MYDEBUG 1 */
14 #include "debug.h"
16 /*****************************************************************************
18 NAME */
19 AROS_LH2(Object *, MUI_NewObjectA,
21 /* SYNOPSIS */
22 AROS_LHA(ClassID, classid, A0),
23 AROS_LHA(struct TagItem *, tags, A1),
25 /* LOCATION */
26 struct Library *, MUIMasterBase, 5, MUIMaster)
28 /* FUNCTION
29 Create object from MUI class.
31 INPUTS
32 classid - case sensitive name/ID string of a MUI class.
33 taglist - attribute/value pairs for the new object.
35 RESULT
36 Pointer to object. NULL means failure.
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
45 MUI_DisposeObject(), intuition.library/SetAttrsA()
46 intuition.library/GetAttr()
48 INTERNALS
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 Class *cl;
56 cl = MUI_GetClass(classid);
57 if (cl)
59 Object *obj = NewObjectA(cl, NULL, tags);
61 if (obj) return obj;
63 bug("*** Could not create object of %s\n", classid);
64 MUI_FreeClass(cl);
67 bug("*** Couldn't find %s\n", classid);
69 return NULL;
71 AROS_LIBFUNC_EXIT
72 } /* MUIA_NewObjectA */