fe
terminal file explorer and picker
git clone https://9o.is/git/fe.git
tty_interface.h
(1978B)
1 #ifndef TTY_INTERFACE_H
2 #define TTY_INTERFACE_H TTY_INTERFACE_H
3
4 #include "entries.h"
5 #include "options.h"
6 #include "tty.h"
7
8 typedef struct tty_interface {
9 tty_t *tty;
10 entries_t *entries;
11 options_t *options;
12 int ambiguous_key_pending;
13 char input[32];
14 int exit;
15 char copy_buffer[PATH_MAX];
16 int has_copied;
17 int is_cut; /* 0 = copy, 1 = cut */
18 } tty_interface_t;
19
20 void tty_interface_init(tty_interface_t *state, tty_t *tty, entries_t *entries, options_t *options);
21 int tty_interface_run(tty_interface_t *state);
22
23 void action_ignore(tty_interface_t *state, const char *argv);
24 void action_select(tty_interface_t *state, const char *argv);
25 void action_reload(tty_interface_t *state, const char *argv);
26 void action_parent(tty_interface_t *state, const char *argv);
27 void action_prev(tty_interface_t *state, const char *argv);
28 void action_next(tty_interface_t *state, const char *argv);
29 void action_halfpageup(tty_interface_t *state, const char *argv);
30 void action_halfpagedown(tty_interface_t *state, const char *argv);
31 void action_pageup(tty_interface_t *state, const char *argv);
32 void action_pagedown(tty_interface_t *state, const char *argv);
33 void action_first(tty_interface_t *state, const char *argv);
34 void action_last(tty_interface_t *state, const char *argv);
35 void action_home(tty_interface_t *state, const char *argv);
36 void action_togglehidden(tty_interface_t *state, const char *argv);
37 void action_run(tty_interface_t *state, const char *argv);
38 void action_setpath(tty_interface_t *state, const char *argv);
39 void action_remove(tty_interface_t *state, const char *argv);
40 void action_create(tty_interface_t *state, const char *argv);
41 void action_mkdir(tty_interface_t *state, const char *argv);
42 void action_copy(tty_interface_t *state, const char *argv);
43 void action_cut(tty_interface_t *state, const char *argv);
44 void action_paste(tty_interface_t *state, const char *argv);
45 void action_exit(tty_interface_t *state, const char *argv);
46
47 #endif