clang-tidy: modernize-redundant-void-arg
[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 struct FileData;
25 struct LayoutWindow;
26
27 enum {
28         DIR_COLUMN_POINTER = 0,
29         DIR_COLUMN_ICON,
30         DIR_COLUMN_NAME,
31         DIR_COLUMN_COLOR,
32         DIR_COLUMN_DATE,
33         DIR_COLUMN_LINK,
34         DIR_COLUMN_COUNT
35 };
36
37 struct PixmapFolders
38 {
39         GdkPixbuf *close;
40         GdkPixbuf *open;
41         GdkPixbuf *deny;
42         GdkPixbuf *parent;
43         GdkPixbuf *link;
44         GdkPixbuf *read_only;
45 };
46
47 struct ViewDir
48 {
49         DirViewType type;
50         gpointer info;
51
52         GtkWidget *widget;
53         GtkWidget *view;
54
55         FileData *dir_fd;
56
57         FileData *click_fd;
58
59         FileData *drop_fd;
60         GList *drop_list;
61         guint drop_scroll_id; /**< event source id */
62
63         /* func list */
64         void (*select_func)(ViewDir *vd, FileData *fd, gpointer data);
65         gpointer select_data;
66
67         void (*dnd_drop_update_func)(ViewDir *vd);
68         void (*dnd_drop_leave_func)(ViewDir *vd);
69
70         LayoutWindow *layout;
71
72         GtkWidget *popup;
73
74         PixmapFolders *pf;
75 };
76
77 ViewDir *vd_new(LayoutWindow *lw);
78
79 void vd_set_select_func(ViewDir *vdl, void (*func)(ViewDir *vdl, FileData *fd, gpointer data), gpointer data);
80
81 gboolean vd_set_fd(ViewDir *vdl, FileData *dir_fd);
82 void vd_refresh(ViewDir *vdl);
83 gboolean vd_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter);
84
85 void vd_color_set(ViewDir *vd, FileData *fd, gint color_set);
86 void vd_popup_destroy_cb(GtkWidget *widget, gpointer data);
87
88 GtkWidget *vd_drop_menu(ViewDir *vd, gint active);
89 GtkWidget *vd_pop_menu(ViewDir *vd, FileData *fd);
90
91 void vd_new_folder(ViewDir *vd, FileData *dir_fd);
92
93 void vd_dnd_drop_scroll_cancel(ViewDir *vd);
94 void vd_dnd_init(ViewDir *vd);
95
96 void vd_activate_cb(GtkTreeView *tview, GtkTreePath *tpath, GtkTreeViewColumn *column, gpointer data);
97 void vd_color_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
98
99 gboolean vd_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data);
100 gboolean vd_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
101 gboolean vd_press_cb(GtkWidget *widget,  GdkEventButton *bevent, gpointer data);
102
103 #endif
104 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */