Pull the search UI construction code out into a distinct function.
[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_COUNT
31 };
32
33 ViewDir *vd_new(DirViewType type, FileData *dir_fd);
34
35 void vd_set_select_func(ViewDir *vdl, void (*func)(ViewDir *vdl, FileData *fd, gpointer data), gpointer data);
36
37 void vd_set_layout(ViewDir *vdl, LayoutWindow *layout);
38
39 gboolean vd_set_fd(ViewDir *vdl, FileData *dir_fd);
40 void vd_refresh(ViewDir *vdl);
41 gboolean vd_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter);
42
43 const gchar *vd_row_get_path(ViewDir *vdl, gint row);
44
45 void vd_color_set(ViewDir *vd, FileData *fd, gint color_set);
46 void vd_popup_destroy_cb(GtkWidget *widget, gpointer data);
47
48 GtkWidget *vd_drop_menu(ViewDir *vd, gint active);
49 GtkWidget *vd_pop_menu(ViewDir *vd, FileData *fd);
50
51 void vd_new_folder(ViewDir *vd, FileData *dir_fd);
52
53 void vd_dnd_drop_scroll_cancel(ViewDir *vd);
54 void vd_dnd_init(ViewDir *vd);
55
56 void vd_menu_position_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data);
57
58 void vd_activate_cb(GtkTreeView *tview, GtkTreePath *tpath, GtkTreeViewColumn *column, gpointer data);
59 void vd_color_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
60
61 gboolean vd_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data);
62 gboolean vd_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
63 gboolean vd_press_cb(GtkWidget *widget,  GdkEventButton *bevent, gpointer data);
64
65 #endif
66 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */