r21: Files can now be copied by dragging them between filer windows.
[rox-filer.git] / ROX-Filer / src / filer.h
blobaec4b7d243aa7730c6b029ecb6458966136f6b40
1 /* vi: set cindent:
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 struct _FileItem FileItem;
20 enum
22 ITEM_FLAG_SYMLINK = 0x1, /* Is a symlink */
23 ITEM_FLAG_APPDIR = 0x2, /* Contains /AppInfo */
26 struct _FilerWindow
28 GtkWidget *window;
29 char *path; /* pathname */
30 Collection *collection;
32 /* Scanning */
33 DIR *dir;
34 gint idle_scan_id; /* (only if dir != NULL) */
37 struct _FileItem
39 char *leafname;
41 int base_type; /* (regular file, dir, pipe, etc) */
42 int flags;
44 int text_width;
45 int pix_width;
46 MaskedPixmap *image;
49 extern FilerWindow *window_with_focus;
50 extern GHashTable *child_to_filer;
52 /* Prototype */
53 void filer_init();
54 void filer_opendir(char *path);
55 void scan_dir(FilerWindow *filer_window);
57 #endif /* _FILER_H */