diff options
Diffstat (limited to 'examples/dte/copy.h')
| -rw-r--r-- | examples/dte/copy.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/dte/copy.h b/examples/dte/copy.h new file mode 100644 index 0000000..2281b09 --- /dev/null +++ b/examples/dte/copy.h @@ -0,0 +1,26 @@ +#ifndef COPY_H +#define COPY_H + +#include <stdbool.h> +#include <stddef.h> +#include "util/macros.h" +#include "view.h" + +typedef struct { + char *buf; + size_t len; + bool is_lines; +} Clipboard; + +typedef enum { + PASTE_LINES_BELOW_CURSOR, + PASTE_LINES_ABOVE_CURSOR, + PASTE_LINES_INLINE, +} PasteLinesType; + +void record_copy(Clipboard *clip, char *buf, size_t len, bool is_lines); +void copy(Clipboard *clip, View *view, size_t len, bool is_lines); +void cut(Clipboard *clip, View *view, size_t len, bool is_lines); +void paste(Clipboard *clip, View *view, PasteLinesType type, bool move_after); + +#endif |
