selection: add support for different mime-types

Add support for `text/plain`, `text/plain;charset=utf-8` and
`text/uri-list` to regular copy operations (both from clipboard and
primary selection) and drag-and-drop operations.
This commit is contained in:
Daniel Eklöf 2020-10-28 19:16:04 +01:00
parent cad0ae957d
commit be22fefdc7
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 329 additions and 90 deletions

View file

@ -67,12 +67,12 @@ bool text_to_primary(
*/
void text_from_clipboard(
struct seat *seat, struct terminal *term,
void (*cb)(const char *data, size_t size, void *user),
void (*cb)(char *data, size_t size, void *user),
void (*done)(void *user), void *user);
void text_from_primary(
struct seat *seat, struct terminal *term,
void (*cb)(const char *data, size_t size, void *user),
void (*cb)(char *data, size_t size, void *user),
void (*dont)(void *user), void *user);
void selection_start_scroll_timer(