0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/video
wm4 5b38a522f1 input: handle mouse movement differently
Before this commit, mouse movement events emitted a special command
("set_mouse_pos"), which was specially handled in command.c. This was
once special-cased to the dvdnav and menu code, and did nothing after
libmenu and dvdnav were removed.

Change it so that mouse movement triggers a pseudo-key ("MOUSE_MOVE"),
which then can be bound to an arbitrary command. The mouse position is
now managed in input.c. A command which actually needs the mouse
position can use either mp_input_get_mouse_pos() or mp_get_osd_mouse_pos()
to query it. The former returns raw window-space coordinates, while the
latter returns coordinates transformed to OSD- space. (Both are the same
for most VOs, except vo_xv and vo_x11, which can't render OSD in
window-space. These require extra code for mapping mouse position.)

As of this commit, there is still nothing that uses mouse movement, so
MOUSE_MOVE is mapped to "ignore" to silence warnings when moving the
mouse (much like MOUSE_BTN0).

Extend the concept of input sections. Allow multiple sections to be
active at once, and organize them as stack. Bindings from the top of
the stack are preferred to lower ones.

Each section has a mouse input section associated, inside which mouse
events are associated with the bindings. If the mouse pointer is
outside of a section's mouse area, mouse events will be dispatched to
an input section lower on the stack of active sections. This is intended
for scripting, which is to be added later. Two scripts could occupy
different areas of the screen without conflicting with each other. (If
it turns out that this mechanism is useless, we'll just remove it
again.)
2013-06-29 22:58:13 +02:00
..
decode vo_opengl: handle chroma location 2013-06-28 21:20:41 +02:00
filter vo_opengl: handle chroma location 2013-06-28 21:20:41 +02:00
out input: handle mouse movement differently 2013-06-29 22:58:13 +02:00
csputils.c csputils.h: don't recursively include libavcodec header 2013-06-28 21:20:42 +02:00
csputils.h csputils.h: don't recursively include libavcodec header 2013-06-28 21:20:42 +02:00
fmt-conversion.c Fix compilation with Libav 2013-05-01 17:02:06 +02:00
fmt-conversion.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
image_writer.c image_writer: Add PNG filter option (default "mixed") 2013-06-15 15:48:52 +02:00
image_writer.h image_writer: Add PNG filter option (default "mixed") 2013-06-15 15:48:52 +02:00
img_format.c img_format: fix broken condition 2013-05-06 23:11:10 +02:00
img_format.h video: add XYZ support 2013-05-01 16:26:45 +02:00
img_fourcc.h core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
memcpy_pic.h vf_expand: support more image formats 2013-01-13 20:04:13 +01:00
mp_image_pool.c mp_image_pool: add pool to avoid frequent image reallocations 2013-01-13 17:39:32 +01:00
mp_image_pool.h mp_image_pool: add pool to avoid frequent image reallocations 2013-01-13 17:39:32 +01:00
mp_image.c csputils.h: don't recursively include libavcodec header 2013-06-28 21:20:42 +02:00
mp_image.h vo_opengl: handle chroma location 2013-06-28 21:20:41 +02:00
sws_utils.c sws_utils: use libswscale for GBRP output if available 2013-01-27 13:30:53 +01:00
sws_utils.h sub: reimplement -spugauss as --sub-gauss 2012-11-25 23:40:07 +01:00
vfcap.h core: simplify OSD capability handling, remove VFCAP_OSD 2013-03-01 11:16:01 +01:00