Simplify vflist_get_formatted()
[geeqie.git] / src / histogram.h
1 /*
2  * Copyright (C) 2008 - 2016 The Geeqie Team
3  *
4  * Author: Vladimir Nadvornik
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 HISTOGRAM_H
22 #define HISTOGRAM_H
23
24 /* Note: The order is important */
25 #define HCHAN_R 0
26 #define HCHAN_G 1
27 #define HCHAN_B 2
28 #define HCHAN_MAX 3
29 #define HCHAN_RGB 4
30 #define HCHAN_COUNT 5
31 #define HCHAN_DEFAULT HCHAN_RGB
32
33
34 Histogram *histogram_new(void);
35 void histogram_free(Histogram *histogram);
36 gint histogram_set_channel(Histogram *histogram, gint chan);
37 gint histogram_get_channel(Histogram *histogram);
38 gint histogram_set_mode(Histogram *histogram, gint mode);
39 gint histogram_get_mode(Histogram *histogram);
40 gint histogram_toggle_channel(Histogram *histogram);
41 gint histogram_toggle_mode(Histogram *histogram);
42 const gchar *histogram_label(Histogram *histogram);
43
44 void histmap_free(HistMap *histmap);
45
46 const HistMap *histmap_get(FileData *fd);
47 gboolean histmap_start_idle(FileData *fd);
48
49 gboolean histogram_draw(Histogram *histogram, const HistMap *histmap, GdkPixbuf *pixbuf, gint x, gint y, gint width, gint height);
50
51 void histogram_notify_cb(FileData *fd, NotifyType type, gpointer data);
52
53 #endif /* HISTOGRAM_H */
54 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */