2019-07-11 09:51:51 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2019-08-05 19:02:27 +02:00
|
|
|
#include <stdbool.h>
|
2019-07-11 12:16:50 +02:00
|
|
|
#include <wayland-client.h>
|
|
|
|
|
|
2019-07-11 09:51:51 +02:00
|
|
|
#include "terminal.h"
|
|
|
|
|
|
2019-07-11 12:16:50 +02:00
|
|
|
extern const struct wl_data_device_listener data_device_listener;
|
2019-07-11 17:02:21 +02:00
|
|
|
extern const struct zwp_primary_selection_device_v1_listener primary_selection_device_listener;
|
2019-07-11 12:16:50 +02:00
|
|
|
|
2019-08-09 21:26:34 +02:00
|
|
|
bool selection_enabled(const struct terminal *term);
|
2019-07-11 09:51:51 +02:00
|
|
|
void selection_start(struct terminal *term, int col, int row);
|
|
|
|
|
void selection_update(struct terminal *term, int col, int row);
|
2019-07-11 17:34:52 +02:00
|
|
|
void selection_finalize(struct terminal *term, uint32_t serial);
|
2019-07-11 09:51:51 +02:00
|
|
|
void selection_cancel(struct terminal *term);
|
2019-08-09 21:27:51 +02:00
|
|
|
|
|
|
|
|
bool selection_on_row_in_view(const struct terminal *term, int row_no);
|
|
|
|
|
|
2019-08-05 19:02:27 +02:00
|
|
|
void selection_mark_word(struct terminal *term, int col, int row,
|
|
|
|
|
bool spaces_only, uint32_t serial);
|
2019-08-06 19:32:06 +02:00
|
|
|
void selection_mark_row(struct terminal *term, int row, uint32_t serial);
|
2019-07-11 12:33:31 +02:00
|
|
|
|
2019-07-11 12:16:50 +02:00
|
|
|
void selection_to_clipboard(struct terminal *term, uint32_t serial);
|
2019-07-11 12:33:31 +02:00
|
|
|
void selection_from_clipboard(struct terminal *term, uint32_t serial);
|
2019-08-09 21:27:51 +02:00
|
|
|
void selection_to_primary(struct terminal *term, uint32_t serial);
|
2019-07-11 16:42:59 +02:00
|
|
|
void selection_from_primary(struct terminal *term);
|
2019-07-19 11:12:14 +02:00
|
|
|
|
|
|
|
|
bool text_to_clipboard(struct terminal *term, char *text, uint32_t serial);
|
2019-07-19 14:20:00 +02:00
|
|
|
void text_from_clipboard(
|
|
|
|
|
struct terminal *term, uint32_t serial,
|
|
|
|
|
void (*cb)(const char *data, size_t size, void *user),
|
2019-11-05 08:49:32 +01:00
|
|
|
void (*done)(void *user), void *user);
|
2019-08-09 21:27:51 +02:00
|
|
|
|
|
|
|
|
bool text_to_primary(struct terminal *term, char *text, uint32_t serial);
|
|
|
|
|
void text_from_primary(
|
2019-11-05 08:49:32 +01:00
|
|
|
struct terminal *term,
|
|
|
|
|
void (*cb)(const char *data, size_t size, void *user),
|
|
|
|
|
void (*dont)(void *user), void *user);
|