r3353: Changed hidden files code, now supports filtering by name.
[rox-filer.git] / ROX-Filer / src / display.h
blobbf45aa9958892b535e5ed8593fb90dd7c57645a2
1 /*
2 * ROX-Filer, filer for the ROX desktop project
3 * By Thomas Leonard, <tal197@users.sourceforge.net>.
4 */
6 #ifndef _DISPLAY_H
7 #define _DISPLAY_H
9 #define ROW_HEIGHT_LARGE 64
11 #include <gtk/gtk.h>
12 #include <sys/types.h>
13 #include <dirent.h>
15 typedef struct _ViewData ViewData;
17 struct _ViewData
19 PangoLayout *layout;
20 PangoLayout *details;
22 int name_width;
23 int name_height;
24 int details_width;
25 int details_height;
27 MaskedPixmap *image; /* Image; possibly thumbnail */
30 extern Option o_display_inherit_options, o_display_sort_by;
31 extern Option o_display_size, o_display_details, o_display_show_hidden;
32 extern Option o_display_show_headers;
33 extern Option o_display_show_thumbs;
34 extern Option o_small_width;
36 /* Prototypes */
37 void display_init(void);
38 void display_set_layout(FilerWindow *filer_window,
39 DisplayStyle style,
40 DetailsType details,
41 gboolean force_resize);
42 void display_set_hidden(FilerWindow *filer_window, gboolean hidden);
43 void display_update_hidden(FilerWindow *filer_window);
44 void display_set_filter(FilerWindow *filer_window, FilterType type,
45 const gchar *filter_string);
46 void display_set_thumbs(FilerWindow *filer_window, gboolean thumbs);
47 int sort_by_name(const void *item1, const void *item2);
48 int sort_by_type(const void *item1, const void *item2);
49 int sort_by_date(const void *item1, const void *item2);
50 int sort_by_size(const void *item1, const void *item2);
51 int sort_by_owner(const void *item1, const void *item2);
52 int sort_by_group(const void *item1, const void *item2);
53 void display_set_sort_type(FilerWindow *filer_window, SortType sort_type,
54 GtkSortType order);
55 void display_set_autoselect(FilerWindow *filer_window, const gchar *leaf);
57 void draw_large_icon(GdkWindow *window,
58 GdkRectangle *area,
59 DirItem *item,
60 MaskedPixmap *image,
61 gboolean selected);
62 gboolean display_is_truncated(FilerWindow *filer_window, int i);
63 void display_change_size(FilerWindow *filer_window, gboolean bigger);
65 ViewData *display_create_viewdata(FilerWindow *filer_window, DirItem *item);
66 void display_update_view(FilerWindow *filer_window,
67 DirItem *item,
68 ViewData *view,
69 gboolean update_name_layout);
70 void display_update_views(FilerWindow *filer_window);
71 void draw_small_icon(GdkWindow *window, GdkRectangle *area,
72 DirItem *item, MaskedPixmap *image, gboolean selected);
73 void draw_huge_icon(GdkWindow *window, GdkRectangle *area, DirItem *item,
74 MaskedPixmap *image, gboolean selected);
75 void display_set_actual_size(FilerWindow *filer_window, gboolean force_resize);
77 #endif /* _DISPLAY_H */