Safer handling of Booleans.
[AROS.git] / workbench / libs / muimaster / mui_deletecustomclass.c
blob71f4be75e76f426afc52ac392f31273b4084844f
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"
12 #include "support.h"
14 /*****************************************************************************
16 NAME */
17 AROS_LH1(BOOL, MUI_DeleteCustomClass,
19 /* SYNOPSIS */
20 AROS_LHA(struct MUI_CustomClass *, mcc, A0),
22 /* LOCATION */
23 struct Library *, MUIMasterBase, 19, MUIMaster)
25 /* FUNCTION
26 Delete private or public custom classes.
28 INPUTS
29 mcc - pointer from MUI_CreateCustomClass()
31 RESULT
32 TRUE : success
33 FALSE : some objects or sub classes were still in use.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
42 MUI_CreateCustomClass()
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 if (mcc)
52 Class *super = mcc->mcc_Super;
54 if (FreeClass(mcc->mcc_Class))
56 mui_free(mcc);
58 MUI_FreeClass(super);
60 return TRUE;
64 return FALSE;
66 AROS_LIBFUNC_EXIT
68 } /* MUIA_DeleteCustomClass */