mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 18:40:47 +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
2612cc04bd
commit
00418ee526
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>
|
2000-10-24 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/GSSimpleLayoutManager.m: _GNULineLayoutInfo has new ivar
|
* Source/GSSimpleLayoutManager.m: _GNULineLayoutInfo has new ivar
|
||||||
usedRect. Simplified the code a bit.
|
usedRect. Simplified the code a bit.
|
||||||
* Source/NSText.m: [buildUpTextNetwork:] The text container no
|
* Source/NSText.m: [buildUpTextNetwork:] The text container no
|
||||||
longer tracks its view by default.
|
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
|
* Source/NSTextContainer.m: [setContainerSize:] only informs
|
||||||
layout manager if really changed.
|
layout manager if really changed.
|
||||||
* Source/Parser/attributedStringConsumer.m
|
* Source/Parser/attributedStringConsumer.m
|
||||||
|
|
|
@ -45,8 +45,7 @@
|
||||||
#include <Foundation/NSSerialization.h>
|
#include <Foundation/NSSerialization.h>
|
||||||
#include <Foundation/NSPortNameServer.h>
|
#include <Foundation/NSPortNameServer.h>
|
||||||
#include <Foundation/NSTask.h>
|
#include <Foundation/NSTask.h>
|
||||||
|
#include <Foundation/NSObjCRuntime.h>
|
||||||
#include <base/fast.x>
|
|
||||||
|
|
||||||
#include <AppKit/NSApplication.h>
|
#include <AppKit/NSApplication.h>
|
||||||
#include <AppKit/NSPasteboard.h>
|
#include <AppKit/NSPasteboard.h>
|
||||||
|
@ -1271,7 +1270,7 @@ NSPerformService(NSString *serviceItem, NSPasteboard *pboard)
|
||||||
[connection setRequestTimeout: seconds];
|
[connection setRequestTimeout: seconds];
|
||||||
[connection setReplyTimeout: seconds];
|
[connection setReplyTimeout: seconds];
|
||||||
|
|
||||||
msgImp = get_imp(fastClass(provider), msgSel);
|
msgImp = get_imp(GSObjCClassOfObject(provider), msgSel);
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
[provider performService: selName
|
[provider performService: selName
|
||||||
|
|
|
@ -119,23 +119,19 @@
|
||||||
|
|
||||||
static Class infCls = 0;
|
static Class infCls = 0;
|
||||||
|
|
||||||
static SEL infSel = @selector(newWithZone:value:at:);
|
static SEL infSel;
|
||||||
static IMP infImp = 0;
|
static SEL addSel;
|
||||||
|
static SEL cntSel;
|
||||||
|
static SEL insSel;
|
||||||
|
static SEL oatSel;
|
||||||
|
static SEL remSel;
|
||||||
|
|
||||||
static SEL addSel = @selector(addObject:);
|
static IMP infImp;
|
||||||
static void (*addImp)() = 0;
|
static void (*addImp)();
|
||||||
|
static unsigned (*cntImp)();
|
||||||
static SEL cntSel = @selector(count);
|
static void (*insImp)();
|
||||||
static unsigned (*cntImp)() = 0;
|
static IMP oatImp;
|
||||||
|
static void (*remImp)();
|
||||||
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;
|
|
||||||
|
|
||||||
#define NEWINFO(Z,O,L) ((*infImp)(infCls, infSel, (Z), (O), (L)))
|
#define NEWINFO(Z,O,L) ((*infImp)(infCls, infSel, (Z), (O), (L)))
|
||||||
#define ADDOBJECT(O) ((*addImp)(infoArray, addSel, (O)))
|
#define ADDOBJECT(O) ((*addImp)(infoArray, addSel, (O)))
|
||||||
|
@ -155,6 +151,13 @@ static void _setup()
|
||||||
{
|
{
|
||||||
NSMutableArray *a;
|
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];
|
infCls = [GSTextInfo class];
|
||||||
infImp = [infCls methodForSelector: infSel];
|
infImp = [infCls methodForSelector: infSel];
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ static NSString *attachmentString()
|
||||||
- (NSDictionary*) fontAttributesInRange: (NSRange)range
|
- (NSDictionary*) fontAttributesInRange: (NSRange)range
|
||||||
{
|
{
|
||||||
NSDictionary *all;
|
NSDictionary *all;
|
||||||
static SEL sel = @selector(objectForKey:);
|
static SEL sel = 0;
|
||||||
IMP objForKey;
|
IMP objForKey;
|
||||||
id objects[8];
|
id objects[8];
|
||||||
id keys[8];
|
id keys[8];
|
||||||
|
@ -135,6 +135,8 @@ static NSString *attachmentString()
|
||||||
all = [self attributesAtIndex: range.location
|
all = [self attributesAtIndex: range.location
|
||||||
effectiveRange: &range];
|
effectiveRange: &range];
|
||||||
|
|
||||||
|
if (sel == 0)
|
||||||
|
sel = @selector(objectForKey:);
|
||||||
objForKey = [all methodForSelector: sel];
|
objForKey = [all methodForSelector: sel];
|
||||||
|
|
||||||
keys[count] = NSFontAttributeName;
|
keys[count] = NSFontAttributeName;
|
||||||
|
|
|
@ -131,10 +131,10 @@ enum {
|
||||||
/* Class variables */
|
/* Class variables */
|
||||||
static Class defaultCellClass = nil;
|
static Class defaultCellClass = nil;
|
||||||
static int mouseDownFlags = 0;
|
static int mouseDownFlags = 0;
|
||||||
static SEL copySel = @selector(copyWithZone:);
|
static SEL copySel;
|
||||||
static SEL initSel = @selector(init);
|
static SEL initSel;
|
||||||
static SEL allocSel = @selector(allocWithZone:);
|
static SEL allocSel;
|
||||||
static SEL getSel = @selector(objectAtIndex:);
|
static SEL getSel;
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
|
@ -143,6 +143,11 @@ static SEL getSel = @selector(objectAtIndex:);
|
||||||
/* Set the initial version */
|
/* Set the initial version */
|
||||||
[self setVersion: 1];
|
[self setVersion: 1];
|
||||||
|
|
||||||
|
copySel = @selector(copyWithZone:);
|
||||||
|
initSel = @selector(init);
|
||||||
|
allocSel = @selector(allocWithZone:);
|
||||||
|
getSel = @selector(objectAtIndex:);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MacOS-X docs say default cell class is NSActionCell
|
* MacOS-X docs say default cell class is NSActionCell
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -49,7 +49,7 @@ static NSFont *defFont;
|
||||||
static NSParagraphStyle *defStyle;
|
static NSParagraphStyle *defStyle;
|
||||||
static NSColor *defFgCol;
|
static NSColor *defFgCol;
|
||||||
static NSColor *defBgCol;
|
static NSColor *defBgCol;
|
||||||
static SEL advSel = @selector(advancementForGlyph:);
|
static SEL advSel;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Thne 'checkInit()' function is called to ensure that any static
|
* Thne 'checkInit()' function is called to ensure that any static
|
||||||
|
@ -65,6 +65,8 @@ checkInit()
|
||||||
NSMutableCharacterSet *ms;
|
NSMutableCharacterSet *ms;
|
||||||
NSCharacterSet *whitespace;
|
NSCharacterSet *whitespace;
|
||||||
|
|
||||||
|
advSel = @selector(advancementForGlyph:);
|
||||||
|
|
||||||
whitespace = RETAIN([NSCharacterSet whitespaceCharacterSet]);
|
whitespace = RETAIN([NSCharacterSet whitespaceCharacterSet]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -70,11 +70,11 @@ static Class viewClass;
|
||||||
|
|
||||||
static NSAffineTransform *flip = nil;
|
static NSAffineTransform *flip = nil;
|
||||||
|
|
||||||
static void (*appImp)(NSAffineTransform*, SEL, NSAffineTransform*) = 0;
|
static SEL appSel;
|
||||||
static SEL appSel = @selector(appendTransform:);
|
static SEL invalidateSel;
|
||||||
|
|
||||||
static void (*invalidateImp)(NSView*, SEL) = 0;
|
static void (*appImp)(NSAffineTransform*, SEL, NSAffineTransform*);
|
||||||
static SEL invalidateSel = @selector(_invalidateCoordinates);
|
static void (*invalidateImp)(NSView*, SEL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stuff to maintain a map table so we know what views are
|
* Stuff to maintain a map table so we know what views are
|
||||||
|
@ -156,6 +156,9 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
NSObjectMapValueCallBacks, 0);
|
NSObjectMapValueCallBacks, 0);
|
||||||
typesLock = [NSLock new];
|
typesLock = [NSLock new];
|
||||||
|
|
||||||
|
appSel = @selector(appendTransform:);
|
||||||
|
invalidateSel = @selector(_invalidateCoordinates);
|
||||||
|
|
||||||
appImp = (void (*)(NSAffineTransform*, SEL, NSAffineTransform*))
|
appImp = (void (*)(NSAffineTransform*, SEL, NSAffineTransform*))
|
||||||
[matrixClass instanceMethodForSelector: appSel];
|
[matrixClass instanceMethodForSelector: appSel];
|
||||||
|
|
||||||
|
|
|
@ -391,8 +391,8 @@ typedef struct NSView_struct
|
||||||
/*
|
/*
|
||||||
* Class variables
|
* Class variables
|
||||||
*/
|
*/
|
||||||
static SEL ccSel = @selector(_checkCursorRectangles:forEvent:);
|
static SEL ccSel;
|
||||||
static SEL ctSel = @selector(_checkTrackingRectangles:forEvent:);
|
static SEL ctSel;
|
||||||
static IMP ccImp;
|
static IMP ccImp;
|
||||||
static IMP ctImp;
|
static IMP ctImp;
|
||||||
static Class responderClass;
|
static Class responderClass;
|
||||||
|
@ -410,6 +410,8 @@ static NSMapTable* windowmaps = NULL;
|
||||||
{
|
{
|
||||||
NSDebugLog(@"Initialize NSWindow class\n");
|
NSDebugLog(@"Initialize NSWindow class\n");
|
||||||
[self setVersion: 2];
|
[self setVersion: 2];
|
||||||
|
ccSel = @selector(_checkCursorRectangles:forEvent:);
|
||||||
|
ctSel = @selector(_checkTrackingRectangles:forEvent:);
|
||||||
ccImp = [self instanceMethodForSelector: ccSel];
|
ccImp = [self instanceMethodForSelector: ccSel];
|
||||||
ctImp = [self instanceMethodForSelector: ctSel];
|
ctImp = [self instanceMethodForSelector: ctSel];
|
||||||
responderClass = [NSResponder class];
|
responderClass = [NSResponder class];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue