home *** CD-ROM | disk | FTP | other *** search
- #ifndef INTUITION_CLASSES_H
- #define INTUITION_CLASSES_H 1
- /*
- ** $Filename: intuition/classes.h $
- ** $Release: 2.04 Includes, V37.4 $
- ** $Revision: 36.2 $
- ** $Date: 91/11/08 $
- **
- ** Used only by class implementors
- **
- ** (C) Copyright 1989-1991 Commodore-Amiga, Inc.
- ** All Rights Reserved
- */
-
- #ifndef UTILITY_HOOKS_H
- #include <utility/hooks.h>
- #endif
-
- #ifndef INTUITION_CLASSUSR_H
- #include <intuition/classusr.h>
- #endif
-
-
-
-
-
-
- typedef struct IClass {
- struct Hook cl_Dispatcher;
- ULONG cl_Reserved;
- struct IClass *cl_Super;
- ClassID cl_ID;
-
-
- UWORD cl_InstOffset;
- UWORD cl_InstSize;
-
- ULONG cl_UserData;
- ULONG cl_SubclassCount;
-
- ULONG cl_ObjectCount;
-
- ULONG cl_Flags;
- #define CLF_INLIST 0x00000001
- } Class;
-
-
- #define INST_DATA( cl, o ) ((VOID *) (((UBYTE *)o)+cl->cl_InstOffset))
-
-
- #define SIZEOF_INSTANCE( cl ) ((cl)->cl_InstOffset + (cl)->cl_InstSize \
- + sizeof (struct _Object ))
-
-
-
-
-
-
- struct _Object {
- struct MinNode o_Node;
- struct IClass *o_Class;
- };
-
-
- #define _OBJ( o ) ((struct _Object *)(o))
-
-
- #define BASEOBJECT( _obj ) ( (Object *) (_OBJ(_obj)+1) )
-
-
- #define _OBJECT( o ) (_OBJ(o) - 1)
-
-
- #define OCLASS( o ) ( (_OBJECT(o))->o_Class )
-
- #endif
-