Make sure headers don't conflict with MacOSX headers

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15201 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 2002-12-03 03:24:42 +00:00
parent 0e3366a789
commit 3a36b280a9
7 changed files with 29 additions and 20 deletions

View file

@ -27,7 +27,7 @@
#define _GNUstep_H_GMAppKit #define _GNUstep_H_GMAppKit
#include <AppKit/AppKit.h> #include <AppKit/AppKit.h>
#import <AppKit/GMArchiver.h> #import <gnustep/gui/GMArchiver.h>
@interface NSApplication (GMArchiverMethods) <ModelCoding> @interface NSApplication (GMArchiverMethods) <ModelCoding>
@end @end

View file

@ -25,7 +25,7 @@
#import <Foundation/NSArray.h> #import <Foundation/NSArray.h>
#import <Foundation/NSException.h> #import <Foundation/NSException.h>
#include "AppKit/GMAppKit.h" #include "gnustep/gui/GMAppKit.h"
#ifndef AUTORELEASE #ifndef AUTORELEASE
#define AUTORELEASE(object) [object autorelease] #define AUTORELEASE(object) [object autorelease]
@ -965,12 +965,15 @@ void __dummy_GMAppKit_functionForLinking() {}
[archiver encodeInt: [self autoresizingMask] [archiver encodeInt: [self autoresizingMask]
withName: @"autoresizingMask"]; withName: @"autoresizingMask"];
/* OUCH! This code crashes the translator; probably we interfere somehow with #if 0 //def __APPLE__
the way NSPopUpButton is handled by the NeXT's NIB code. Sorry, the {
popup buttons cannot be handled by the convertor! */ int i;
#ifdef __APPLE__ NSMutableArray *array;
NSLog(@"Cannot encode NSPopUpButton - please fix me"); array = [NSMutableArray arrayWithCapacity: [self numberOfItems]];
[archiver encodeArray: [NSArray array] withName: @"itemArray"]; for (i = 0; i < [self numberOfItems]; i++)
[array addObject: [self itemAtIndex: i]];
[archiver encodeArray: array withName: @"itemArray"];
}
#else #else
[archiver encodeArray:[self itemArray] withName:@"itemArray"]; [archiver encodeArray:[self itemArray] withName:@"itemArray"];
#endif #endif

View file

@ -43,7 +43,7 @@
#define RETAIN(object) [object retain] #define RETAIN(object) [object retain]
#endif #endif
#include <AppKit/GMArchiver.h> #include <gnustep/gui/GMArchiver.h>
@interface GMClassInfo : NSObject @interface GMClassInfo : NSObject
{ {

View file

@ -45,8 +45,8 @@ endif
libgmodel_OBJC_FILES = IMCustomObject.m IMConnectors.m IMLoading.m GMAppKit.m \ libgmodel_OBJC_FILES = IMCustomObject.m IMConnectors.m IMLoading.m GMAppKit.m \
GMArchiver.m GMArchiver.m
libgmodel_HEADER_FILES_DIR = ../Headers/AppKit libgmodel_HEADER_FILES_DIR = ../Headers/gnustep/gui
libgmodel_HEADER_FILES_INSTALL_DIR = /gnustep/AppKit libgmodel_HEADER_FILES_INSTALL_DIR = /gnustep/gui
libgmodel_HEADER_FILES = IMConnectors.h IMCustomObject.h IMLoading.h \ libgmodel_HEADER_FILES = IMConnectors.h IMCustomObject.h IMLoading.h \
GMAppKit.h GMArchiver.h GMAppKit.h GMArchiver.h

View file

@ -28,7 +28,7 @@
#import <Foundation/NSCoder.h> #import <Foundation/NSCoder.h>
#import <Foundation/NSString.h> #import <Foundation/NSString.h>
#import <Foundation/NSArray.h> #import <Foundation/NSArray.h>
#import <AppKit/GMArchiver.h> #import <gnustep/gui/GMArchiver.h>
#ifdef __APPLE__ #ifdef __APPLE__
#import <AppKit/NSNibConnector.h> #import <AppKit/NSNibConnector.h>
@ -39,7 +39,7 @@
#import "IBClasses.h" #import "IBClasses.h"
#import "Translator.h" #import "Translator.h"
#import "IMConnectors.h" #import "IMConnectors.h"
#import "AppKit/IMCustomObject.h" #import "gnustep/gui/IMCustomObject.h"
//#define DEBUG //#define DEBUG

View file

@ -25,11 +25,13 @@
#include <string.h> #include <string.h>
#ifndef NeXT_Foundation_LIBRARY
#include <gnustep/base/GSObjCRuntime.h> #include <gnustep/base/GSObjCRuntime.h>
#endif
#include <Foundation/NSObjCRuntime.h> #include <Foundation/NSObjCRuntime.h>
#include <AppKit/NSActionCell.h> #include <AppKit/NSActionCell.h>
#include <AppKit/GMArchiver.h> #include <gnustep/gui/GMArchiver.h>
#include "AppKit/IMCustomObject.h" #include "gnustep/gui/IMCustomObject.h"
#include "IMConnectors.h" #include "IMConnectors.h"
@implementation IMConnector @implementation IMConnector
@ -69,6 +71,7 @@
// NSLog (@"%@: setting target to %@", _source, _destination); // NSLog (@"%@: setting target to %@", _source, _destination);
[_source setTarget:_destination]; [_source setTarget:_destination];
} }
#ifndef NeXT_Foundation_LIBRARY
else else
{ {
const char *type; const char *type;
@ -78,14 +81,13 @@
/* /*
* Use the GNUstep additional function to set the instance * Use the GNUstep additional function to set the instance
* variable directly. * variable directly.
* FIXME - need some way to do this for libFoundation and
* Foundation based systems.
*/ */
if (GSObjCFindVariable(_source, "target", &type, &size, &offset)) if (GSObjCFindVariable(_source, "target", &type, &size, &offset))
{ {
GSObjCSetVariable(_source, offset, size, (void*)&_destination); GSObjCSetVariable(_source, offset, size, (void*)&_destination);
} }
} }
#endif
if ([_source respondsToSelector:@selector(setAction:)]) if ([_source respondsToSelector:@selector(setAction:)])
{ {
@ -93,6 +95,7 @@
// _source, NSStringFromSelector(action)); // _source, NSStringFromSelector(action));
[_source setAction:action]; [_source setAction:action];
} }
#ifndef NeXT_Foundation_LIBRARY
else else
{ {
const char *type; const char *type;
@ -110,6 +113,7 @@
GSObjCSetVariable(_source, offset, size, (void*)&action); GSObjCSetVariable(_source, offset, size, (void*)&action);
} }
} }
#endif
} }
@end /* IMControlConnector:IMConnector */ @end /* IMControlConnector:IMConnector */
@ -148,6 +152,7 @@
{ {
[_source performSelector:setSelector withObject:_destination]; [_source performSelector:setSelector withObject:_destination];
} }
#ifndef NeXT_Foundation_LIBRARY
else else
{ {
const char *nam = [label cString]; const char *nam = [label cString];
@ -166,6 +171,7 @@
GSObjCSetVariable(_source, offset, size, (void*)&_destination); GSObjCSetVariable(_source, offset, size, (void*)&_destination);
} }
} }
#endif
} }
@end /* IMOutletConnector */ @end /* IMOutletConnector */

View file

@ -28,9 +28,9 @@
#import <Foundation/NSFileManager.h> #import <Foundation/NSFileManager.h>
#import <Foundation/NSPathUtilities.h> #import <Foundation/NSPathUtilities.h>
#include <AppKit/GMArchiver.h> #include "gnustep/gui/GMArchiver.h"
#include "AppKit/IMLoading.h" #include "gnustep/gui/IMLoading.h"
#include "AppKit/IMCustomObject.h" #include "gnustep/gui/IMCustomObject.h"
/* For awakeFromNib */ /* For awakeFromNib */
#include <AppKit/NSNibLoading.h> #include <AppKit/NSNibLoading.h>