Add some wrappers in view_dir.c and simplify even more.
[geeqie.git] / src / view_dir.h
1 /*
2  * Geeqie
3  * (C) 2008 Vladimir Nadvornik
4  *
5  * Author: Laurent Monin
6  *
7  * This software is released under the GNU General Public License (GNU GPL).
8  * Please read the included file COPYING for more information.
9  * This software comes with no warranty of any kind, use at your own risk!
10  */
11
12 #ifndef VIEW_DIR_H
13 #define VIEW_DIR_H
14
15 enum {
16         DIR_COLUMN_POINTER = 0,
17         DIR_COLUMN_ICON,
18         DIR_COLUMN_NAME,
19         DIR_COLUMN_COLOR,
20         DIR_COLUMN_COUNT
21 };
22
23 extern GtkRadioActionEntry menu_view_dir_radio_entries[2];
24
25 ViewDir *vd_new(DirViewType type, const gchar *path);
26
27 void vd_set_select_func(ViewDir *vdl, void (*func)(ViewDir *vdl, const gchar *path, gpointer data), gpointer data);
28
29 void vd_set_layout(ViewDir *vdl, LayoutWindow *layout);
30
31 gint vd_set_path(ViewDir *vdl, const gchar *path);
32 void vd_refresh(ViewDir *vdl);
33 gint vd_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter);
34
35 const gchar *vd_row_get_path(ViewDir *vdl, gint row);
36
37 void vd_color_set(ViewDir *vd, FileData *fd, gint color_set);
38 void vd_popup_destroy_cb(GtkWidget *widget, gpointer data);
39
40 GtkWidget *vd_drop_menu(ViewDir *vd, gint active);
41 GtkWidget *vd_pop_menu(ViewDir *vd, FileData *fd);
42
43 void vd_dnd_drop_scroll_cancel(ViewDir *vd);
44 void vd_dnd_init(ViewDir *vd);
45
46 void vd_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data);
47
48 void vd_activate_cb(GtkTreeView *tview, GtkTreePath *tpath, GtkTreeViewColumn *column, gpointer data);
49 void vd_color_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
50
51 gint vd_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data);
52 gint vd_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
53 gint vd_press_cb(GtkWidget *widget,  GdkEventButton *bevent, gpointer data);
54
55 #endif
56
57