diff options
| author | Pietro Gagliardi <[email protected]> | 2014-04-06 23:33:27 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-04-06 23:33:27 -0400 |
| commit | f7817f6987f83d84893466ee4f8a99af98ee643f (patch) | |
| tree | f5562d591887582e1fd720bbf86c2eb83c7fbbaa /objc_darwin.go | |
| parent | af770340c9d73a60a1484fd3793ab3a2d4e1076b (diff) | |
Added (untested; VM issues) code to handle Mac OS X Quit Dock menu items and other related stuff that may happen in the future. Will drop the TODO after I can test it.
Diffstat (limited to 'objc_darwin.go')
| -rw-r--r-- | objc_darwin.go | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/objc_darwin.go b/objc_darwin.go index d7e8f7a..b4b44e8 100644 --- a/objc_darwin.go +++ b/objc_darwin.go @@ -71,14 +71,16 @@ const ( sel_bool_id sel_bool sel_void_rect + sel_terminatereply nitypes ) var itypes = [nitypes][]C.char{ - sel_void_id: []C.char{'v', '@', ':', '@', 0}, - sel_bool_id: []C.char{'c', '@', ':', '@', 0}, - sel_bool: []C.char{'c', '@', ':', 0}, - sel_void_rect: nil, // see init() below + sel_void_id: []C.char{'v', '@', ':', '@', 0}, + sel_bool_id: []C.char{'c', '@', ':', '@', 0}, + sel_bool: []C.char{'c', '@', ':', 0}, + sel_void_rect: nil, // see init() below + sel_terminatereply: nil, } func init() { @@ -91,6 +93,14 @@ func init() { } x = append(x, 0) itypes[sel_void_rect] = x + + x = make([]C.char, 0, 256) // more than enough + y = C.GoString(C.encodedTerminateReply) + for _, b := range y { + x = append(x, C.char(b)) + } + x = append(x, '@', ':', 0) + itypes[sel_terminatereply] = x } func makeClass(name string, super C.id, sels []selector, desc string) (id C.id, err error) { |
