|
|
|
@ -25,7 +25,18 @@ |
|
|
|
#import "SPMediaKeyTap.h" |
|
|
|
#import "SPInvocationGrabbing.h" |
|
|
|
|
|
|
|
@interface SPMediaKeyTap () |
|
|
|
@interface SPMediaKeyTap () { |
|
|
|
EventHandlerRef _app_switching_ref; |
|
|
|
EventHandlerRef _app_terminating_ref; |
|
|
|
CFMachPortRef _eventPort; |
|
|
|
CFRunLoopSourceRef _eventPortSource; |
|
|
|
CFRunLoopRef _tapThreadRL; |
|
|
|
BOOL _shouldInterceptMediaKeyEvents; |
|
|
|
id _delegate; |
|
|
|
// The app that is frontmost in this list owns media keys |
|
|
|
NSMutableArray *_mediaKeyAppList; |
|
|
|
} |
|
|
|
|
|
|
|
- (BOOL)shouldInterceptMediaKeyEvents; |
|
|
|
- (void)setShouldInterceptMediaKeyEvents:(BOOL)newSetting; |
|
|
|
- (void)startWatchingAppSwitching; |
|
|
|
|