Update README to include recent changes to supported registers
[vis.git] / register.h
blobd66e5574e0be8c85bdc6b5141a8965b2aaba8cb4
1 #ifndef REGISTER_H
2 #define REGISTER_H
4 #include <stddef.h>
5 #include <stdbool.h>
6 #include "buffer.h"
7 #include "text-util.h"
9 #ifndef VIS_H
10 typedef struct Vis Vis;
11 #endif
13 typedef struct {
14 Buffer buf;
15 bool linewise; /* place register content on a new line when inserting? */
16 bool append;
17 enum {
18 REGISTER_NORMAL,
19 REGISTER_BLACKHOLE,
20 REGISTER_CLIPBOARD,
21 } type;
22 } Register;
24 void register_release(Register *reg);
25 const char *register_get(Vis*, Register*reg, size_t *len);
26 bool register_put(Vis*, Register *reg, const char *data, size_t len);
27 bool register_put_range(Vis*, Register *reg, Text *txt, Filerange *range);
28 bool register_append_range(Register *reg, Text *txt, Filerange *range);
30 #endif