Simplify vflist_get_formatted()
[geeqie.git] / src / view_dir.h
1 /*
2  * Copyright (C) 2008 - 2016 The Geeqie Team
3  *
4  * Author: Laurent Monin
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20
21 #ifndef VIEW_DIR_H
22 #define VIEW_DIR_H
23
24 enum {
25         DIR_COLUMN_POINTER = 0,
26         DIR_COLUMN_ICON,
27         DIR_COLUMN_NAME,
28         DIR_COLUMN_COLOR,
29         DIR_COLUMN_DATE,
30         DIR_COLUMN_LINK,
31         DIR_COLUMN_COUNT
32 };
33
34 ViewDir *vd_new(LayoutWindow *lw);
35
36 void vd_set_select_func(ViewDir *vdl, void (*func)(ViewDir *vdl, FileData *fd, gpointer data), gpointer data);
37
38 void vd_set_layout(ViewDir *vdl, LayoutWindow *layout);
39
40 gboolean vd_set_fd(ViewDir *vdl, FileData *dir_fd);
41 void vd_refresh(ViewDir *vdl);
42 gboolean vd_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter);
43
44 const gchar *vd_row_get_path(ViewDir *vdl, gint row);
45
46 void vd_color_set(ViewDir *vd, FileData *fd, gint color_set);
47 void vd_popup_destroy_cb(GtkWidget *widget, gpointer data);
48
49 GtkWidget *vd_drop_menu(ViewDir *vd, gint active);
50 GtkWidget *vd_pop_menu(ViewDir *vd, FileData *fd);
51
52 void vd_new_folder(ViewDir *vd, FileData *dir_fd);
53
54 void vd_dnd_drop_scroll_cancel(ViewDir *vd);
55 void vd_dnd_init(ViewDir *vd);
56
57 void vd_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data);
58
59 void vd_activate_cb(GtkTreeView *tview, GtkTreePath *tpath, GtkTreeViewColumn *column, gpointer data);
60 void vd_color_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
61
62 gboolean vd_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data);
63 gboolean vd_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
64 gboolean vd_press_cb(GtkWidget *widget,  GdkEventButton *bevent, gpointer data);
65
66 #endif
67 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */