revert commit 56204.
[AROS.git] / workbench / libs / muimaster / mui_getclass.c
blob4ab5b3b580f3eaf007081729d8c7b04ce044e1fd
1 /*
2 Copyright © 2002-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <stdio.h>
8 #include <proto/exec.h>
9 #include <proto/intuition.h>
10 #include <proto/muimaster.h>
12 #include "muimaster_intern.h"
13 #include "mui.h"
14 #include "support.h"
15 #include "support_classes.h"
17 /*#define MYDEBUG 1*/
18 #include "debug.h"
20 /*****************************************************************************
22 NAME */
23 AROS_LH1(struct IClass *, MUI_GetClass,
25 /* SYNOPSIS */
26 AROS_LHA(ClassID, classid, A0),
28 /* LOCATION */
29 struct Library *, MUIMasterBase, 13, MUIMaster)
31 /* FUNCTION
32 Get a pointer to a MUI Class.
34 The main use for this function is to retrieve the pointer to a MUI class
35 for use by intuition.library/MakeClass() as superclass pointer. However,
36 this function is obsolete since MUI V8, so DO NOT USE IT, use
37 MUI_CreateCustomClass() instead.
39 INPUTS
40 classid - the ID of the class whose pointer is to be retrieved.
42 RESULT
43 The class pointer is returned. DO NOT use it for any other reason that
44 as an argument of intuition.library/MakeClass(). DO NOT assume anything
45 about its content.
47 NOTES
48 Once the pointer is not needed anymore, do not forget to call MUI_FreeClass().
50 This function is OBSOLETE, don't use it, use MUI_CreateCustomClass instead.
52 EXAMPLE
54 BUGS
56 SEE ALSO
57 MUI_FreeClass(), MUI_CreateCustomClass(), MUI_DeleteCustomClass()
60 INTERNALS
62 *****************************************************************************/
64 AROS_LIBFUNC_INIT
66 Class *cl;
68 if (!classid)
69 return NULL;
71 cl = ZUNE_GetBuiltinClass(classid, MUIMasterBase);
73 if (!cl)
74 cl = ZUNE_GetExternalClass(classid, MUIMasterBase);
76 return cl;
78 AROS_LIBFUNC_EXIT
80 } /* MUIA_GetClass */