diff options
| author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-03-25 22:08:14 -0300 |
|---|---|---|
| committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-03-25 22:08:14 -0300 |
| commit | a6e53a3797a93fe060f807fe2e4c6361854b6c97 (patch) | |
| tree | b684785ba9c769491e6ebdac8e21495cf22dbdd3 /src/nvim/terminal.h | |
| parent | d2d99454e63c0e6649fddd52bbd9a10d27c2e347 (diff) | |
| parent | 2aa2513b8e023a0d7bd2071299f0ea59a4d4ce25 (diff) | |
| download | rneovim-a6e53a3797a93fe060f807fe2e4c6361854b6c97.tar.gz rneovim-a6e53a3797a93fe060f807fe2e4c6361854b6c97.tar.bz2 rneovim-a6e53a3797a93fe060f807fe2e4c6361854b6c97.zip | |
Merge PR #2076 'Builtin terminal emulation'
Diffstat (limited to 'src/nvim/terminal.h')
| -rw-r--r-- | src/nvim/terminal.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/nvim/terminal.h b/src/nvim/terminal.h new file mode 100644 index 0000000000..6e0b062fbd --- /dev/null +++ b/src/nvim/terminal.h @@ -0,0 +1,33 @@ +#ifndef NVIM_TERMINAL_H +#define NVIM_TERMINAL_H + +#include <stddef.h> +#include <stdbool.h> +#include <stdint.h> + +typedef struct terminal Terminal; +typedef void (*terminal_write_cb)(char *buffer, size_t size, void *data); +typedef void (*terminal_resize_cb)(uint16_t width, uint16_t height, void *data); +typedef void (*terminal_close_cb)(void *data); + +typedef struct { + void *data; + uint16_t width, height; + terminal_write_cb write_cb; + terminal_resize_cb resize_cb; + terminal_close_cb close_cb; +} TerminalOptions; + +#define TERMINAL_OPTIONS_INIT ((TerminalOptions) { \ + .data = NULL, \ + .width = 80, \ + .height = 24, \ + .write_cb = NULL, \ + .resize_cb = NULL, \ + .close_cb = NULL \ + }) + +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "terminal.h.generated.h" +#endif +#endif // NVIM_TERMINAL_H |
