elisp.h (3721B)
1 #ifndef ELISP_H 2 #define ELISP_H 3 4 #include "emacs-module.h" 5 #include "vterm.h" 6 7 // Emacs symbols 8 extern emacs_value Qt; 9 extern emacs_value Qnil; 10 extern emacs_value Qnormal; 11 extern emacs_value Qbold; 12 extern emacs_value Qitalic; 13 extern emacs_value Qforeground; 14 extern emacs_value Qbackground; 15 extern emacs_value Qweight; 16 extern emacs_value Qunderline; 17 extern emacs_value Qslant; 18 extern emacs_value Qreverse; 19 extern emacs_value Qstrike; 20 extern emacs_value Qextend; 21 extern emacs_value Qface; 22 extern emacs_value Qbox; 23 extern emacs_value Qbar; 24 extern emacs_value Qhbar; 25 extern emacs_value Qcursor_type; 26 extern emacs_value Qemacs_major_version; 27 extern emacs_value Qvterm_line_wrap; 28 extern emacs_value Qrear_nonsticky; 29 extern emacs_value Qvterm_prompt; 30 31 // Emacs functions 32 extern emacs_value Fapply; 33 extern emacs_value Fblink_cursor_mode; 34 extern emacs_value Fsymbol_value; 35 extern emacs_value Flength; 36 extern emacs_value Flist; 37 extern emacs_value Fnth; 38 extern emacs_value Ferase_buffer; 39 extern emacs_value Finsert; 40 extern emacs_value Fgoto_char; 41 extern emacs_value Fforward_char; 42 extern emacs_value Fforward_line; 43 extern emacs_value Fgoto_line; 44 extern emacs_value Fdelete_lines; 45 extern emacs_value Frecenter; 46 extern emacs_value Fset_window_point; 47 extern emacs_value Fwindow_body_height; 48 extern emacs_value Fpoint; 49 50 extern emacs_value Fput_text_property; 51 extern emacs_value Fadd_text_properties; 52 extern emacs_value Fset; 53 extern emacs_value Fvterm_flush_output; 54 extern emacs_value Fget_buffer_window_list; 55 extern emacs_value Fselected_window; 56 extern emacs_value Fvterm_set_title; 57 extern emacs_value Fvterm_set_directory; 58 extern emacs_value Fvterm_invalidate; 59 extern emacs_value Feq; 60 extern emacs_value Fvterm_get_color; 61 extern emacs_value Fvterm_eval; 62 extern emacs_value Fvterm_set_selection; 63 64 // Utils 65 void bind_function(emacs_env *env, const char *name, emacs_value Sfun); 66 void provide(emacs_env *env, const char *feature); 67 emacs_value symbol_value(emacs_env *env, emacs_value symbol); 68 int string_bytes(emacs_env *env, emacs_value string); 69 emacs_value length(emacs_env *env, emacs_value string); 70 emacs_value list(emacs_env *env, emacs_value elements[], ptrdiff_t len); 71 emacs_value nth(emacs_env *env, int idx, emacs_value list); 72 void put_text_property(emacs_env *env, emacs_value string, emacs_value property, 73 emacs_value value); 74 void add_text_properties(emacs_env *env, emacs_value string, 75 emacs_value property); 76 void erase_buffer(emacs_env *env); 77 void insert(emacs_env *env, emacs_value string); 78 void goto_char(emacs_env *env, int pos); 79 void forward_line(emacs_env *env, int n); 80 void goto_line(emacs_env *env, int n); 81 void set_cursor_type(emacs_env *env, emacs_value cursor_type); 82 void set_cursor_blink(emacs_env *env, bool blink); 83 void delete_lines(emacs_env *env, int linenum, int count, bool del_whole_line); 84 void recenter(emacs_env *env, emacs_value pos); 85 void set_window_point(emacs_env *env, emacs_value win, emacs_value point); 86 emacs_value window_body_height(emacs_env *env, emacs_value win); 87 emacs_value point(emacs_env *env); 88 bool eq(emacs_env *env, emacs_value e1, emacs_value e2); 89 void forward_char(emacs_env *env, emacs_value n); 90 emacs_value get_buffer_window_list(emacs_env *env); 91 emacs_value selected_window(emacs_env *env); 92 void set_title(emacs_env *env, emacs_value string); 93 void set_directory(emacs_env *env, emacs_value string); 94 void vterm_invalidate(emacs_env *env); 95 emacs_value vterm_get_color(emacs_env *env, int index, emacs_value args); 96 emacs_value vterm_eval(emacs_env *env, emacs_value string); 97 emacs_value vterm_set_selection(emacs_env *env, emacs_value selection_target, 98 emacs_value selection_data); 99 100 #endif /* ELISP_H */