1
/*
2
 * Copyright 2008-2011 Various Authors
3
 * Copyright 2004 Timo Hirvonen
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License as
7
 * published by the Free Software Foundation; either version 2 of the
8
 * License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful, but
11
 * WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 * General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17
 */
18
19
#ifndef _BROWSER_H
20
#define _BROWSER_H
21
22
#include "list.h"
23
#include "window.h"
24
#include "search.h"
25
26
struct browser_entry {
27
	struct list_head node;
28
29
	enum { BROWSER_ENTRY_DIR, BROWSER_ENTRY_FILE, BROWSER_ENTRY_PLLINE } type;
30
	char name[];
31
};
32
33
static inline struct browser_entry *iter_to_browser_entry(struct iter *iter)
34
{
35
	return iter->data1;
36
}
37
38
extern struct window *browser_win;
39
extern char *browser_dir;
40
extern struct searchable *browser_searchable;
41
42
void browser_init(void);
43
void browser_exit(void);
44
int browser_chdir(const char *dir);
45
char *browser_get_sel(void);
46
void browser_up(void);
47
void browser_enter(void);
48
void browser_delete(void);
49
void browser_reload(void);
50
void browser_toggle_show_hidden(void);
51
52
#endif