2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 #include <proto/intuition.h>
7 #include <intuition/classusr.h>
8 #include "datatypes_intern.h"
10 AROS_UFP3(IPTR
, Dispatcher
,
11 AROS_UFHA(Class
*, class, A0
),
12 AROS_UFHA(Object
*, object
, A2
),
13 AROS_UFHA(Msg
, msg
, A1
));
15 BOOL
InstallClass(struct Library
*DataTypesBase
)
19 if((GPB(DataTypesBase
)->dtb_DataTypesClass
= MakeClass(DATATYPESCLASS
,
21 sizeof(struct DTObject
),
24 GPB(DataTypesBase
)->dtb_DataTypesClass
->cl_Dispatcher
.h_Entry
= (HOOKFUNC
)AROS_ASMSYMNAME(Dispatcher
);
25 GPB(DataTypesBase
)->dtb_DataTypesClass
->cl_UserData
= (IPTR
)DataTypesBase
;
27 AddClass(GPB(DataTypesBase
)->dtb_DataTypesClass
);
33 TryRemoveClass(DataTypesBase
);
39 BOOL
TryRemoveClass(struct Library
*DataTypesBase
)
41 if(GPB(DataTypesBase
)->dtb_DataTypesClass
!= NULL
)
43 if(FreeClass(GPB(DataTypesBase
)->dtb_DataTypesClass
))
44 GPB(DataTypesBase
)->dtb_DataTypesClass
= NULL
;
47 return GPB(DataTypesBase
)->dtb_DataTypesClass
== NULL
;