diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-30 23:01:08 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-30 23:01:08 -0400 |
| commit | 155899c65ed32245e2ccad4197a10c77017d835b (patch) | |
| tree | 4c337130ff5d1640efc1e94258ab3b8a9eef0c55 /delegate_darwin.go | |
| parent | 3d4e54822dc6117306d5a4ac0e79017c4810b657 (diff) | |
Out with the old...
Diffstat (limited to 'delegate_darwin.go')
| -rw-r--r-- | delegate_darwin.go | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/delegate_darwin.go b/delegate_darwin.go deleted file mode 100644 index 9802b68..0000000 --- a/delegate_darwin.go +++ /dev/null @@ -1,45 +0,0 @@ -// 27 february 2014 - -package ui - -/* -This creates a class goAppDelegate that will be used as the delegate for /everything/. Specifically, it: - - handles window close events (windowShouldClose:) - - handles window resize events (windowDidResize:) - - handles button click events (buttonClicked:) - - handles the application-global Quit event (such as from the Dock) (applicationShouldTerminate) -*/ - -// #include <stdlib.h> -// #include "objc_darwin.h" -import "C" - -var ( - appDelegate C.id -) - -func makeAppDelegate() { - appDelegate = C.makeAppDelegate() -} - -//export appDelegate_windowShouldClose -func appDelegate_windowShouldClose(win C.id) C.BOOL { - sysData := getSysData(win) - return toBOOL(sysData.close()) -} - -//export appDelegate_windowDidResize -func appDelegate_windowDidResize(win C.id) { - s := getSysData(win) - wincv := C.windowGetContentView(win) // we want the content view's size, not the window's - r := C.frame(wincv) - // (0,0) is the bottom left corner but this is handled in sysData.translateAllocationCoords() - s.resizeWindow(int(r.width), int(r.height)) - C.display(win) // redraw everything -} - -//export appDelegate_buttonClicked -func appDelegate_buttonClicked(button C.id) { - sysData := getSysData(button) - sysData.event() -} |
