summaryrefslogtreecommitdiffstats
path: root/input/event.h
diff options
context:
space:
mode:
authorDavid Vaughan <david@davidv.xyz>2024-02-03 19:41:43 -0800
committerDudemanguy <random342@airmail.cc>2024-02-26 02:03:21 +0000
commita8a314b829498c55aed393d4bc7f4f7bf9e92362 (patch)
treec220248353f4a8c2f0feb74707bb4eb317653c14 /input/event.h
parent432256e5d2ccee8806023f03aea076f46d9cc9ea (diff)
downloadmpv-a8a314b829498c55aed393d4bc7f4f7bf9e92362.tar.bz2
mpv-a8a314b829498c55aed393d4bc7f4f7bf9e92362.tar.xz
input: add insert-next support for drag-and-drop
This commit adds a DND_INSERT_NEXT action option for drag-and-drop, allows for selecting it through the --drag-and-drop=insert-next option, and adds the necessary plumbing to make that happen when something is dragged onto the player.
Diffstat (limited to 'input/event.h')
-rw-r--r--input/event.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/input/event.h b/input/event.h
index 1e2149bb89..5f48bee00e 100644
--- a/input/event.h
+++ b/input/event.h
@@ -24,16 +24,17 @@ struct input_ctx;
enum mp_dnd_action {
DND_REPLACE,
DND_APPEND,
+ DND_INSERT_NEXT,
};
// Enqueue files for playback after drag and drop
void mp_event_drop_files(struct input_ctx *ictx, int num_files, char **files,
- enum mp_dnd_action append);
+ enum mp_dnd_action action);
// 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, enum mp_dnd_action append);
+ bstr data, enum mp_dnd_action action);
// Many drag & drop APIs support multiple mime types, and this function returns
// whether a type is preferred (higher integer score), or supported (scores