summaryrefslogtreecommitdiffstats
path: root/input/event.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-04 19:32:09 +0100
committerwm4 <wm4@nowhere>2014-01-04 19:33:40 +0100
commit7c6bb321eb0542c474e5147558fb71ecf2d44bd4 (patch)
tree82a8d90b9bbc0f33b390d95ca78d5d0a24c64405 /input/event.h
parent6534839154b9644a0019baf155f9bda542aa6e75 (diff)
downloadmpv-7c6bb321eb0542c474e5147558fb71ecf2d44bd4.tar.bz2
mpv-7c6bb321eb0542c474e5147558fb71ecf2d44bd4.tar.xz
video/out: remove some code duplication between X11 and wayland
Both X11 and Wayland support the same format for drag & drop operations (text/uri-list), and the code for that was copied from x11_common.c to wayland_common.c. Factor it out.
Diffstat (limited to 'input/event.h')
-rw-r--r--input/event.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/input/event.h b/input/event.h
index 38aae3ceb2..820932d9da 100644
--- a/input/event.h
+++ b/input/event.h
@@ -15,7 +15,14 @@
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "bstr/bstr.h"
+
struct input_ctx;
// Enqueue files for playback after drag and drop
void mp_event_drop_files(struct input_ctx *ictx, int num_files, char **files);
+
+// Drop data in a specific format (identified by the mimetype).
+// Returns <0 on error, ==0 if data was ok but empty, >0 on success.
+int mp_event_drop_mime_data(struct input_ctx *ictx, const char *mime_type,
+ bstr data);