blob: b50dabe9ef180a203bf7c41460f598d080e71e3f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef SF_FM_H
#define SF_FM_H
#include <limits.h>
#include <linux/limits.h>
#include <ncurses.h>
#include "wm.h"
typedef struct {
char name[256];
int is_dir;
} file_item;
typedef struct {
file_item *items;
int count;
int cap;
} file_list;
typedef struct {
file_list *cur;
file_list *next;
int selected_idx;
window *fm_l, *fm_r;
int got_next_dir;
char got_dir[PATH_MAX];
char cwd[PATH_MAX];
int top, bottom, margin_bottom;
int needs_redraw;
} fm_info;
void fm_getdir(fm_info *i, file_list *l, const char *path);
fm_info *fm_init(terminal *t);
void fm_getcwd(fm_info *f);
void fm_draw_entries(fm_info *i, int n, int m);
void fm_entries_scrool(terminal *t, fm_info *i, int n);
void fm_draw_right_window(fm_info *i);
#endif /* SF_FM_H */
|