clang-tidy: misc-redundant-expression
[geeqie.git] / src / cellrenderericon.h
1 /*
2  * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
3  * Copyright (C) 2008 - 2016 The Geeqie Team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19
20 #ifndef __GQV_CELL_RENDERER_ICON_H__
21 #define __GQV_CELL_RENDERER_ICON_H__
22
23 #define TOGGLE_WIDTH 13
24 #define TOGGLE_SPACING 16
25
26
27 #define GQV_TYPE_CELL_RENDERER_ICON             (gqv_cell_renderer_icon_get_type())
28 #define GQV_CELL_RENDERER_ICON(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GQV_TYPE_CELL_RENDERER_ICON, GQvCellRendererIcon))
29 #define GQV_CELL_RENDERER_ICON_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GQV_TYPE_CELL_RENDERER_ICON, GQvCellRendererIconClass))
30 #define GQV_IS_CELL_RENDERER_ICON(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GQV_TYPE_CELL_RENDERER_ICON))
31 #define GQV_IS_CELL_RENDERER_ICON_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GQV_TYPE_CELL_RENDERER_ICON))
32 #define GQV_CELL_RENDERER_ICON_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GQV_TYPE_CELL_RENDERER_ICON, GQvCellRendererIconClass))
33
34 struct GQvCellRendererIcon
35 {
36         GtkCellRenderer parent;
37
38         /*< private >*/
39         GdkPixbuf *pixbuf;
40         gchar *text;
41         PangoColor foreground;
42         PangoColor background;
43         gboolean focused;
44
45         gint fixed_width;
46         gint fixed_height;
47
48         gboolean foreground_set;
49         gboolean background_set;
50
51         gint num_marks;
52
53         gboolean show_text;
54         gboolean show_marks;
55
56         guint marks;
57         guint toggled_mark;
58
59 };
60
61 struct GQvCellRendererIconClass
62 {
63         GtkCellRendererClass parent_class;
64
65         void (*toggled)(GQvCellRendererIcon *cell_renderer, const gchar *path);
66
67         /* Padding for future expansion */
68         void (*_gtk_reserved1)();
69         void (*_gtk_reserved2)();
70         void (*_gtk_reserved3)();
71         void (*_gtk_reserved4)();
72 };
73
74 GType            gqv_cell_renderer_icon_get_type();
75 GtkCellRenderer *gqv_cell_renderer_icon_new();
76
77 #endif /* __GQV_CELL_RENDERER_ICON_H__ */
78 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */