Remove unused RendererTiles::tile_cols
[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 #include <gdk-pixbuf/gdk-pixbuf.h>
25 #include <glib.h>
26
27 #include "typedefs.h"
28
29 struct FileData;
30 struct HistMap;
31
32 /* Note: The order is important */
33 #define HCHAN_R 0
34 #define HCHAN_G 1
35 #define HCHAN_B 2
36 #define HCHAN_MAX 3
37 #define HCHAN_RGB 4
38 #define HCHAN_COUNT 5
39 #define HCHAN_DEFAULT HCHAN_RGB
40
41 struct Histogram {
42         gint histogram_channel; /**< drawing mode for histogram */
43         gint histogram_mode;     /**< logarithmical or not */
44         guint vgrid; /**< number of vertical divisions, 0 for none */
45         guint hgrid; /**< number of horizontal divisions, 0 for none */
46         struct {
47                 int R; /**< red */
48                 int G; /**< green */
49                 int B; /**< blue */
50                 int A; /**< alpha */
51         } grid_color;  /**< grid color */
52 };
53
54
55 Histogram *histogram_new();
56 void histogram_free(Histogram *histogram);
57 gint histogram_set_channel(Histogram *histogram, gint chan);
58 gint histogram_get_channel(Histogram *histogram);
59 gint histogram_set_mode(Histogram *histogram, gint mode);
60 gint histogram_get_mode(Histogram *histogram);
61 gint histogram_toggle_channel(Histogram *histogram);
62 gint histogram_toggle_mode(Histogram *histogram);
63 const gchar *histogram_label(Histogram *histogram);
64
65 void histmap_free(HistMap *histmap);
66
67 const HistMap *histmap_get(FileData *fd);
68 gboolean histmap_start_idle(FileData *fd);
69
70 gboolean histogram_draw(Histogram *histogram, const HistMap *histmap, GdkPixbuf *pixbuf, gint x, gint y, gint width, gint height);
71
72 void histogram_notify_cb(FileData *fd, NotifyType type, gpointer data);
73
74 #endif /* HISTOGRAM_H */
75 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */