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