neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

terminal.h (720B)


      1 #pragma once
      2 
      3 #include <stdbool.h>
      4 #include <stddef.h>
      5 #include <stdint.h>
      6 
      7 #include "nvim/api/private/defs.h"  // IWYU pragma: keep
      8 #include "nvim/types_defs.h"  // IWYU pragma: keep
      9 
     10 typedef void (*terminal_write_cb)(const char *buffer, size_t size, void *data);
     11 typedef void (*terminal_resize_cb)(uint16_t width, uint16_t height, void *data);
     12 typedef void (*terminal_resume_cb)(void *data);
     13 typedef void (*terminal_close_cb)(void *data);
     14 
     15 typedef struct {
     16  void *data;  // PTY process channel
     17  uint16_t width, height;
     18  terminal_write_cb write_cb;
     19  terminal_resize_cb resize_cb;
     20  terminal_resume_cb resume_cb;
     21  terminal_close_cb close_cb;
     22  bool force_crlf;
     23 } TerminalOptions;
     24 
     25 #include "terminal.h.generated.h"