From 7b940443af7bb0c387b5fcf6bf58ab211007b6af Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Thu, 5 May 2016 14:03:58 -0700 Subject: [PATCH] Minor fixes to hotkey event handler. --- Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m b/Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m index dc5f6182c..c24bcddbe 100644 --- a/Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m +++ b/Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m @@ -79,7 +79,7 @@ static NSHashTable * allHotKeyEvents = NULL; static EventHandlerRef hotKeysEventHandler = NULL; static OSType signature = 0; -static pascal OSErr eventHandlerCallback( EventHandlerCallRef anInHandlerCallRef, EventRef anInEvent, void * self ); +static OSStatus eventHandlerCallback( EventHandlerCallRef anInHandlerCallRef, EventRef anInEvent, void * self ); #ifndef NDMapTableClassDefined static NSUInteger hashValueHashFunction( NSHashTable * aTable, const void * aHotKeyEvent ); @@ -119,7 +119,7 @@ struct HotKeyMappingEntry NDHotKeyEventLock; if( theHotKeyEvents != nil && hotKeysEventHandler == NULL ) { - if( InstallEventHandler( GetEventDispatcherTarget(), NewEventHandlerUPP((EventHandlerProcPtr)eventHandlerCallback), 2, theTypeSpec, (__bridge void *)(theHotKeyEvents), &hotKeysEventHandler ) != noErr ) + if( InstallEventHandler( GetEventDispatcherTarget(), (EventHandlerProcPtr)eventHandlerCallback, 2, theTypeSpec, (__bridge void *)(theHotKeyEvents), &hotKeysEventHandler ) != noErr ) NSLog(@"Could not install Event handler"); } NDHotKeyEventUnlock; @@ -654,7 +654,7 @@ struct HotKeyMappingEntry NSStringFromSelector([self selectorReleased])]; } -pascal OSErr eventHandlerCallback( EventHandlerCallRef anInHandlerCallRef, EventRef anInEvent, void * anInUserData ) +OSStatus eventHandlerCallback( EventHandlerCallRef anInHandlerCallRef, EventRef anInEvent, void * anInUserData ) { // NSHashTable * allHotKeyEvents = (NSHashTable *)anInUserData; EventHotKeyID theHotKeyID;