Support rastport clipping rectangle for layerless rastports
[tangerine.git] / rom / boopsi / addclass.c
blob3bee343562a877270fd8959554f146cf61435c47
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Makes a class publically available.
6 Lang: english
7 */
8 #include <proto/exec.h>
9 #include "intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <intuition/classes.h>
15 #include <proto/boopsi.h>
17 AROS_LH1(void, AddClass,
19 /* SYNOPSIS */
20 AROS_LHA(struct IClass *, classPtr, A0),
22 /* LOCATION */
23 struct Library *, BOOPSIBase, 5, BOOPSI)
25 /* FUNCTION
26 Makes a class publically usable. This function must not be called
27 before MakeClass().
29 INPUTS
30 class - The result of MakeClass()
32 RESULT
33 None.
35 NOTES
36 Do not use this function for private classes.
38 EXAMPLE
40 BUGS
41 There is no protection against creating multiple classes with
42 the same name yet. The operation of the system is undefined
43 in this case.
45 SEE ALSO
46 MakeClass(), FreeClass(), RemoveClass(), "Basic Object-Oriented
47 Programming System for Intuition" and "boopsi Class Reference"
49 INTERNALS
51 HISTORY
52 29-10-95 digulla automatically created from
53 intuition_lib.fd and clib/intuition_protos.h
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
58 AROS_LIBBASE_EXT_DECL(struct Library *,BOOPSIBase)
60 ObtainSemaphore (&GetBBase(BOOPSIBase)->bb_ClassListLock);
61 AddTail ( (struct List *)&GetBBase(BOOPSIBase)->bb_ClassList,
62 (struct Node *)classPtr );
63 classPtr->cl_Flags |= CLF_INLIST;
64 ReleaseSemaphore (&GetBBase(BOOPSIBase)->bb_ClassListLock);
66 AROS_LIBFUNC_EXIT
67 } /* AddClass */