summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFRAU KOUJIRO <frau@doushio.com>2014-04-15 19:33:58 -0700
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-08-06 09:31:58 +0200
commit4fc8dcde2ae1525c8ea52d04ed0e7768decf901a (patch)
treedb8e9389bf85d5bc11b4327e175970d1e62653f0
parent78a2d99de130cc8e6adc18c5d7a987c5c8b2d2b3 (diff)
downloadmpv-4fc8dcde2ae1525c8ea52d04ed0e7768decf901a.tar.bz2
mpv-4fc8dcde2ae1525c8ea52d04ed0e7768decf901a.tar.xz
cocoa: move set_input_context to macosx_events
-rw-r--r--osdep/macosx_application.h4
-rw-r--r--osdep/macosx_application.m5
-rw-r--r--osdep/macosx_events.h4
-rw-r--r--osdep/macosx_events.m5
-rw-r--r--player/main.c1
5 files changed, 10 insertions, 9 deletions
diff --git a/osdep/macosx_application.h b/osdep/macosx_application.h
index f9fca4b334..23c5838a3b 100644
--- a/osdep/macosx_application.h
+++ b/osdep/macosx_application.h
@@ -19,8 +19,6 @@
#ifndef MPV_MACOSX_APPLICATION
#define MPV_MACOSX_APPLICATION
-struct input_ctx;
-
typedef int (*mpv_main_fn)(int, char**);
// Menu Keys identifing menu items
@@ -46,8 +44,6 @@ void cocoa_run_runloop(void);
void cocoa_stop_runloop(void);
void cocoa_post_fake_event(void);
-void cocoa_set_input_context(struct input_ctx *input_context);
-
void macosx_finder_args_preinit(int *argc, char ***argv);
#endif /* MPV_MACOSX_APPLICATION */
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m
index 9aff6e814b..18c47f4bea 100644
--- a/osdep/macosx_application.m
+++ b/osdep/macosx_application.m
@@ -373,11 +373,6 @@ void cocoa_stop_runloop(void)
cocoa_post_fake_event();
}
-void cocoa_set_input_context(struct input_ctx *input_context)
-{
- [EventsResponder sharedInstance].inputContext = input_context;
-}
-
void cocoa_post_fake_event(void)
{
NSEvent* event = [NSEvent otherEventWithType:NSApplicationDefined
diff --git a/osdep/macosx_events.h b/osdep/macosx_events.h
index a4b122f534..f3dfbdfea4 100644
--- a/osdep/macosx_events.h
+++ b/osdep/macosx_events.h
@@ -21,6 +21,8 @@
#define MACOSX_EVENTS_H
#include "input/keycodes.h"
+struct input_ctx;
+
void cocoa_put_key(int keycode);
void cocoa_put_key_with_modifiers(int keycode, int modifiers);
@@ -30,4 +32,6 @@ void cocoa_uninit_apple_remote(void);
void cocoa_init_media_keys(void);
void cocoa_uninit_media_keys(void);
+void cocoa_set_input_context(struct input_ctx *input_context);
+
#endif
diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m
index c8da555fa1..0b3eeb1d48 100644
--- a/osdep/macosx_events.m
+++ b/osdep/macosx_events.m
@@ -188,6 +188,11 @@ void cocoa_put_key_with_modifiers(int keycode, int modifiers)
cocoa_put_key(keycode);
}
+void cocoa_set_input_context(struct input_ctx *input_context)
+{
+ [EventsResponder sharedInstance].inputContext = input_context;
+}
+
@implementation EventsResponder
+ (EventsResponder *)sharedInstance
diff --git a/player/main.c b/player/main.c
index 13ecff9f9e..288dbbd89e 100644
--- a/player/main.c
+++ b/player/main.c
@@ -73,6 +73,7 @@
#if HAVE_COCOA
#include "osdep/macosx_application.h"
+#include "osdep/macosx_events.h"
#endif
#ifdef PTW32_STATIC_LIB