r328: Changed the install script so that the CVS directories don't get installed.
[rox-filer.git] / ROX-Filer / src / filer.h
blob4374c0e422a255bb744d05f509e74285fa710894
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>
17 typedef struct _FilerWindow FilerWindow;
18 typedef enum {PANEL_NO, PANEL_TOP, PANEL_BOTTOM} PanelType;
20 typedef enum
22 OPEN_SHIFT = 0x01, /* Do ShiftOpen */
23 OPEN_SAME_WINDOW = 0x02, /* Directories open in same window */
24 OPEN_CLOSE_WINDOW = 0x04, /* Opening files closes the window */
25 OPEN_FROM_MINI = 0x08, /* Non-dir => close minibuffer */
26 } OpenFlags;
28 typedef enum
30 FILER_NEEDS_RESCAN = 0x01, /* Call may_rescan after scanning */
31 FILER_UPDATING = 0x02, /* (scanning) items may already exist */
32 } FilerFlags;
34 #include "mount.h"
35 #include "minibuffer.h"
36 #include "dir.h"
37 #include "type.h"
38 #include "display.h"
40 struct _FilerWindow
42 GtkWidget *window;
43 gboolean scanning; /* State of the 'scanning' indicator */
44 char *path; /* pathname */
45 Collection *collection;
46 gboolean temp_item_selected;
47 gboolean show_hidden;
48 FilerFlags flags;
49 PanelType panel_type;
50 int (*sort_fn)(const void *a, const void *b);
52 DetailsType details_type;
53 DisplayStyle display_style;
55 Directory *directory;
57 gboolean had_cursor; /* (before changing directory) */
58 char *auto_select; /* If it we find while scanning */
60 GtkWidget *minibuffer_area; /* The hbox to show/hide */
61 GtkWidget *minibuffer_label; /* The operation name */
62 GtkWidget *minibuffer; /* The text entry */
63 int mini_cursor_base;
64 MiniType mini_type;
66 /* TRUE if hidden files are shown because the minibuffer leafname
67 * starts with a dot.
69 gboolean temp_show_hidden;
72 extern FilerWindow *window_with_focus;
73 extern GList *all_filer_windows;
74 extern GHashTable *child_to_filer;
75 extern gboolean o_unique_filer_windows;
77 /* Prototypes */
78 void filer_init();
79 FilerWindow *filer_opendir(char *path, PanelType panel_type);
80 void filer_update_dir(FilerWindow *filer_window, gboolean warning);
81 int selected_item_number(Collection *collection);
82 DirItem *selected_item(Collection *collection);
83 void change_to_parent(FilerWindow *filer_window);
84 void full_refresh(void);
85 void filer_openitem(FilerWindow *filer_window, int item_number,
86 OpenFlags flags);
87 void filer_check_mounted(char *path);
88 void filer_change_to(FilerWindow *filer_window, char *path, char *from);
89 gboolean filer_exists(FilerWindow *filer_window);
90 void filer_open_parent(FilerWindow *filer_window);
91 void filer_detach_rescan(FilerWindow *filer_window);
93 #endif /* _FILER_H */