From db08e28304693c1b2e8cbfbad0c28c23c1a414d7 Mon Sep 17 00:00:00 2001 From: Akemi Date: Sat, 20 Jan 2018 15:54:27 +0100 Subject: osx: code cleanups and cosmetic fixes --- osdep/macosx_application.m | 2 +- osdep/macosx_application_objc.h | 1 - osdep/macosx_events.h | 1 - osdep/macosx_events.m | 5 ----- osdep/macosx_events_objc.h | 9 +-------- 5 files changed, 2 insertions(+), 16 deletions(-) (limited to 'osdep') diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m index de2514f1ce..d070401621 100644 --- a/osdep/macosx_application.m +++ b/osdep/macosx_application.m @@ -61,7 +61,7 @@ static void terminate_cocoa_application(void) } @implementation Application -@synthesize menuBar = _menu_Bar; +@synthesize menuBar = _menu_bar; @synthesize openCount = _open_count; - (void)sendEvent:(NSEvent *)event diff --git a/osdep/macosx_application_objc.h b/osdep/macosx_application_objc.h index 512ab0f4ee..c12a8b8c64 100644 --- a/osdep/macosx_application_objc.h +++ b/osdep/macosx_application_objc.h @@ -29,6 +29,5 @@ struct mpv_event; - (void)openFiles:(NSArray *)filenames; @property(nonatomic, retain) MenuBar *menuBar; -@property(nonatomic, retain) NSArray *files; @property(nonatomic, assign) size_t openCount; @end diff --git a/osdep/macosx_events.h b/osdep/macosx_events.h index 216df8238c..17adaf9ae5 100644 --- a/osdep/macosx_events.h +++ b/osdep/macosx_events.h @@ -26,7 +26,6 @@ struct mpv_handle; void cocoa_put_key(int keycode); void cocoa_put_key_with_modifiers(int keycode, int modifiers); -void cocoa_put_key_event(void *event); void cocoa_init_apple_remote(void); void cocoa_uninit_apple_remote(void); diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m index e94718c3d1..a23bd56278 100644 --- a/osdep/macosx_events.m +++ b/osdep/macosx_events.m @@ -194,11 +194,6 @@ void cocoa_put_key(int keycode) [[EventsResponder sharedInstance] putKey:keycode]; } -void cocoa_put_key_event(void *event) -{ - [[EventsResponder sharedInstance] handleKey:event]; -} - void cocoa_put_key_with_modifiers(int keycode, int modifiers) { keycode |= [[EventsResponder sharedInstance] mapKeyModifiers:modifiers]; diff --git a/osdep/macosx_events_objc.h b/osdep/macosx_events_objc.h index f3210f2580..79ace0a909 100644 --- a/osdep/macosx_events_objc.h +++ b/osdep/macosx_events_objc.h @@ -26,24 +26,17 @@ struct input_ctx; @interface EventsResponder : NSObject + (EventsResponder *)sharedInstance; - - (void)setInputContext:(struct input_ctx *)ctx; - - (void)setIsApplication:(BOOL)isApplication; /// Blocks until inputContext is present. - (void)waitForInputContext; - - (void)wakeup; - -- (bool)queueCommand:(char *)cmd; - - (void)putKey:(int)keycode; - - (void)setHighestPriotityMediaKeysTap; - - (void)handleFilesArray:(NSArray *)files; +- (bool)queueCommand:(char *)cmd; - (bool)processKeyEvent:(NSEvent *)event; @end -- cgit v1.2.3