r345: Fixed a bug that prevented i18n from working.
[rox-filer/dt.git] / ROX-Filer / src / filer.h
blob419f6dfd28c21b478a9f181a55de2e529bad47b8
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@users.sourceforge.net>.
6 */
8 #ifndef _FILER_H
9 #define _FILER_H
11 #include <gtk/gtk.h>
12 #include "collection.h"
14 typedef enum {PANEL_NO, PANEL_TOP, PANEL_BOTTOM} PanelType;
16 typedef enum
18 OPEN_SHIFT = 0x01, /* Do ShiftOpen */
19 OPEN_SAME_WINDOW = 0x02, /* Directories open in same window */
20 OPEN_CLOSE_WINDOW = 0x04, /* Opening files closes the window */
21 OPEN_FROM_MINI = 0x08, /* Non-dir => close minibuffer */
22 } OpenFlags;
24 typedef enum
26 FILER_NEEDS_RESCAN = 0x01, /* Call may_rescan after scanning */
27 FILER_UPDATING = 0x02, /* (scanning) items may already exist */
28 } FilerFlags;
30 #include "mount.h"
31 #include "minibuffer.h"
32 #include "display.h"
34 struct _FilerWindow
36 GtkWidget *window;
37 gboolean scanning; /* State of the 'scanning' indicator */
38 guchar *path; /* pathname */
39 Collection *collection;
40 gboolean temp_item_selected;
41 gboolean show_hidden;
42 FilerFlags flags;
43 PanelType panel_type;
44 int (*sort_fn)(const void *a, const void *b);
46 DetailsType details_type;
47 DisplayStyle display_style;
49 Directory *directory;
51 gboolean had_cursor; /* (before changing directory) */
52 char *auto_select; /* If it we find while scanning */
54 GtkWidget *minibuffer_area; /* The hbox to show/hide */
55 GtkWidget *minibuffer_label; /* The operation name */
56 GtkWidget *minibuffer; /* The text entry */
57 int mini_cursor_base;
58 MiniType mini_type;
60 /* TRUE if hidden files are shown because the minibuffer leafname
61 * starts with a dot.
63 gboolean temp_show_hidden;
66 extern FilerWindow *window_with_focus;
67 extern GList *all_filer_windows;
68 extern GHashTable *child_to_filer;
69 extern gboolean o_unique_filer_windows;
70 extern gboolean o_single_click;
71 extern gboolean o_new_window_on_1;
73 /* Prototypes */
74 void filer_init(void);
75 FilerWindow *filer_opendir(char *path);
76 FilerWindow *filer_openpanel(char *path, PanelType panel_type);
77 void filer_update_dir(FilerWindow *filer_window, gboolean warning);
78 int selected_item_number(Collection *collection);
79 DirItem *selected_item(Collection *collection);
80 void change_to_parent(FilerWindow *filer_window);
81 void full_refresh(void);
82 void filer_openitem(FilerWindow *filer_window, int item_number,
83 OpenFlags flags);
84 void filer_check_mounted(char *path);
85 void filer_change_to(FilerWindow *filer_window, char *path, char *from);
86 gboolean filer_exists(FilerWindow *filer_window);
87 void filer_open_parent(FilerWindow *filer_window);
88 void filer_detach_rescan(FilerWindow *filer_window);
90 #endif /* _FILER_H */