Renamed areaView to goAreaView in accordance to the other Objective-C class names on the Mac OS X backend.

This commit is contained in:
Pietro Gagliardi 2014-08-11 11:44:55 -04:00
parent be56135451
commit 80ff6b2048
1 changed files with 6 additions and 8 deletions

View File

@ -5,8 +5,6 @@
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#define toNSEvent(x) ((NSEvent *) (x)) #define toNSEvent(x) ((NSEvent *) (x))
// TODO rename to goAreaView
#define toAreaView(x) ((areaView *) (x))
#define toNSView(x) ((NSView *) (x)) #define toNSView(x) ((NSView *) (x))
#define toNSInteger(x) ((NSInteger) (x)) #define toNSInteger(x) ((NSInteger) (x))
@ -14,14 +12,14 @@
#define toNSUInteger(x) ((NSUInteger) (x)) #define toNSUInteger(x) ((NSUInteger) (x))
#define fromNSUInteger(x) ((uintptr_t) (x)) #define fromNSUInteger(x) ((uintptr_t) (x))
@interface areaView : NSView { @interface goAreaView : NSView {
@public @public
void *goarea; void *goarea;
NSTrackingArea *trackingArea; NSTrackingArea *trackingArea;
} }
@end @end
@implementation areaView @implementation goAreaView
- (id)initWithFrame:(NSRect)r - (id)initWithFrame:(NSRect)r
{ {
@ -100,14 +98,14 @@ event(flagsChanged, areaView_flagsChanged)
Class getAreaClass(void) Class getAreaClass(void)
{ {
return [areaView class]; return [goAreaView class];
} }
id newArea(void *goarea) id newArea(void *goarea)
{ {
areaView *a; goAreaView *a;
a = [[areaView alloc] initWithFrame:NSZeroRect]; a = [[goAreaView alloc] initWithFrame:NSZeroRect];
a->goarea = goarea; a->goarea = goarea;
return (id) a; return (id) a;
} }
@ -153,7 +151,7 @@ struct xpoint getTranslatedEventPoint(id area, id e)
NSPoint p; NSPoint p;
struct xpoint q; struct xpoint q;
p = [toAreaView(area) convertPoint:[toNSEvent(e) locationInWindow] fromView:nil]; p = [toNSView(area) convertPoint:[toNSEvent(e) locationInWindow] fromView:nil];
q.x = (intptr_t) p.x; q.x = (intptr_t) p.x;
q.y = (intptr_t) p.y; q.y = (intptr_t) p.y;
return q; return q;