mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 18:00:48 +00:00
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:
parent
98035d75ea
commit
fd10203c7f
11 changed files with 65 additions and 23 deletions
20
ChangeLog
20
ChangeLog
|
@ -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>
|
Fri Aug 22 11:40:45 1997 Ovidiu Predescu <ovidiu@net-community.com>
|
||||||
|
|
||||||
Fixed scrolling to work with the new scalation/rotation code.
|
Fixed scrolling to work with the new scalation/rotation code.
|
||||||
|
|
|
@ -50,5 +50,15 @@
|
||||||
|
|
||||||
extern BOOL initialize_gnustep_backend (void);
|
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 */
|
#endif /* _GNUstep_H_AppKitConfig */
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,10 @@
|
||||||
#include <Foundation/NSRunLoop.h>
|
#include <Foundation/NSRunLoop.h>
|
||||||
#include <Foundation/NSAutoreleasePool.h>
|
#include <Foundation/NSAutoreleasePool.h>
|
||||||
|
|
||||||
|
#ifdef NEXT_PDO
|
||||||
|
# include <Foundation/NSConnection.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <DPSClient/NSDPSContext.h>
|
#include <DPSClient/NSDPSContext.h>
|
||||||
#include <AppKit/NSApplication.h>
|
#include <AppKit/NSApplication.h>
|
||||||
#include <AppKit/NSPopUpButton.h>
|
#include <AppKit/NSPopUpButton.h>
|
||||||
|
@ -518,7 +522,7 @@ static id NSApp;
|
||||||
//
|
//
|
||||||
if ([aTarget respondsToSelector:aSelector])
|
if ([aTarget respondsToSelector:aSelector])
|
||||||
{
|
{
|
||||||
[aTarget perform:aSelector withObject:sender];
|
[aTarget performSelector:aSelector withObject:sender];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,8 @@
|
||||||
#include <AppKit/NSPasteboard.h>
|
#include <AppKit/NSPasteboard.h>
|
||||||
#include <AppKit/NSBitmapImageRep.h>
|
#include <AppKit/NSBitmapImageRep.h>
|
||||||
#include <AppKit/AppKitExceptions.h>
|
#include <AppKit/AppKitExceptions.h>
|
||||||
|
|
||||||
|
#include <gnustep/gui/config.h>
|
||||||
#include <gnustep/gui/nsimage-tiff.h>
|
#include <gnustep/gui/nsimage-tiff.h>
|
||||||
|
|
||||||
/* Maximum number of planes */
|
/* Maximum number of planes */
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
- (BOOL) draw
|
- (BOOL) draw
|
||||||
{
|
{
|
||||||
[delegate perform: selector];
|
[delegate performSelector: selector];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
#include <Foundation/NSValue.h>
|
#include <Foundation/NSValue.h>
|
||||||
#include <Foundation/NSDictionary.h>
|
#include <Foundation/NSDictionary.h>
|
||||||
#include <Foundation/NSBundle.h>
|
#include <Foundation/NSBundle.h>
|
||||||
|
#include <Foundation/NSString.h>
|
||||||
|
|
||||||
#include <AppKit/NSImage.h>
|
#include <AppKit/NSImage.h>
|
||||||
#include <AppKit/NSBitmapImageRep.h>
|
#include <AppKit/NSBitmapImageRep.h>
|
||||||
#include <AppKit/NSCachedImageRep.h>
|
#include <AppKit/NSCachedImageRep.h>
|
||||||
|
@ -971,7 +973,7 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
|
||||||
NSArray* pb_list;
|
NSArray* pb_list;
|
||||||
|
|
||||||
// Have the image rep perform the operation
|
// Have the image rep perform the operation
|
||||||
pb_list = [rep perform: method];
|
pb_list = [rep performSelector: method];
|
||||||
|
|
||||||
// Iterate through the returned array
|
// Iterate through the returned array
|
||||||
// and add elements to types list, duplicates weeded.
|
// and add elements to types list, duplicates weeded.
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <Foundation/NSValue.h>
|
#include <Foundation/NSValue.h>
|
||||||
#include <Foundation/NSArray.h>
|
#include <Foundation/NSArray.h>
|
||||||
#include <Foundation/NSAutoreleasePool.h>
|
#include <Foundation/NSAutoreleasePool.h>
|
||||||
|
#include <Foundation/NSString.h>
|
||||||
|
|
||||||
#include <AppKit/NSColor.h>
|
#include <AppKit/NSColor.h>
|
||||||
#include <AppKit/NSActionCell.h>
|
#include <AppKit/NSActionCell.h>
|
||||||
|
@ -1091,12 +1092,12 @@ static int mouseDownFlags = 0;
|
||||||
|
|
||||||
if (theAction) {
|
if (theAction) {
|
||||||
if (theTarget)
|
if (theTarget)
|
||||||
[selectedCell perform:theAction withObject:self];
|
[selectedCell performSelector:theAction withObject:self];
|
||||||
else
|
else
|
||||||
[target perform:theAction withObject:self];
|
[target performSelector:theAction withObject:self];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
[target perform:action withObject:self];
|
[target performSelector:action withObject:self];
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
@ -1112,7 +1113,7 @@ static int mouseDownFlags = 0;
|
||||||
NSMutableArray* row = [cells objectAtIndex:i];
|
NSMutableArray* row = [cells objectAtIndex:i];
|
||||||
|
|
||||||
for (j = 0; j < numCols; j++)
|
for (j = 0; j < numCols; j++)
|
||||||
if (![anObject perform:aSelector
|
if (![anObject performSelector:aSelector
|
||||||
withObject:[row objectAtIndex:j]])
|
withObject:[row objectAtIndex:j]])
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1124,7 +1125,7 @@ static int mouseDownFlags = 0;
|
||||||
|
|
||||||
for (j = 0; j < numCols; j++)
|
for (j = 0; j < numCols; j++)
|
||||||
if (row[i])
|
if (row[i])
|
||||||
if (![anObject perform:aSelector
|
if (![anObject performSelector:aSelector
|
||||||
withObject:[cellRow objectAtIndex:j]])
|
withObject:[cellRow objectAtIndex:j]])
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1137,7 +1138,7 @@ static int mouseDownFlags = 0;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (doubleAction)
|
if (doubleAction)
|
||||||
[target perform:doubleAction withObject:self];
|
[target performSelector:doubleAction withObject:self];
|
||||||
else
|
else
|
||||||
[self sendAction];
|
[self sendAction];
|
||||||
}
|
}
|
||||||
|
@ -1338,9 +1339,9 @@ static int mouseDownFlags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([selectedCell target])
|
if ([selectedCell target])
|
||||||
[[selectedCell target] perform:[selectedCell action] withObject:self];
|
[[selectedCell target] performSelector:[selectedCell action] withObject:self];
|
||||||
else if (target)
|
else if (target)
|
||||||
[target perform:action withObject:self];
|
[target performSelector:action withObject:self];
|
||||||
|
|
||||||
[[self window] flushWindow];
|
[[self window] flushWindow];
|
||||||
[self unlockFocus];
|
[self unlockFocus];
|
||||||
|
@ -1360,7 +1361,7 @@ static int mouseDownFlags = 0;
|
||||||
for (j = 0; j < numCols; j++) {
|
for (j = 0; j < numCols; j++) {
|
||||||
NSCell* aCell = [row objectAtIndex:j];
|
NSCell* aCell = [row objectAtIndex:j];
|
||||||
|
|
||||||
if ([aCell isEnabled] && [[aCell keyEquivalent] isEqual:key]) {
|
if ([aCell isEnabled] && [[aCell keyEquivalent] isEqualToString:key]) {
|
||||||
NSCell* oldSelectedCell = selectedCell;
|
NSCell* oldSelectedCell = selectedCell;
|
||||||
|
|
||||||
selectedCell = aCell;
|
selectedCell = aCell;
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <Foundation/NSCoder.h>
|
#include <Foundation/NSCoder.h>
|
||||||
#include <Foundation/NSArray.h>
|
#include <Foundation/NSArray.h>
|
||||||
#include <Foundation/NSProcessInfo.h>
|
#include <Foundation/NSProcessInfo.h>
|
||||||
|
#include <Foundation/NSString.h>
|
||||||
|
|
||||||
#include <AppKit/NSMatrix.h>
|
#include <AppKit/NSMatrix.h>
|
||||||
#include <AppKit/NSApplication.h>
|
#include <AppKit/NSApplication.h>
|
||||||
|
@ -588,7 +589,7 @@ static Class menuCellClass = nil;
|
||||||
|
|
||||||
/* Search the target */
|
/* Search the target */
|
||||||
if ((target = [cell target]) && [target respondsToSelector:action]) {
|
if ((target = [cell target]) && [target respondsToSelector:action]) {
|
||||||
[target perform:action withObject:cell];
|
[target performSelector:action withObject:cell];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,7 +598,7 @@ static Class menuCellClass = nil;
|
||||||
responder = [keyWindow firstResponder];
|
responder = [keyWindow firstResponder];
|
||||||
while (responder) {
|
while (responder) {
|
||||||
if ([responder respondsToSelector:action]) {
|
if ([responder respondsToSelector:action]) {
|
||||||
[responder perform:action withObject:cell];
|
[responder performSelector:action withObject:cell];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
responder = [responder nextResponder];
|
responder = [responder nextResponder];
|
||||||
|
@ -605,14 +606,14 @@ static Class menuCellClass = nil;
|
||||||
|
|
||||||
/* Search the key window */
|
/* Search the key window */
|
||||||
if ([keyWindow respondsToSelector:action]) {
|
if ([keyWindow respondsToSelector:action]) {
|
||||||
[keyWindow perform:action withObject:cell];
|
[keyWindow performSelector:action withObject:cell];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search the key window's delegate */
|
/* Search the key window's delegate */
|
||||||
delegate = [keyWindow delegate];
|
delegate = [keyWindow delegate];
|
||||||
if ([delegate respondsToSelector:action]) {
|
if ([delegate respondsToSelector:action]) {
|
||||||
[delegate perform:action withObject:cell];
|
[delegate performSelector:action withObject:cell];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -622,7 +623,7 @@ static Class menuCellClass = nil;
|
||||||
responder = [mainWindow firstResponder];
|
responder = [mainWindow firstResponder];
|
||||||
while (responder) {
|
while (responder) {
|
||||||
if ([responder respondsToSelector:action]) {
|
if ([responder respondsToSelector:action]) {
|
||||||
[responder perform:action withObject:cell];
|
[responder performSelector:action withObject:cell];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
responder = [responder nextResponder];
|
responder = [responder nextResponder];
|
||||||
|
@ -630,28 +631,28 @@ static Class menuCellClass = nil;
|
||||||
|
|
||||||
/* Search the main window */
|
/* Search the main window */
|
||||||
if ([mainWindow respondsToSelector:action]) {
|
if ([mainWindow respondsToSelector:action]) {
|
||||||
[mainWindow perform:action withObject:cell];
|
[mainWindow performSelector:action withObject:cell];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search the main window's delegate */
|
/* Search the main window's delegate */
|
||||||
delegate = [mainWindow delegate];
|
delegate = [mainWindow delegate];
|
||||||
if ([delegate respondsToSelector:action]) {
|
if ([delegate respondsToSelector:action]) {
|
||||||
[delegate perform:action withObject:cell];
|
[delegate performSelector:action withObject:cell];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search the NSApplication object */
|
/* Search the NSApplication object */
|
||||||
if ([theApp respondsToSelector:action]) {
|
if ([theApp respondsToSelector:action]) {
|
||||||
[theApp perform:action withObject:cell];
|
[theApp performSelector:action withObject:cell];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search the NSApplication object's delegate */
|
/* Search the NSApplication object's delegate */
|
||||||
delegate = [theApp delegate];
|
delegate = [theApp delegate];
|
||||||
if ([delegate respondsToSelector:action]) {
|
if ([delegate respondsToSelector:action]) {
|
||||||
[delegate perform:action withObject:cell];
|
[delegate performSelector:action withObject:cell];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
// Can we perform the action -then do it
|
// Can we perform the action -then do it
|
||||||
if ([self respondsToSelector:anAction])
|
if ([self respondsToSelector:anAction])
|
||||||
{
|
{
|
||||||
[self perform:anAction withObject:anObject];
|
[self performSelector:anAction withObject:anObject];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -482,7 +482,7 @@ static NSButtonCell* knobCell = nil;
|
||||||
|
|
||||||
- (BOOL)sendAction:(SEL)action to:(id)target
|
- (BOOL)sendAction:(SEL)action to:(id)target
|
||||||
{
|
{
|
||||||
[target perform:action withObject:self];
|
[target performSelector:action withObject:self];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#include <Foundation/NSString.h>
|
||||||
|
|
||||||
#include <AppKit/config.h>
|
#include <AppKit/config.h>
|
||||||
#include <AppKit/PSMatrix.h>
|
#include <AppKit/PSMatrix.h>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue