summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-15 22:30:19 -0400
committerPietro Gagliardi <[email protected]>2014-05-15 22:30:19 -0400
commit3b4924a156246928ac672c5ce3321a6f43d3b4e9 (patch)
tree018bfd8044f5e3596a9f0f981f43e115df05f00d
parent524867574b0b38ed00cba35d221f695af7acbb34 (diff)
Removed some residual drawRect: stuff from bleh_darwin.m. So close...
-rw-r--r--bleh_darwin.m28
-rw-r--r--objc_darwin.h7
2 files changed, 0 insertions, 35 deletions
diff --git a/bleh_darwin.m b/bleh_darwin.m
index a8febcf..7bb9344 100644
--- a/bleh_darwin.m
+++ b/bleh_darwin.m
@@ -81,31 +81,3 @@ id makeDummyEvent()
(NSInteger) 0, /* data1: */
(NSInteger) 0); /* data2: */
}
-
-/*
-[NSView drawRect:] needs to be overridden in our Area subclass. This takes a NSRect, which I'm not sure how to encode, so we're going to have to use @encode() and hope for the best for portability.
-*/
-
-extern void areaView_drawRect(id, struct xrect);
-
-static void __areaView_drawRect(id self, SEL sel, NSRect r)
-{
- struct xrect t;
-
- t.x = (int64_t) r.origin.x;
- t.y = (int64_t) r.origin.y;
- t.width = (int64_t) r.size.width;
- t.height = (int64_t) r.size.height;
- areaView_drawRect(self, t);
-}
-
-void *_areaView_drawRect = (void *) __areaView_drawRect;
-
-/*
-this and one below it are the only objective-c feature you'll see here
-
-unfortunately NSRect both varies across architectures and is passed as just a structure, so its encoding has to be computed at compile time
-because @encode() is NOT A LITERAL, we're going to just stick it all the way back in objc_darwin.go
-see also: http://stackoverflow.com/questions/6812035/adding-methods-dynamically
-*/
-char *encodedNSRect = @encode(NSRect);
diff --git a/objc_darwin.h b/objc_darwin.h
index 06e79f9..42c7ce6 100644
--- a/objc_darwin.h
+++ b/objc_darwin.h
@@ -53,11 +53,4 @@ struct xpoint {
extern void initBleh();
extern id makeDummyEvent();
-/* for area_darwin.go */
-/* TODO apparently ISO C forbids casting a function pointer to a non-function pointer; this will need to change???? */
-extern void *_areaView_drawRect;
-
-/* for objc_darwin.go */
-extern char *encodedNSRect;
-
#endif