summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo.c1
-rw-r--r--video/out/vo_caca.c12
-rw-r--r--video/out/vo_sdl.c12
-rw-r--r--video/out/w32_common.c12
-rw-r--r--video/out/x11_common.c30
5 files changed, 33 insertions, 34 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index b2bf8765a8..44e963984c 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -37,7 +37,6 @@
#include "vo.h"
#include "aspect.h"
#include "core/input/input.h"
-#include "core/mp_fifo.h"
#include "core/m_config.h"
#include "core/mp_msg.h"
#include "video/mp_image.h"
diff --git a/video/out/vo_caca.c b/video/out/vo_caca.c
index 78eaf2b395..dd6d76f311 100644
--- a/video/out/vo_caca.c
+++ b/video/out/vo_caca.c
@@ -43,7 +43,7 @@
#include "core/input/keycodes.h"
#include "core/input/input.h"
#include "core/mp_msg.h"
-#include "core/mp_fifo.h"
+#include "core/input/input.h"
/* caca stuff */
static caca_canvas_t *canvas;
@@ -169,19 +169,19 @@ static void check_events(struct vo *vo)
resize();
break;
case CACA_EVENT_QUIT:
- mplayer_put_key(vo->key_fifo, MP_KEY_CLOSE_WIN);
+ mp_input_put_key(vo->input_ctx, MP_KEY_CLOSE_WIN);
break;
case CACA_EVENT_MOUSE_MOTION:
vo_mouse_movement(vo, cev.data.mouse.x, cev.data.mouse.y);
break;
case CACA_EVENT_MOUSE_PRESS:
if (!vo->opts->nomouse_input)
- mplayer_put_key(vo->key_fifo,
+ mp_input_put_key(vo->input_ctx,
(MP_MOUSE_BTN0 + cev.data.mouse.button - 1) | MP_KEY_STATE_DOWN);
break;
case CACA_EVENT_MOUSE_RELEASE:
if (!vo->opts->nomouse_input)
- mplayer_put_key(vo->key_fifo,
+ mp_input_put_key(vo->input_ctx,
(MP_MOUSE_BTN0 + cev.data.mouse.button - 1) | MP_KEY_STATE_UP);
break;
case CACA_EVENT_KEY_PRESS:
@@ -191,7 +191,7 @@ static void check_events(struct vo *vo)
const char *msg_name;
if (mpkey)
- mplayer_put_key(vo->key_fifo, mpkey);
+ mp_input_put_key(vo->input_ctx, mpkey);
else
switch (key) {
case 'd':
@@ -228,7 +228,7 @@ static void check_events(struct vo *vo)
default:
if (key <= 255)
- mplayer_put_key(vo->key_fifo, key);
+ mp_input_put_key(vo->input_ctx, key);
break;
}
}
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c
index dd1e4a5053..5ab62cb78e 100644
--- a/video/out/vo_sdl.c
+++ b/video/out/vo_sdl.c
@@ -32,7 +32,7 @@
#include "core/input/input.h"
#include "core/input/keycodes.h"
-#include "core/mp_fifo.h"
+#include "core/input/input.h"
#include "core/mp_msg.h"
#include "core/options.h"
@@ -484,7 +484,7 @@ static void check_events(struct vo *vo)
}
break;
case SDL_QUIT:
- mplayer_put_key(vo->key_fifo, MP_KEY_CLOSE_WIN);
+ mp_input_put_key(vo->input_ctx, MP_KEY_CLOSE_WIN);
break;
case SDL_TEXTINPUT: {
int sdl_mod = SDL_GetModState();
@@ -500,7 +500,7 @@ static void check_events(struct vo *vo)
struct bstr t = {
ev.text.text, strlen(ev.text.text)
};
- mplayer_put_key_utf8(vo->key_fifo, mpv_mod, t);
+ mp_input_put_key_utf8(vo->input_ctx, mpv_mod, t);
break;
}
case SDL_KEYDOWN: {
@@ -528,7 +528,7 @@ static void check_events(struct vo *vo)
keycode |= MP_KEY_MODIFIER_ALT;
if (ev.key.keysym.mod & (KMOD_LGUI | KMOD_RGUI))
keycode |= MP_KEY_MODIFIER_META;
- mplayer_put_key(vo->key_fifo, keycode);
+ mp_input_put_key(vo->input_ctx, keycode);
}
break;
}
@@ -536,11 +536,11 @@ static void check_events(struct vo *vo)
vo_mouse_movement(vo, ev.motion.x, ev.motion.y);
break;
case SDL_MOUSEBUTTONDOWN:
- mplayer_put_key(vo->key_fifo,
+ mp_input_put_key(vo->input_ctx,
(MP_MOUSE_BTN0 + ev.button.button - 1) | MP_KEY_STATE_DOWN);
break;
case SDL_MOUSEBUTTONUP:
- mplayer_put_key(vo->key_fifo,
+ mp_input_put_key(vo->input_ctx,
(MP_MOUSE_BTN0 + ev.button.button - 1) | MP_KEY_STATE_UP);
break;
case SDL_MOUSEWHEEL:
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 13ec8e7053..9ce0174320 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -29,7 +29,7 @@
#include "vo.h"
#include "aspect.h"
#include "w32_common.h"
-#include "core/mp_fifo.h"
+#include "core/input/input.h"
#include "osdep/io.h"
#include "talloc.h"
@@ -171,7 +171,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
}
break;
case WM_CLOSE:
- mplayer_put_key(vo->key_fifo, MP_KEY_CLOSE_WIN);
+ mp_input_put_key(vo->input_ctx, MP_KEY_CLOSE_WIN);
break;
case WM_SYSCOMMAND:
switch (wParam) {
@@ -188,7 +188,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
case WM_SYSKEYDOWN: {
int mpkey = lookup_keymap_table(vk_map, wParam);
if (mpkey)
- mplayer_put_key(vo->key_fifo, mpkey | mod_state(vo));
+ mp_input_put_key(vo->input_ctx, mpkey | mod_state(vo));
if (wParam == VK_F10)
return 0;
break;
@@ -211,7 +211,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
&& !key_state(vo, VK_RETURN))
code = code - 1 + (mods & MP_KEY_MODIFIER_SHIFT ? 'A' : 'a');
if (code >= 32 && code < (1<<21)) {
- mplayer_put_key(vo->key_fifo, code | mods);
+ mp_input_put_key(vo->input_ctx, code | mods);
// At least with Alt+char, not calling DefWindowProcW stops
// Windows from emitting a beep.
return 0;
@@ -266,7 +266,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0);
return 0;
}
- mplayer_put_key(vo->key_fifo, mouse_button);
+ mp_input_put_key(vo->input_ctx, mouse_button);
}
return DefWindowProcW(hWnd, message, wParam, lParam);
@@ -313,7 +313,7 @@ int vo_w32_check_events(struct vo *vo)
MoveWindow(w32->window, 0, 0, r.right, r.bottom, FALSE);
if (!IsWindow(WIN_ID_TO_HWND(vo->opts->WinID)))
// Window has probably been closed, e.g. due to program crash
- mplayer_put_key(vo->key_fifo, MP_KEY_CLOSE_WIN);
+ mp_input_put_key(vo->input_ctx, MP_KEY_CLOSE_WIN);
}
return w32->event_flags;
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 648f1d57eb..05d6af41cb 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -26,7 +26,7 @@
#include "core/bstr.h"
#include "core/options.h"
#include "core/mp_msg.h"
-#include "core/mp_fifo.h"
+#include "core/input/input.h"
#include "libavutil/common.h"
#include "x11_common.h"
#include "talloc.h"
@@ -639,7 +639,7 @@ void vo_x11_uninit(struct vo *vo)
struct vo_x11_state *x11 = vo->x11;
assert(x11);
- mplayer_put_key(vo->key_fifo, MP_INPUT_RELEASE_ALL);
+ mp_input_put_key(vo->input_ctx, MP_INPUT_RELEASE_ALL);
saver_on(x11);
if (x11->window != None)
@@ -730,17 +730,17 @@ int vo_x11_check_events(struct vo *vo)
sizeof(buf), &keySym, &status);
int mpkey = vo_x11_lookupkey(keySym);
if (mpkey) {
- mplayer_put_key(vo->key_fifo, mpkey | modifiers);
+ mp_input_put_key(vo->input_ctx, mpkey | modifiers);
} else if (status == XLookupChars || status == XLookupBoth) {
struct bstr t = { buf, len };
- mplayer_put_key_utf8(vo->key_fifo, modifiers, t);
+ mp_input_put_key_utf8(vo->input_ctx, modifiers, t);
}
} else {
XLookupString(&Event.xkey, buf, sizeof(buf), &keySym,
&x11->compose_status);
int mpkey = vo_x11_lookupkey(keySym);
if (mpkey)
- mplayer_put_key(vo->key_fifo, mpkey | modifiers);
+ mp_input_put_key(vo->input_ctx, mpkey | modifiers);
}
break;
}
@@ -750,24 +750,24 @@ int vo_x11_check_events(struct vo *vo)
case KeyRelease:
{
if (x11->no_autorepeat)
- mplayer_put_key(vo->key_fifo, MP_INPUT_RELEASE_ALL);
+ mp_input_put_key(vo->input_ctx, MP_INPUT_RELEASE_ALL);
break;
}
case MotionNotify:
vo_mouse_movement(vo, Event.xmotion.x, Event.xmotion.y);
break;
case LeaveNotify:
- mplayer_put_key(vo->key_fifo, MP_KEY_MOUSE_LEAVE);
+ mp_input_put_key(vo->input_ctx, MP_KEY_MOUSE_LEAVE);
break;
case ButtonPress:
- mplayer_put_key(vo->key_fifo,
- (MP_MOUSE_BTN0 + Event.xbutton.button - 1)
- | MP_KEY_STATE_DOWN);
+ mp_input_put_key(vo->input_ctx,
+ (MP_MOUSE_BTN0 + Event.xbutton.button - 1)
+ | MP_KEY_STATE_DOWN);
break;
case ButtonRelease:
- mplayer_put_key(vo->key_fifo,
- (MP_MOUSE_BTN0 + Event.xbutton.button - 1)
- | MP_KEY_STATE_UP);
+ mp_input_put_key(vo->input_ctx,
+ (MP_MOUSE_BTN0 + Event.xbutton.button - 1)
+ | MP_KEY_STATE_UP);
break;
case PropertyNotify: {
char *name = XGetAtomName(display, Event.xproperty.atom);
@@ -783,12 +783,12 @@ int vo_x11_check_events(struct vo *vo)
break;
case DestroyNotify:
mp_msg(MSGT_VO, MSGL_WARN, "Our window was destroyed, exiting\n");
- mplayer_put_key(vo->key_fifo, MP_KEY_CLOSE_WIN);
+ mp_input_put_key(vo->input_ctx, MP_KEY_CLOSE_WIN);
break;
case ClientMessage:
if (Event.xclient.message_type == x11->XAWM_PROTOCOLS &&
Event.xclient.data.l[0] == x11->XAWM_DELETE_WINDOW)
- mplayer_put_key(vo->key_fifo, MP_KEY_CLOSE_WIN);
+ mp_input_put_key(vo->input_ctx, MP_KEY_CLOSE_WIN);
break;
default:
if (Event.type == x11->ShmCompletionEvent) {