home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Headers / objc / objc.h < prev    next >
Text File  |  1996-12-19  |  1KB  |  57 lines

  1. /*
  2.  *    objc.h
  3.  *    Copyright 1988-1996, NeXT Software, Inc.
  4.  */
  5.  
  6. #ifndef _OBJC_OBJC_H_
  7. #define _OBJC_OBJC_H_
  8.  
  9. #import <objc/objc-api.h>        // for OBJC_EXPORT
  10.  
  11. typedef struct objc_class *Class;
  12.  
  13. typedef struct objc_object {
  14.     Class isa;
  15. } *id;
  16.  
  17. typedef struct objc_selector     *SEL;    
  18. typedef id             (*IMP)(id, SEL, ...); 
  19. typedef char            BOOL;
  20.  
  21. #define YES             (BOOL)1
  22. #define NO              (BOOL)0
  23.  
  24. #define Nil (Class)0           /* id of Nil class */
  25. #define nil (id)0              /* id of Nil instance */
  26.  
  27. #if !defined(STRICT_OPENSTEP)
  28.  
  29. typedef char *STR;
  30.  
  31. OBJC_EXPORT BOOL sel_isMapped(SEL sel);
  32. OBJC_EXPORT const char *sel_getName(SEL sel);
  33. OBJC_EXPORT SEL sel_getUid(const char *str);
  34. OBJC_EXPORT SEL sel_registerName(const char *str);
  35. OBJC_EXPORT const char *object_getClassName(id obj);
  36. OBJC_EXPORT void *object_getIndexedIvars(id obj);
  37.  
  38. #define ISSELECTOR(sel) sel_isMapped(sel)
  39. #define SELNAME(sel)    sel_getName(sel)
  40. #define SELUID(str)    sel_getUid(str)
  41. #define NAMEOF(obj)     object_getClassName(obj)
  42. #define IV(obj)         object_getIndexedIvars(obj)
  43.  
  44. #if defined(__osf__) && defined(__alpha__)
  45.     typedef long arith_t;
  46.     typedef unsigned long uarith_t;
  47.     #define ARITH_SHIFT 32
  48. #else
  49.     typedef int arith_t;
  50.     typedef unsigned uarith_t;
  51.     #define ARITH_SHIFT 16
  52. #endif
  53.  
  54. #endif    /* !STRICT_OPENSTEP */
  55.  
  56. #endif /* _OBJC_OBJC_H_ */
  57.