2002-10-09 09:54:43 +00:00
|
|
|
/** Interface to ObjC runtime for GNUStep
|
2000-10-31 11:05:23 +00:00
|
|
|
Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
|
1995-07-01 19:01:11 +00:00
|
|
|
|
1996-04-17 20:17:45 +00:00
|
|
|
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
|
1995-07-01 19:01:11 +00:00
|
|
|
Date: 1995
|
1995-03-23 03:51:32 +00:00
|
|
|
|
1996-05-12 00:56:10 +00:00
|
|
|
This file is part of the GNUstep Base Library.
|
1995-03-23 03:51:32 +00:00
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-09-14 11:36:11 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
1995-03-23 03:51:32 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-08 10:38:33 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
1995-03-23 03:51:32 +00:00
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
2007-09-14 11:36:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
1995-03-23 03:51:32 +00:00
|
|
|
License along with this library; if not, write to the Free
|
2006-10-31 07:05:46 +00:00
|
|
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02111 USA.
|
2002-10-09 09:54:43 +00:00
|
|
|
|
|
|
|
AutogsdocSource: NSObjCRuntime.m
|
|
|
|
AutogsdocSource: NSLog.m
|
|
|
|
|
1995-03-23 03:51:32 +00:00
|
|
|
*/
|
|
|
|
|
1996-04-17 19:36:35 +00:00
|
|
|
#ifndef __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
#define __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE
|
2010-02-20 18:32:07 +00:00
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <limits.h>
|
|
|
|
|
2006-10-31 07:05:46 +00:00
|
|
|
#import <GNUstepBase/GSVersionMacros.h>
|
2008-02-26 08:54:58 +00:00
|
|
|
#import <GNUstepBase/GSConfig.h>
|
2008-11-13 10:09:50 +00:00
|
|
|
|
|
|
|
/* These typedefs must be in place before GSObjCRuntime.h is imported.
|
|
|
|
*/
|
2009-02-23 20:42:32 +00:00
|
|
|
|
2010-01-21 22:41:52 +00:00
|
|
|
#if !defined(NSINTEGER_DEFINED)
|
2009-02-22 20:01:53 +00:00
|
|
|
typedef intptr_t NSInteger;
|
|
|
|
typedef uintptr_t NSUInteger;
|
2010-01-21 22:41:52 +00:00
|
|
|
#endif /* !defined(NSINTEGER_DEFINED) */
|
2010-02-15 17:51:07 +00:00
|
|
|
|
2010-01-21 22:41:52 +00:00
|
|
|
#if !defined(CGFLOAT_DEFINED)
|
2009-02-23 20:42:32 +00:00
|
|
|
#if GS_SIZEOF_VOIDP == 8
|
|
|
|
#define CGFLOAT_IS_DBL 1
|
|
|
|
typedef double CGFloat;
|
2009-02-22 20:01:53 +00:00
|
|
|
#else
|
2009-02-23 20:42:32 +00:00
|
|
|
typedef float CGFloat;
|
2009-02-22 20:01:53 +00:00
|
|
|
#endif
|
2010-01-21 22:41:52 +00:00
|
|
|
#endif /* !defined(CGFLOAT_DEFINED) */
|
2008-11-13 10:09:50 +00:00
|
|
|
|
2009-02-16 23:04:30 +00:00
|
|
|
#define NSINTEGER_DEFINED 1
|
2010-01-21 22:41:52 +00:00
|
|
|
#define CGFLOAT_DEFINED 1
|
2009-02-16 23:04:30 +00:00
|
|
|
|
2006-09-13 10:20:49 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-12-27 16:49:52 +00:00
|
|
|
enum
|
|
|
|
{
|
2010-02-18 08:45:00 +00:00
|
|
|
/**
|
|
|
|
* Specifies that the enumeration is concurrency-safe. Note that this does
|
|
|
|
* not mean that it will be carried out in a concurrent manner, only that
|
|
|
|
* it can be.
|
|
|
|
*/
|
|
|
|
NSEnumerationConcurrent = (1UL << 0),
|
|
|
|
/**
|
|
|
|
* Specifies that the enumeration should happen in the opposite of the
|
|
|
|
* natural order of the collection.
|
|
|
|
*/
|
|
|
|
NSEnumerationReverse = (1UL << 1)
|
2009-12-27 16:49:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/** Bitfield used to specify options to control enumeration over collections.
|
|
|
|
*/
|
|
|
|
typedef NSUInteger NSEnumerationOptions;
|
|
|
|
|
2010-03-10 14:53:51 +00:00
|
|
|
#import <GNUstepBase/GSObjCRuntime.h>
|
2010-03-05 09:30:18 +00:00
|
|
|
|
2008-06-06 13:57:06 +00:00
|
|
|
#if OS_API_VERSION(100500,GS_API_LATEST)
|
|
|
|
GS_EXPORT NSString *NSStringFromProtocol(Protocol *aProtocol);
|
|
|
|
GS_EXPORT Protocol *NSProtocolFromString(NSString *aProtocolName);
|
|
|
|
#endif
|
|
|
|
GS_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
|
2000-10-31 11:05:23 +00:00
|
|
|
GS_EXPORT NSString *NSStringFromSelector(SEL aSelector);
|
|
|
|
GS_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
|
|
|
|
GS_EXPORT Class NSClassFromString(NSString *aClassName);
|
|
|
|
GS_EXPORT NSString *NSStringFromClass(Class aClass);
|
|
|
|
GS_EXPORT const char *NSGetSizeAndAlignment(const char *typePtr,
|
2010-03-01 05:43:08 +00:00
|
|
|
NSUInteger *sizep, NSUInteger *alignp);
|
1995-03-23 03:51:32 +00:00
|
|
|
|
2006-10-31 07:05:46 +00:00
|
|
|
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
1997-01-06 22:05:50 +00:00
|
|
|
/* Logging */
|
2004-06-22 22:27:39 +00:00
|
|
|
/**
|
|
|
|
* OpenStep spec states that log messages go to stderr, but just in case
|
|
|
|
* someone wants them to go somewhere else, they can implement a function
|
2005-12-05 07:03:21 +00:00
|
|
|
* like this and assign a pointer to it to _NSLog_printf_handler.
|
2004-06-22 22:27:39 +00:00
|
|
|
*/
|
1997-01-06 22:05:50 +00:00
|
|
|
typedef void NSLog_printf_handler (NSString* message);
|
2000-10-31 11:05:23 +00:00
|
|
|
GS_EXPORT NSLog_printf_handler *_NSLog_printf_handler;
|
2002-10-09 09:54:43 +00:00
|
|
|
GS_EXPORT int _NSLogDescriptor;
|
|
|
|
@class NSRecursiveLock;
|
2002-11-09 06:45:31 +00:00
|
|
|
GS_EXPORT NSRecursiveLock *GSLogLock(void);
|
2002-10-09 09:54:43 +00:00
|
|
|
#endif
|
1997-01-06 22:05:50 +00:00
|
|
|
|
2002-10-11 09:14:14 +00:00
|
|
|
GS_EXPORT void NSLog (NSString *format, ...);
|
|
|
|
GS_EXPORT void NSLogv (NSString *format, va_list args);
|
1997-01-06 22:05:50 +00:00
|
|
|
|
1995-03-23 03:51:32 +00:00
|
|
|
#ifndef YES
|
|
|
|
#define YES 1
|
2001-01-03 15:40:22 +00:00
|
|
|
#endif
|
1995-03-23 03:51:32 +00:00
|
|
|
#ifndef NO
|
|
|
|
#define NO 0
|
2001-01-03 15:40:22 +00:00
|
|
|
#endif
|
1995-03-23 03:51:32 +00:00
|
|
|
#ifndef nil
|
|
|
|
#define nil 0
|
2001-01-03 15:40:22 +00:00
|
|
|
#endif
|
1995-03-23 03:51:32 +00:00
|
|
|
|
2006-09-13 10:20:49 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
1996-04-17 19:36:35 +00:00
|
|
|
#endif /* __NSObjCRuntime_h_GNUSTEP_BASE_INCLUDE */
|