diff options
| author | Lukas Fürmetz <fuermetz@mailbox.org> | 2017-07-03 19:53:01 +0200 |
|---|---|---|
| committer | Lukas Fürmetz <fuermetz@mailbox.org> | 2017-07-03 19:53:01 +0200 |
| commit | 08bcf37dc6fd456f0dd2547c7e67b31305f368bf (patch) | |
| tree | 3b6a2b3cab93eddffb1516907077873d3713e51a /vterm-module.h | |
| parent | 1d17969556566b51fc97ad7ca670ee55b987a725 (diff) | |
Split vterm.c into header and source
Diffstat (limited to 'vterm-module.h')
| -rw-r--r-- | vterm-module.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vterm-module.h b/vterm-module.h new file mode 100644 index 0000000..745052e --- /dev/null +++ b/vterm-module.h @@ -0,0 +1,36 @@ +#include <emacs-module.h> +#include <vterm.h> + +int plugin_is_GPL_compatible; + +struct Term { + VTerm *vt; + int masterfd; +}; + +static void bind_function(emacs_env *env, const char *name, emacs_value Sfun); +static void provide(emacs_env *env, const char *feature); +static void message(emacs_env *env, char *message); +static void message_value(emacs_env *env, emacs_value value); +static int string_bytes(emacs_env *env, emacs_value string); +static emacs_value string_length(emacs_env *env, emacs_value string); +static emacs_value list(emacs_env *env, emacs_value *elements, ptrdiff_t len); +static void put_text_property(emacs_env *env, emacs_value property, + emacs_value value, emacs_value string); +static void color_text(emacs_env *env, emacs_value string, emacs_value fg, + emacs_value bg); +static void byte_to_hex(uint8_t byte, char *hex); +static emacs_value color_to_rgb_string(emacs_env *env, VTermColor color); +static void erase_buffer(emacs_env *env); +static void insert(emacs_env *env, emacs_value string); +static void goto_char(emacs_env *env, int pos); + +static void vterm_redraw(VTerm *vt, emacs_env *env); +static void vterm_flush_output(struct Term *term); +static void term_finalize(void *term); +static emacs_value Fvterm_new(emacs_env *env, ptrdiff_t nargs, + emacs_value args[], void *data); +static void process_key(struct Term *term, char *key, VTermModifier modifier); +static emacs_value Fvterm_update(emacs_env *env, ptrdiff_t nargs, + emacs_value args[], void *data); +int emacs_module_init(struct emacs_runtime *ert); |
