r1566: Do double buffering manually. This has no advantage at the moment, but
[rox-filer.git] / ROX-Filer / src / display.h
blob059361e5c03d3945dac76ce143c76b55f0d86c84
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@users.sourceforge.net>.
6 */
8 #ifndef _DISPLAY_H
9 #define _DISPLAY_H
11 #define ROW_HEIGHT_LARGE 64
13 #include <gtk/gtk.h>
14 #include <sys/types.h>
15 #include <dirent.h>
17 typedef struct _ViewData ViewData;
19 struct _ViewData
21 PangoLayout *layout;
22 PangoLayout *details;
24 int name_width;
25 int name_height;
26 int details_width;
27 int details_height;
29 MaskedPixmap *image; /* Image; possibly thumbnail */
32 extern Option o_display_inherit_options, o_display_sort_by;
33 extern Option o_display_size, o_display_details, o_display_show_hidden;
34 extern Option o_display_show_thumbs;
35 extern Option o_small_width;
37 /* Prototypes */
38 void display_init();
39 void display_set_layout(FilerWindow *filer_window,
40 DisplayStyle style,
41 DetailsType details);
42 void display_set_hidden(FilerWindow *filer_window, gboolean hidden);
43 void display_set_thumbs(FilerWindow *filer_window, gboolean thumbs);
44 int sort_by_name(const void *item1, const void *item2);
45 int sort_by_type(const void *item1, const void *item2);
46 int sort_by_date(const void *item1, const void *item2);
47 int sort_by_size(const void *item1, const void *item2);
48 void display_set_sort_fn(FilerWindow *filer_window,
49 int (*fn)(const void *a, const void *b));
50 void display_set_autoselect(FilerWindow *filer_window, const gchar *leaf);
52 void draw_large_icon(GtkWidget *widget,
53 GdkRectangle *area,
54 DirItem *item,
55 MaskedPixmap *image,
56 gboolean selected);
57 gboolean display_is_truncated(FilerWindow *filer_window, int i);
58 void display_change_size(FilerWindow *filer_window, gboolean bigger);
60 ViewData *display_create_viewdata(FilerWindow *filer_window, DirItem *item);
61 void display_update_view(FilerWindow *filer_window,
62 DirItem *item,
63 ViewData *view,
64 gboolean update_name_layout);
65 void display_update_views(FilerWindow *filer_window);
67 #endif /* _DISPLAY_H */