diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-19 12:20:00 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-19 12:20:00 +0000 |
| commit | 793c37923ebae5251ed55f7d55bc026b2e511fa0 (patch) | |
| tree | 599095b3ed4caa5a77d74dd1158d5d489114e9cf /selection.h | |
| parent | base64: implement encode() (diff) | |
selection: add text_from_clipboard()
This function reads data from the clipboard, and calls a user-provided
callback for each chunk of clipboard data.
Diffstat (limited to 'selection.h')
| -rw-r--r-- | selection.h | 4 |
1 files changed, 4 insertions, 0 deletions
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); |
