r137: Added Small Icons style. Show Hidden and mount points in / work again.
[rox-filer.git] / ROX-Filer / src / filer.h
blob077bc6c9cdb333221ddd68ae434c65371415ef30
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@ecs.soton.ac.uk>.
6 */
8 #ifndef _FILER_H
9 #define _FILER_H
11 #include <gtk/gtk.h>
12 #include "collection.h"
13 #include "pixmaps.h"
14 #include <sys/types.h>
15 #include <dirent.h>
16 #include "mount.h"
17 #include "dir.h"
19 extern GdkFont *fixed_font;
21 typedef struct _FilerWindow FilerWindow;
22 typedef enum {LEFT, RIGHT, TOP, BOTTOM} Side;
23 typedef enum {UNKNOWN_STYLE, LARGE_ICONS, SMALL_ICONS, FULL_INFO} DisplayStyle;
25 typedef enum
27 FILER_NEEDS_RESCAN = 0x01, /* Call may_rescan after scanning */
28 FILER_UPDATING = 0x02, /* (scanning) items may already exist */
29 } FilerFlags;
31 #include "type.h"
33 struct _FilerWindow
35 GtkWidget *window;
36 char *path; /* pathname */
37 Collection *collection;
38 gboolean panel;
39 gboolean temp_item_selected;
40 gboolean show_hidden;
41 FilerFlags flags;
42 Side panel_side;
43 time_t m_time; /* m-time at last scan */
44 int (*sort_fn)(const void *a, const void *b);
45 DisplayStyle display_style;
47 Directory *directory;
50 extern FilerWindow *window_with_focus;
51 extern GHashTable *child_to_filer;
53 /* Prototypes */
54 void filer_init();
55 void filer_opendir(char *path, gboolean panel, Side panel_side);
56 void update_dir(FilerWindow *filer_window);
57 void scan_dir(FilerWindow *filer_window);
58 DirItem *selected_item(Collection *collection);
59 void change_to_parent(FilerWindow *filer_window);
60 void filer_style_set(FilerWindow *filer_window, DisplayStyle style);
61 char *details(DirItem *item);
62 void filer_set_hidden(FilerWindow *filer_window, gboolean hidden);
64 #endif /* _FILER_H */