[Mac] Mark callback calling convention
authorthefiddler <stapostol@gmail.com>
Wed, 23 Jul 2014 19:18:34 +0000 (21:18 +0200)
committerthefiddler <stapostol@gmail.com>
Wed, 23 Jul 2014 19:18:34 +0000 (21:18 +0200)
commitd12643cf442a0c0c634352bf8af574d47298304c
tree930fed604d9dc77009c026059a6522346744f64c
parenta6c4a7c9b581e7929acfeec1038f00f2952d0c6c
[Mac] Mark callback calling convention

Callbacks are now explicitly marked as unmanaged pointers with the
correct (platform-defined) calling convention. Exceptions raised inside
these callbacks are no longer allowed to escape into unmanaged code,
where they will crash the runtime.

Additionally, the window is now only closed on the UI thread, and only
if it is actually open.
Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs