1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 06:42:03 +00:00
mpv/video
James Ross-Gowan 957e9a37db input: use mnemonic names for mouse buttons
mpv's mouse button numbering is based on X11 button numbering, which
allows for an arbitrary number of buttons and includes mouse wheel input
as buttons 3-6. This button numbering was used throughout the codebase
and exposed in input.conf, and it was difficult to remember which
physical button each number actually referred to and which referred to
the scroll wheel.

In practice, PC mice only have between two and five buttons and one or
two scroll wheel axes, which are more or less in the same location and
have more or less the same function. This allows us to use names to
refer to the buttons instead of numbers, which makes input.conf syntax a
lot easier to remember. It also makes the syntax robust to changes in
mpv's underlying numbering. The old MOUSE_BTNx names are still
understood as deprecated aliases of the named buttons.

This changes both the input.conf syntax and the MP_MOUSE_BTNx symbols in
the codebase, since I think both would benefit from using names over
numbers, especially since some platforms don't use X11 button numbering
and handle different mouse buttons in different windowing system events.

This also makes the names shorter, since otherwise they would be pretty
long, and it removes the high-numbered MOUSE_BTNx_DBL names, since they
weren't used.

Names are the same as used in Qt:
https://doc.qt.io/qt-5/qt.html#MouseButton-enum
2017-09-03 20:31:44 +10:00
..
decode vd_lavc: change auto-probe order to prefer cuda over vdpau-copy 2017-08-30 12:08:40 +02:00
filter mp_image: include config.h directly 2017-08-26 00:41:04 +10:00
out input: use mnemonic names for mouse buttons 2017-09-03 20:31:44 +10:00
csputils.c video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
csputils.h video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
fmt-conversion.c
fmt-conversion.h
gpu_memcpy.c
gpu_memcpy.h
hwdec.c
hwdec.h
image_loader.c
image_loader.h
image_writer.c
image_writer.h
img_format.c img_format: #if -> #ifdef 2017-08-16 11:15:52 +02:00
img_format.h vo_opengl: support float pixel formats 2017-08-15 17:00:35 +02:00
mp_image_pool.c Revert "mp_image_pool: disallow adding read only frames" 2017-08-08 16:16:55 +02:00
mp_image_pool.h
mp_image.c mp_image: include config.h directly 2017-08-26 00:41:04 +10:00
mp_image.h video: add metadata handling for spherical video 2017-08-21 14:56:07 +02:00
sws_utils.c video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
sws_utils.h video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
vaapi.c
vaapi.h
vdpau_functions.inc
vdpau_mixer.c video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
vdpau_mixer.h video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
vdpau.c vo_opengl: separate hwdec context and mapping, port it to use ra 2017-08-10 21:24:31 +02:00
vdpau.h
vt.c
vt.h