summaryrefslogtreecommitdiffstats
path: root/sub/find_subfiles.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-26 02:13:30 +0200
committerwm4 <wm4@nowhere>2013-06-29 22:58:13 +0200
commit5b38a522f17aa24d89b807846c2f76760923351f (patch)
tree44fc0bf235cb6df8e8bdf3a4dc19fdd616553081 /sub/find_subfiles.h
parentd4680aaecdc8711a878d973c74e223d49cdf9da3 (diff)
downloadmpv-5b38a522f17aa24d89b807846c2f76760923351f.tar.bz2
mpv-5b38a522f17aa24d89b807846c2f76760923351f.tar.xz
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.)
Diffstat (limited to 'sub/find_subfiles.h')
0 files changed, 0 insertions, 0 deletions