Fix #1240: Regression: Option to open new full-function window directly is missing
[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 #include <gdk-pixbuf/gdk-pixbuf.h>
24 #include <glib-object.h>
25 #include <glib.h>
26 #include <gtk/gtk.h>
27 #include <pango/pango.h>
28
29 struct GQvCellRendererIcon;
30
31 #define TOGGLE_WIDTH 13
32 #define TOGGLE_SPACING 16
33
34
35 #define GQV_TYPE_CELL_RENDERER_ICON             (gqv_cell_renderer_icon_get_type())
36 #define GQV_CELL_RENDERER_ICON(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GQV_TYPE_CELL_RENDERER_ICON, GQvCellRendererIcon))
37 #define GQV_CELL_RENDERER_ICON_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GQV_TYPE_CELL_RENDERER_ICON, GQvCellRendererIconClass))
38 #define GQV_IS_CELL_RENDERER_ICON(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GQV_TYPE_CELL_RENDERER_ICON))
39 #define GQV_IS_CELL_RENDERER_ICON_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GQV_TYPE_CELL_RENDERER_ICON))
40 #define GQV_CELL_RENDERER_ICON_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GQV_TYPE_CELL_RENDERER_ICON, GQvCellRendererIconClass))
41
42 struct GQvCellRendererIcon
43 {
44         GtkCellRenderer parent;
45
46         /*< private >*/
47         GdkPixbuf *pixbuf;
48         gchar *text;
49         PangoColor foreground;
50         PangoColor background;
51         gboolean focused;
52
53         gint fixed_width;
54         gint fixed_height;
55
56         gboolean foreground_set;
57         gboolean background_set;
58
59         gint num_marks;
60
61         gboolean show_text;
62         gboolean show_marks;
63
64         guint marks;
65         guint toggled_mark;
66
67 };
68
69 struct GQvCellRendererIconClass
70 {
71         GtkCellRendererClass parent_class;
72
73         void (*toggled)(GQvCellRendererIcon *cell_renderer, const gchar *path);
74
75         /* Padding for future expansion */
76         void (*_gtk_reserved1)();
77         void (*_gtk_reserved2)();
78         void (*_gtk_reserved3)();
79         void (*_gtk_reserved4)();
80 };
81
82 GType            gqv_cell_renderer_icon_get_type();
83 GtkCellRenderer *gqv_cell_renderer_icon_new();
84
85 #endif /* __GQV_CELL_RENDERER_ICON_H__ */
86 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */