Implement system clipboard registers "* and "+
[vis.git] / register.h
blobd3f7b7fc29cc8c20addda860a3d16fe0e3fb745e
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 enum {
17 REGISTER_NORMAL,
18 REGISTER_BLACKHOLE,
19 REGISTER_CLIPBOARD,
20 } type;
21 } Register;
23 void register_release(Register *reg);
24 const char *register_get(Vis*, Register*reg, size_t *len);
25 bool register_put(Vis*, Register *reg, Text *txt, Filerange *range);
26 bool register_append(Register *reg, Text *txt, Filerange *range);
28 #endif