Simplify vflist_get_formatted()
[geeqie.git] / src / view_file.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_FILE_H
22 #define VIEW_FILE_H
23
24 #define VFLIST(_vf_) ((ViewFileInfoList *)(_vf_->info))
25 #define VFICON(_vf_) ((ViewFileInfoIcon *)(_vf_->info))
26
27 void vf_send_update(ViewFile *vf);
28
29 ViewFile *vf_new(FileViewType type, FileData *dir_fd);
30
31 void vf_set_status_func(ViewFile *vf, void (*func)(ViewFile *vf, gpointer data), gpointer data);
32 void vf_set_thumb_status_func(ViewFile *vf, void (*func)(ViewFile *vf, gdouble val, const gchar *text, gpointer data), gpointer data);
33
34 void vf_set_layout(ViewFile *vf, LayoutWindow *layout);
35
36 gboolean vf_set_fd(ViewFile *vf, FileData *fd);
37 gboolean vf_refresh(ViewFile *vf);
38 void vf_refresh_idle(ViewFile *vf);
39
40 void vf_thumb_set(ViewFile *vf, gboolean enable);
41 void vf_marks_set(ViewFile *vf, gboolean enable);
42 void vf_star_rating_set(ViewFile *vf, gboolean enable);
43 void vf_sort_set(ViewFile *vf, SortType type, gboolean ascend);
44
45 guint vf_marks_get_filter(ViewFile *vf);
46 void vf_mark_filter_toggle(ViewFile *vf, gint mark);
47
48 guint vf_class_get_filter(ViewFile *vf);
49
50 GList *vf_selection_get_one(ViewFile *vf, FileData *fd);
51 GList *vf_pop_menu_file_list(ViewFile *vf);
52 GtkWidget *vf_pop_menu(ViewFile *vf);
53
54 FileData *vf_index_get_data(ViewFile *vf, gint row);
55 gint vf_index_by_fd(ViewFile *vf, FileData *in_fd);
56 guint vf_count(ViewFile *vf, gint64 *bytes);
57 GList *vf_get_list(ViewFile *vf);
58
59 guint vf_selection_count(ViewFile *vf, gint64 *bytes);
60 GList *vf_selection_get_list(ViewFile *vf);
61 GList *vf_selection_get_list_by_index(ViewFile *vf);
62
63 void vf_select_all(ViewFile *vf);
64 void vf_select_none(ViewFile *vf);
65 void vf_select_invert(ViewFile *vf);
66 void vf_select_by_fd(ViewFile *vf, FileData *fd);
67 void vf_select_list(ViewFile *vf, GList *list);
68
69 void vf_mark_to_selection(ViewFile *vf, gint mark, MarkToSelectionMode mode);
70 void vf_selection_to_mark(ViewFile *vf, gint mark, SelectionToMarkMode mode);
71
72 void vf_refresh_idle_cancel(ViewFile *vf);
73 void vf_notify_cb(FileData *fd, NotifyType type, gpointer data);
74
75 void vf_thumb_update(ViewFile *vf);
76 void vf_thumb_cleanup(ViewFile *vf);
77 void vf_thumb_stop(ViewFile *vf);
78 void vf_read_metadata_in_idle(ViewFile *vf);
79 void vf_file_filter_set(ViewFile *vf, gboolean enable);
80 GRegex *vf_file_filter_get_filter(ViewFile *vf);
81
82 void vf_star_update(ViewFile *vf);
83 gboolean vf_stars_cb(gpointer data);
84 void vf_star_stop(ViewFile *vf);
85 void vf_star_cleanup(ViewFile *vf);
86
87 #endif /* VIEW_FILE_H */
88 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */