mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Added some fixes for Apple runtime
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7940 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4beeb68e65
commit
19e0fc3d15
8 changed files with 61 additions and 32 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,10 +1,23 @@
|
|||
2000-10-31 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSServicesManager.m: Use new GSObjCClassOfObject() function
|
||||
from NSObjCRuntime.h
|
||||
* Source/GSTextStorage.m: Avoid static variable initialisation with
|
||||
@selector() as it doesn't work with Apple runtime.
|
||||
* Source/NSAttributedString.m: ditto
|
||||
* Source/NSMatrix.m: ditto
|
||||
* Source/NSStringDrawing.m: ditto
|
||||
* Source/NSView.m: ditto
|
||||
* Source/NSWindow.m: ditto
|
||||
|
||||
2000-10-24 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSSimpleLayoutManager.m: _GNULineLayoutInfo has new ivar
|
||||
usedRect. Simplified the code a bit.
|
||||
* Source/NSText.m: [buildUpTextNetwork:] The text container no
|
||||
longer tracks its view by default.
|
||||
[initWithFrame:textContainer:] the view is no longer resizable by default.
|
||||
[initWithFrame:textContainer:] the view is no longer resizable by
|
||||
default.
|
||||
* Source/NSTextContainer.m: [setContainerSize:] only informs
|
||||
layout manager if really changed.
|
||||
* Source/Parser/attributedStringConsumer.m
|
||||
|
|
|
@ -45,8 +45,7 @@
|
|||
#include <Foundation/NSSerialization.h>
|
||||
#include <Foundation/NSPortNameServer.h>
|
||||
#include <Foundation/NSTask.h>
|
||||
|
||||
#include <base/fast.x>
|
||||
#include <Foundation/NSObjCRuntime.h>
|
||||
|
||||
#include <AppKit/NSApplication.h>
|
||||
#include <AppKit/NSPasteboard.h>
|
||||
|
@ -1271,7 +1270,7 @@ NSPerformService(NSString *serviceItem, NSPasteboard *pboard)
|
|||
[connection setRequestTimeout: seconds];
|
||||
[connection setReplyTimeout: seconds];
|
||||
|
||||
msgImp = get_imp(fastClass(provider), msgSel);
|
||||
msgImp = get_imp(GSObjCClassOfObject(provider), msgSel);
|
||||
NS_DURING
|
||||
{
|
||||
[provider performService: selName
|
||||
|
|
|
@ -119,23 +119,19 @@
|
|||
|
||||
static Class infCls = 0;
|
||||
|
||||
static SEL infSel = @selector(newWithZone:value:at:);
|
||||
static IMP infImp = 0;
|
||||
static SEL infSel;
|
||||
static SEL addSel;
|
||||
static SEL cntSel;
|
||||
static SEL insSel;
|
||||
static SEL oatSel;
|
||||
static SEL remSel;
|
||||
|
||||
static SEL addSel = @selector(addObject:);
|
||||
static void (*addImp)() = 0;
|
||||
|
||||
static SEL cntSel = @selector(count);
|
||||
static unsigned (*cntImp)() = 0;
|
||||
|
||||
static SEL insSel = @selector(insertObject:atIndex:);
|
||||
static void (*insImp)() = 0;
|
||||
|
||||
static SEL oatSel = @selector(objectAtIndex:);
|
||||
static IMP oatImp = 0;
|
||||
|
||||
static SEL remSel = @selector(removeObjectAtIndex:);
|
||||
static void (*remImp)() = 0;
|
||||
static IMP infImp;
|
||||
static void (*addImp)();
|
||||
static unsigned (*cntImp)();
|
||||
static void (*insImp)();
|
||||
static IMP oatImp;
|
||||
static void (*remImp)();
|
||||
|
||||
#define NEWINFO(Z,O,L) ((*infImp)(infCls, infSel, (Z), (O), (L)))
|
||||
#define ADDOBJECT(O) ((*addImp)(infoArray, addSel, (O)))
|
||||
|
@ -155,6 +151,13 @@ static void _setup()
|
|||
{
|
||||
NSMutableArray *a;
|
||||
|
||||
infSel = @selector(newWithZone:value:at:);
|
||||
addSel = @selector(addObject:);
|
||||
cntSel = @selector(count);
|
||||
insSel = @selector(insertObject:atIndex:);
|
||||
oatSel = @selector(objectAtIndex:);
|
||||
remSel = @selector(removeObjectAtIndex:);
|
||||
|
||||
infCls = [GSTextInfo class];
|
||||
infImp = [infCls methodForSelector: infSel];
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ static NSString *attachmentString()
|
|||
- (NSDictionary*) fontAttributesInRange: (NSRange)range
|
||||
{
|
||||
NSDictionary *all;
|
||||
static SEL sel = @selector(objectForKey:);
|
||||
static SEL sel = 0;
|
||||
IMP objForKey;
|
||||
id objects[8];
|
||||
id keys[8];
|
||||
|
@ -135,6 +135,8 @@ static NSString *attachmentString()
|
|||
all = [self attributesAtIndex: range.location
|
||||
effectiveRange: &range];
|
||||
|
||||
if (sel == 0)
|
||||
sel = @selector(objectForKey:);
|
||||
objForKey = [all methodForSelector: sel];
|
||||
|
||||
keys[count] = NSFontAttributeName;
|
||||
|
|
|
@ -131,10 +131,10 @@ enum {
|
|||
/* Class variables */
|
||||
static Class defaultCellClass = nil;
|
||||
static int mouseDownFlags = 0;
|
||||
static SEL copySel = @selector(copyWithZone:);
|
||||
static SEL initSel = @selector(init);
|
||||
static SEL allocSel = @selector(allocWithZone:);
|
||||
static SEL getSel = @selector(objectAtIndex:);
|
||||
static SEL copySel;
|
||||
static SEL initSel;
|
||||
static SEL allocSel;
|
||||
static SEL getSel;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
|
@ -143,6 +143,11 @@ static SEL getSel = @selector(objectAtIndex:);
|
|||
/* Set the initial version */
|
||||
[self setVersion: 1];
|
||||
|
||||
copySel = @selector(copyWithZone:);
|
||||
initSel = @selector(init);
|
||||
allocSel = @selector(allocWithZone:);
|
||||
getSel = @selector(objectAtIndex:);
|
||||
|
||||
/*
|
||||
* MacOS-X docs say default cell class is NSActionCell
|
||||
*/
|
||||
|
|
|
@ -49,7 +49,7 @@ static NSFont *defFont;
|
|||
static NSParagraphStyle *defStyle;
|
||||
static NSColor *defFgCol;
|
||||
static NSColor *defBgCol;
|
||||
static SEL advSel = @selector(advancementForGlyph:);
|
||||
static SEL advSel;
|
||||
|
||||
/*
|
||||
* Thne 'checkInit()' function is called to ensure that any static
|
||||
|
@ -65,6 +65,8 @@ checkInit()
|
|||
NSMutableCharacterSet *ms;
|
||||
NSCharacterSet *whitespace;
|
||||
|
||||
advSel = @selector(advancementForGlyph:);
|
||||
|
||||
whitespace = RETAIN([NSCharacterSet whitespaceCharacterSet]);
|
||||
|
||||
/*
|
||||
|
|
|
@ -70,11 +70,11 @@ static Class viewClass;
|
|||
|
||||
static NSAffineTransform *flip = nil;
|
||||
|
||||
static void (*appImp)(NSAffineTransform*, SEL, NSAffineTransform*) = 0;
|
||||
static SEL appSel = @selector(appendTransform:);
|
||||
static SEL appSel;
|
||||
static SEL invalidateSel;
|
||||
|
||||
static void (*invalidateImp)(NSView*, SEL) = 0;
|
||||
static SEL invalidateSel = @selector(_invalidateCoordinates);
|
||||
static void (*appImp)(NSAffineTransform*, SEL, NSAffineTransform*);
|
||||
static void (*invalidateImp)(NSView*, SEL);
|
||||
|
||||
/*
|
||||
* Stuff to maintain a map table so we know what views are
|
||||
|
@ -156,6 +156,9 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
NSObjectMapValueCallBacks, 0);
|
||||
typesLock = [NSLock new];
|
||||
|
||||
appSel = @selector(appendTransform:);
|
||||
invalidateSel = @selector(_invalidateCoordinates);
|
||||
|
||||
appImp = (void (*)(NSAffineTransform*, SEL, NSAffineTransform*))
|
||||
[matrixClass instanceMethodForSelector: appSel];
|
||||
|
||||
|
|
|
@ -391,8 +391,8 @@ typedef struct NSView_struct
|
|||
/*
|
||||
* Class variables
|
||||
*/
|
||||
static SEL ccSel = @selector(_checkCursorRectangles:forEvent:);
|
||||
static SEL ctSel = @selector(_checkTrackingRectangles:forEvent:);
|
||||
static SEL ccSel;
|
||||
static SEL ctSel;
|
||||
static IMP ccImp;
|
||||
static IMP ctImp;
|
||||
static Class responderClass;
|
||||
|
@ -410,6 +410,8 @@ static NSMapTable* windowmaps = NULL;
|
|||
{
|
||||
NSDebugLog(@"Initialize NSWindow class\n");
|
||||
[self setVersion: 2];
|
||||
ccSel = @selector(_checkCursorRectangles:forEvent:);
|
||||
ctSel = @selector(_checkTrackingRectangles:forEvent:);
|
||||
ccImp = [self instanceMethodForSelector: ccSel];
|
||||
ctImp = [self instanceMethodForSelector: ctSel];
|
||||
responderClass = [NSResponder class];
|
||||
|
|
Loading…
Reference in a new issue