4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@ecs.soton.ac.uk>.
12 #include "collection.h"
14 #include <sys/types.h>
17 typedef struct _FilerWindow FilerWindow
;
18 typedef enum {PANEL_NO
, PANEL_TOP
, PANEL_BOTTOM
} PanelType
;
30 OPEN_SHIFT
= 0x01, /* Do ShiftOpen */
31 OPEN_SAME_WINDOW
= 0x02, /* Directories open in same window */
32 OPEN_CLOSE_WINDOW
= 0x04, /* Opening files closes the window */
33 OPEN_FROM_MINI
= 0x08, /* Non-dir => close minibuffer */
38 FILER_NEEDS_RESCAN
= 0x01, /* Call may_rescan after scanning */
39 FILER_UPDATING
= 0x02, /* (scanning) items may already exist */
43 #include "minibuffer.h"
50 gboolean scanning
; /* State of the 'scanning' indicator */
51 char *path
; /* pathname */
52 Collection
*collection
;
53 gboolean temp_item_selected
;
57 int (*sort_fn
)(const void *a
, const void *b
);
59 DisplayStyle display_style
;
63 gboolean had_cursor
; /* (before changing directory) */
64 char *auto_select
; /* If it we find while scanning */
66 GtkWidget
*minibuffer_area
; /* The hbox to show/hide */
67 GtkWidget
*minibuffer_label
; /* The operation name */
68 GtkWidget
*minibuffer
; /* The text entry */
73 extern FilerWindow
*window_with_focus
;
74 extern GHashTable
*child_to_filer
;
75 extern gboolean o_unique_filer_windows
;
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 filer_style_set(FilerWindow
*filer_window
, DisplayStyle style
);
85 char *details(DirItem
*item
);
86 void filer_set_hidden(FilerWindow
*filer_window
, gboolean hidden
);
87 int sort_by_name(const void *item1
, const void *item2
);
88 int sort_by_type(const void *item1
, const void *item2
);
89 int sort_by_date(const void *item1
, const void *item2
);
90 int sort_by_size(const void *item1
, const void *item2
);
91 void filer_set_sort_fn(FilerWindow
*filer_window
,
92 int (*fn
)(const void *a
, const void *b
));
93 void full_refresh(void);
94 void filer_openitem(FilerWindow
*filer_window
, int item_number
,
96 void filer_check_mounted(char *path
);
97 void filer_change_to(FilerWindow
*filer_window
, char *path
, char *from
);
98 void filer_set_autoselect(FilerWindow
*filer_window
, guchar
*leaf
);
99 gboolean
filer_exists(FilerWindow
*filer_window
);
100 void filer_open_parent(FilerWindow
*filer_window
);
102 #endif /* _FILER_H */