1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-20 14:56:55 +00:00

osx: code cleanups and cosmetic fixes

This commit is contained in:
Akemi 2018-01-20 15:54:27 +01:00 committed by Kevin Mitchell
parent 45ce4ba877
commit db08e28304
7 changed files with 4 additions and 18 deletions

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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];

View File

@ -26,24 +26,17 @@ struct input_ctx;
@interface EventsResponder : NSObject <HIDRemoteDelegate>
+ (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

View File

@ -45,7 +45,8 @@
@synthesize targetScreen = _target_screen;
@synthesize previousScreen = _previous_screen;
@synthesize currentScreen = _current_screen;
@synthesize unfScreen = _unf_Screen;
@synthesize unfScreen = _unf_screen;
- (id)initWithContentRect:(NSRect)content_rect
styleMask:(NSWindowStyleMask)style_mask
backing:(NSBackingStoreType)buffering_type

View File

@ -19,7 +19,6 @@
#include <dlfcn.h>
#include "options/m_config.h"
#include "video/out/cocoa_common.h"
#include "osdep/macosx_versions.h"
#include "context.h"
struct cocoa_opts {