From 793c37923ebae5251ed55f7d55bc026b2e511fa0 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 19 Jul 2019 14:20:00 +0200 Subject: selection: add text_from_clipboard() This function reads data from the clipboard, and calls a user-provided callback for each chunk of clipboard data. --- selection.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'selection.h') diff --git a/selection.h b/selection.h index a98a0327..8473dbfa 100644 --- a/selection.h +++ b/selection.h @@ -18,3 +18,7 @@ void selection_from_clipboard(struct terminal *term, uint32_t serial); void selection_from_primary(struct terminal *term); bool text_to_clipboard(struct terminal *term, char *text, uint32_t serial); +void text_from_clipboard( + struct terminal *term, uint32_t serial, + void (*cb)(const char *data, size_t size, void *user), + void *user); -- cgit v1.3