2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Create a new BOOPSI object
8 #include <exec/lists.h>
9 #include <intuition/classes.h>
10 #include <proto/exec.h>
11 #include <proto/alib.h>
12 #include <clib/intuition_protos.h>
20 #include <aros/debug.h>
22 /*****************************************************************************
25 #include <intuition/classusr.h>
26 #include <proto/boopsi.h>
28 AROS_LH3(APTR
, NewObjectA
,
31 AROS_LHA(struct IClass
*, classPtr
, A0
),
32 AROS_LHA(UBYTE
*, classID
, A1
),
33 AROS_LHA(struct TagItem
*, tagList
, A2
),
36 struct Library
*, BOOPSIBase
, 11, BOOPSI
)
39 Use this function to create BOOPSI objects (BOOPSI stands for
40 "Basic Object Oriented Programming System for Intuition).
42 You may specify a class either by it's name (if it's a public class)
43 or by a pointer to its definition (if it's a private class). If
44 classPtr is NULL, classID is used.
47 classPtr - Pointer to a private class (or a public class if you
48 happen to have a pointer to it)
49 classID - Name of a public class
50 tagList - Initial attributes. Read the documentation of the class
51 carefully to find out which attributes must be specified
55 A BOOPSI object which can be manipulated with general functions and
56 which must be disposed with DisposeObject() later.
59 This functions send OM_NEW to the dispatcher of the class.
66 DisposeObject(), SetAttrsA(), GetAttr(), MakeClass(),
67 "Basic Object-Oriented Programming System for Intuition" and
68 "boopsi Class Reference" Dokument.
73 29-10-95 digulla automatically created from
74 intuition_lib.fd and clib/intuition_protos.h
76 *****************************************************************************/
81 EnterFunc(bug("intuition::NewObjectA()\n"));
85 classPtr
= FindClass (classID
);
88 return (NULL
); /* Nothing found */
90 D(bug("classPtr: %p\n", classPtr
));
92 /* Try to create a new object */
93 if ((object
= (Object
*) CoerceMethod (classPtr
, (Object
*)classPtr
, OM_NEW
,
95 classPtr
->cl_ObjectCount
++;
97 ReturnPtr("intuition::NewObjectA()", Object
*, object
);