Fixes to allow the library compile under NeXT PDO.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2396 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Ovidiu Predescu 1997-08-27 21:20:19 +00:00
parent 77be56606f
commit 38a4416030
11 changed files with 65 additions and 23 deletions

View file

@ -1,3 +1,23 @@
Wed Aug 27 14:04:38 1997 Ovidiu Predescu <ovidiu@net-community.com>
* Headers/gnustep/gui/config.h.in (OBJC_MALLOC, OBJC_FREE): New defines
to make the GUI library compile with NeXT PDO.
* Source/NSApplication.m: Include Foundation/NSConnection.h for symbols
needed by NSRunLoop.
* Source/NSApplication.m: Changed perform:... with performSelector:.. .
* Source/NSCustomImageRep.m: Likewise.
* gui/Source/NSImage.m: Likewise.
* Source/NSMatrix.m: Likewise.
* Source/NSMenu.m: Likewise.
* Source/NSResponder.m: Likewise.
* Source/NSScroller.m: Likewise.
* Source/NSBitmapImageRep.m: Include config.h to get the OBJC_MALLOC
and OBJC_FREE definitions.
* Source/PSMatrix.m: Include Foundation/NSString.h.
* Source/NSMenu.m: Likewise.
* Source/NSMatrix.m: Likewise.
* gui/Source/NSImage.m: Likewise.
Fri Aug 22 11:40:45 1997 Ovidiu Predescu <ovidiu@net-community.com>
Fixed scrolling to work with the new scalation/rotation code.

View file

@ -50,5 +50,15 @@
extern BOOL initialize_gnustep_backend (void);
#ifndef OBJC_MALLOC
# define OBJC_MALLOC(pointer, type, elements) \
(pointer = calloc (sizeof(type), elements))
#endif
#ifndef OBJC_FREE
# define OBJC_FREE(pointer) \
if (pointer) free(pointer)
#endif
#endif /* _GNUstep_H_AppKitConfig */

View file

@ -33,6 +33,10 @@
#include <Foundation/NSRunLoop.h>
#include <Foundation/NSAutoreleasePool.h>
#ifdef NEXT_PDO
# include <Foundation/NSConnection.h>
#endif
#include <DPSClient/NSDPSContext.h>
#include <AppKit/NSApplication.h>
#include <AppKit/NSPopUpButton.h>
@ -518,7 +522,7 @@ static id NSApp;
//
if ([aTarget respondsToSelector:aSelector])
{
[aTarget perform:aSelector withObject:sender];
[aTarget performSelector:aSelector withObject:sender];
return YES;
}

View file

@ -37,6 +37,8 @@
#include <AppKit/NSPasteboard.h>
#include <AppKit/NSBitmapImageRep.h>
#include <AppKit/AppKitExceptions.h>
#include <gnustep/gui/config.h>
#include <gnustep/gui/nsimage-tiff.h>
/* Maximum number of planes */

View file

@ -60,7 +60,7 @@
- (BOOL) draw
{
[delegate perform: selector];
[delegate performSelector: selector];
return YES;
}

View file

@ -38,6 +38,8 @@
#include <Foundation/NSValue.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSBundle.h>
#include <Foundation/NSString.h>
#include <AppKit/NSImage.h>
#include <AppKit/NSBitmapImageRep.h>
#include <AppKit/NSCachedImageRep.h>
@ -971,7 +973,7 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
NSArray* pb_list;
// Have the image rep perform the operation
pb_list = [rep perform: method];
pb_list = [rep performSelector: method];
// Iterate through the returned array
// and add elements to types list, duplicates weeded.

View file

@ -33,6 +33,7 @@
#include <Foundation/NSValue.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSAutoreleasePool.h>
#include <Foundation/NSString.h>
#include <AppKit/NSColor.h>
#include <AppKit/NSActionCell.h>
@ -1091,12 +1092,12 @@ static int mouseDownFlags = 0;
if (theAction) {
if (theTarget)
[selectedCell perform:theAction withObject:self];
[selectedCell performSelector:theAction withObject:self];
else
[target perform:theAction withObject:self];
[target performSelector:theAction withObject:self];
}
else
[target perform:action withObject:self];
[target performSelector:action withObject:self];
return YES;
}
@ -1112,7 +1113,7 @@ static int mouseDownFlags = 0;
NSMutableArray* row = [cells objectAtIndex:i];
for (j = 0; j < numCols; j++)
if (![anObject perform:aSelector
if (![anObject performSelector:aSelector
withObject:[row objectAtIndex:j]])
return;
}
@ -1124,7 +1125,7 @@ static int mouseDownFlags = 0;
for (j = 0; j < numCols; j++)
if (row[i])
if (![anObject perform:aSelector
if (![anObject performSelector:aSelector
withObject:[cellRow objectAtIndex:j]])
return;
}
@ -1137,7 +1138,7 @@ static int mouseDownFlags = 0;
return;
if (doubleAction)
[target perform:doubleAction withObject:self];
[target performSelector:doubleAction withObject:self];
else
[self sendAction];
}
@ -1338,9 +1339,9 @@ static int mouseDownFlags = 0;
}
if ([selectedCell target])
[[selectedCell target] perform:[selectedCell action] withObject:self];
[[selectedCell target] performSelector:[selectedCell action] withObject:self];
else if (target)
[target perform:action withObject:self];
[target performSelector:action withObject:self];
[[self window] flushWindow];
[self unlockFocus];
@ -1360,7 +1361,7 @@ static int mouseDownFlags = 0;
for (j = 0; j < numCols; j++) {
NSCell* aCell = [row objectAtIndex:j];
if ([aCell isEnabled] && [[aCell keyEquivalent] isEqual:key]) {
if ([aCell isEnabled] && [[aCell keyEquivalent] isEqualToString:key]) {
NSCell* oldSelectedCell = selectedCell;
selectedCell = aCell;

View file

@ -28,6 +28,7 @@
#include <Foundation/NSCoder.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSProcessInfo.h>
#include <Foundation/NSString.h>
#include <AppKit/NSMatrix.h>
#include <AppKit/NSApplication.h>
@ -588,7 +589,7 @@ static Class menuCellClass = nil;
/* Search the target */
if ((target = [cell target]) && [target respondsToSelector:action]) {
[target perform:action withObject:cell];
[target performSelector:action withObject:cell];
return;
}
@ -597,7 +598,7 @@ static Class menuCellClass = nil;
responder = [keyWindow firstResponder];
while (responder) {
if ([responder respondsToSelector:action]) {
[responder perform:action withObject:cell];
[responder performSelector:action withObject:cell];
return;
}
responder = [responder nextResponder];
@ -605,14 +606,14 @@ static Class menuCellClass = nil;
/* Search the key window */
if ([keyWindow respondsToSelector:action]) {
[keyWindow perform:action withObject:cell];
[keyWindow performSelector:action withObject:cell];
return;
}
/* Search the key window's delegate */
delegate = [keyWindow delegate];
if ([delegate respondsToSelector:action]) {
[delegate perform:action withObject:cell];
[delegate performSelector:action withObject:cell];
return;
}
@ -622,7 +623,7 @@ static Class menuCellClass = nil;
responder = [mainWindow firstResponder];
while (responder) {
if ([responder respondsToSelector:action]) {
[responder perform:action withObject:cell];
[responder performSelector:action withObject:cell];
return;
}
responder = [responder nextResponder];
@ -630,28 +631,28 @@ static Class menuCellClass = nil;
/* Search the main window */
if ([mainWindow respondsToSelector:action]) {
[mainWindow perform:action withObject:cell];
[mainWindow performSelector:action withObject:cell];
return;
}
/* Search the main window's delegate */
delegate = [mainWindow delegate];
if ([delegate respondsToSelector:action]) {
[delegate perform:action withObject:cell];
[delegate performSelector:action withObject:cell];
return;
}
}
/* Search the NSApplication object */
if ([theApp respondsToSelector:action]) {
[theApp perform:action withObject:cell];
[theApp performSelector:action withObject:cell];
return;
}
/* Search the NSApplication object's delegate */
delegate = [theApp delegate];
if ([delegate respondsToSelector:action]) {
[delegate perform:action withObject:cell];
[delegate performSelector:action withObject:cell];
return;
}
}

View file

@ -93,7 +93,7 @@
// Can we perform the action -then do it
if ([self respondsToSelector:anAction])
{
[self perform:anAction withObject:anObject];
[self performSelector:anAction withObject:anObject];
return YES;
}
else

View file

@ -482,7 +482,7 @@ static NSButtonCell* knobCell = nil;
- (BOOL)sendAction:(SEL)action to:(id)target
{
[target perform:action withObject:self];
[target performSelector:action withObject:self];
return YES;
}

View file

@ -25,6 +25,8 @@
#include <math.h>
#include <Foundation/NSString.h>
#include <AppKit/config.h>
#include <AppKit/PSMatrix.h>