summaryrefslogtreecommitdiff
path: root/delegate_darwin.m
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-13 08:14:28 -0400
committerPietro Gagliardi <[email protected]>2014-05-13 08:14:28 -0400
commit3e712db2e028ecd90d6e331eb684bb6de9c670fa (patch)
treee3580b23470117c98a902a42e75e79d681da78ef /delegate_darwin.m
parentde97125c54da4a2fbbec304205868444775e4fd5 (diff)
Moved uitask_darwin.go to be Objective-C-based. Both delegate_darwin.go and uitask_darwin.go will share the same .m file.
Diffstat (limited to 'delegate_darwin.m')
-rw-r--r--delegate_darwin.m53
1 files changed, 0 insertions, 53 deletions
diff --git a/delegate_darwin.m b/delegate_darwin.m
deleted file mode 100644
index 638bfa3..0000000
--- a/delegate_darwin.m
+++ /dev/null
@@ -1,53 +0,0 @@
-// 13 may 2014
-
-#include "objc_darwin.h"
-#include "_cgo_export.h"
-#include <Foundation/NSObject.h>
-#include <Foundation/NSValue.h>
-#include <Foundation/NSNotification.h>
-#include <AppKit/NSApplication.h>
-#include <AppKit/NSWindow.h>
-
-@interface appDelegate : NSObject
-@end
-
-@implementation appDelegate
-
-- (void)uitask:(NSValue *)fp
-{
- appDelegate_uitask([fp pointerValue]);
-}
-
-- (BOOL)windowShouldClose:(id)win
-{
- appDelegate_windowShouldClose(win);
- return NO; // don't close
-}
-
-- (void)windowDidResize:(NSNotification *)n
-{
- appDelegate_windowDidResize([n object]);
-}
-
-- (void)buttonClicked:(id)button
-{
- appDelegate_buttonClicked(button);
-}
-
-- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)app
-{
- appDelegate_applicationShouldTerminate();
- return NSTerminateCancel;
-}
-
-@end
-
-id makeAppDelegate(void)
-{
- return [appDelegate new];
-}
-
-id windowGetContentView(id window)
-{
- return [((NSWindow *) window) contentView];
-}