diff options
| -rw-r--r-- | elisp.c | 11 | ||||
| -rw-r--r-- | elisp.h | 3 | ||||
| -rw-r--r-- | vterm-module.c | 2 | ||||
| -rw-r--r-- | vterm-module.h | 10 |
4 files changed, 7 insertions, 19 deletions
@@ -109,14 +109,9 @@ void set_cursor_type(emacs_env *env, emacs_value QCursorType) { } -emacs_value get_hex_color_fg(emacs_env *env, emacs_value face) { - return env->funcall(env, Fvterm_face_color_hex, 2, - (emacs_value[]){face, Qforeground}); -} - -emacs_value get_hex_color_bg(emacs_env *env, emacs_value face) { - return env->funcall(env, Fvterm_face_color_hex, 2, - (emacs_value[]){face, Qbackground}); +emacs_value vterm_get_color(emacs_env *env, int index) { + emacs_value idx = env->make_integer(env, index); + return env->funcall(env, Fvterm_get_color, 1, (emacs_value[]){idx}); } void set_title(emacs_env *env, emacs_value string) { @@ -42,7 +42,6 @@ emacs_value Fpoint; emacs_value Fput_text_property; emacs_value Fset; -emacs_value Fvterm_face_color_hex; emacs_value Fvterm_flush_output; emacs_value Fget_buffer_window; emacs_value Fselected_window; @@ -66,8 +65,6 @@ void forward_line(emacs_env *env, int n); void goto_line(emacs_env *env, int n); void set_cursor_type(emacs_env *env, emacs_value cursor_type); void delete_lines(emacs_env *env, int linenum, int count, bool del_whole_line); -emacs_value get_hex_color_fg(emacs_env *env, emacs_value face); -emacs_value get_hex_color_bg(emacs_env *env, emacs_value face); emacs_value buffer_line_number(emacs_env *env); void recenter(emacs_env *env, emacs_value pos); void set_window_point(emacs_env *env, emacs_value win, emacs_value point); diff --git a/vterm-module.c b/vterm-module.c index f753280..45b97b3 100644 --- a/vterm-module.c +++ b/vterm-module.c @@ -749,8 +749,6 @@ int emacs_module_init(struct emacs_runtime *ert) { Fput_text_property = env->make_global_ref(env, env->intern(env, "put-text-property")); Fset = env->make_global_ref(env, env->intern(env, "set")); - Fvterm_face_color_hex = - env->make_global_ref(env, env->intern(env, "vterm--face-color-hex")); Fvterm_flush_output = env->make_global_ref(env, env->intern(env, "vterm--flush-output")); Fforward_line = env->make_global_ref(env, env->intern(env, "forward-line")); diff --git a/vterm-module.h b/vterm-module.h index 9ed1831..356a6dd 100644 --- a/vterm-module.h +++ b/vterm-module.h @@ -8,7 +8,6 @@ int plugin_is_GPL_compatible; - #define SB_MAX 100000 // Maximum 'scrollback' value. #ifndef MIN @@ -64,11 +63,10 @@ typedef struct Term { static bool compare_cells(VTermScreenCell *a, VTermScreenCell *b); static bool is_key(unsigned char *key, size_t len, char *key_description); -static emacs_value render_text(emacs_env *env, Term *term, char *string, int len, - VTermScreenCell *cell); -static emacs_value cell_to_face(emacs_env *env, Term *term, VTermScreenCell *cell); -static emacs_value color_to_face(emacs_env *env, VTermColor *color, emacs_value palette); -static emacs_value color_to_rgb_string(emacs_env *env, Term *term, VTermColor *color); +static emacs_value render_text(emacs_env *env, Term *term, char *string, + int len, VTermScreenCell *cell); +static emacs_value color_to_rgb_string(emacs_env *env, Term *term, + VTermColor *color); static int term_settermprop(VTermProp prop, VTermValue *val, void *user_data); |
