diff --git a/ChangeLog b/ChangeLog index bbe549ed2..eb3cec681 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +Wed Aug 27 14:04:38 1997 Ovidiu Predescu + + * 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 Fixed scrolling to work with the new scalation/rotation code. diff --git a/Headers/gnustep/gui/config.h.in b/Headers/gnustep/gui/config.h.in index aae1b53bf..a9cfeeff4 100644 --- a/Headers/gnustep/gui/config.h.in +++ b/Headers/gnustep/gui/config.h.in @@ -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 */ diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 6662d7ae8..40cdda830 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -33,6 +33,10 @@ #include #include +#ifdef NEXT_PDO +# include +#endif + #include #include #include @@ -518,7 +522,7 @@ static id NSApp; // if ([aTarget respondsToSelector:aSelector]) { - [aTarget perform:aSelector withObject:sender]; + [aTarget performSelector:aSelector withObject:sender]; return YES; } diff --git a/Source/NSBitmapImageRep.m b/Source/NSBitmapImageRep.m index a43e56ab6..a2762ee97 100644 --- a/Source/NSBitmapImageRep.m +++ b/Source/NSBitmapImageRep.m @@ -37,6 +37,8 @@ #include #include #include + +#include #include /* Maximum number of planes */ diff --git a/Source/NSCustomImageRep.m b/Source/NSCustomImageRep.m index ccfa22fb7..d99cb19f0 100644 --- a/Source/NSCustomImageRep.m +++ b/Source/NSCustomImageRep.m @@ -60,7 +60,7 @@ - (BOOL) draw { - [delegate perform: selector]; + [delegate performSelector: selector]; return YES; } diff --git a/Source/NSImage.m b/Source/NSImage.m index 3ea5de6f8..386ecb160 100644 --- a/Source/NSImage.m +++ b/Source/NSImage.m @@ -38,6 +38,8 @@ #include #include #include +#include + #include #include #include @@ -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. diff --git a/Source/NSMatrix.m b/Source/NSMatrix.m index 9026932cc..709c3937c 100644 --- a/Source/NSMatrix.m +++ b/Source/NSMatrix.m @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/Source/NSMenu.m b/Source/NSMenu.m index 9c5ed94d2..295dea1ce 100644 --- a/Source/NSMenu.m +++ b/Source/NSMenu.m @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -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; } } diff --git a/Source/NSResponder.m b/Source/NSResponder.m index 9c669ac75..d194c437c 100644 --- a/Source/NSResponder.m +++ b/Source/NSResponder.m @@ -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 diff --git a/Source/NSScroller.m b/Source/NSScroller.m index 170f85b58..a860a859e 100644 --- a/Source/NSScroller.m +++ b/Source/NSScroller.m @@ -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; } diff --git a/Source/PSMatrix.m b/Source/PSMatrix.m index 2a7833f64..6aea350b3 100644 --- a/Source/PSMatrix.m +++ b/Source/PSMatrix.m @@ -25,6 +25,8 @@ #include +#include + #include #include