3 * Copyright (C) 2010 Openismus GmbH
6 * Tristan Van Berkom <tristanvb@openismus.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
25 #error "Only <gtk/gtk.h> can be included directly."
28 #ifndef __GTK_CELL_AREA_H__
29 #define __GTK_CELL_AREA_H__
31 #include <gtk/gtkcellrenderer.h>
32 #include <gtk/gtkwidget.h>
36 #define GTK_TYPE_CELL_AREA (gtk_cell_area_get_type ())
37 #define GTK_CELL_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_AREA, GtkCellArea))
38 #define GTK_CELL_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_AREA, GtkCellAreaClass))
39 #define GTK_IS_CELL_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_AREA))
40 #define GTK_IS_CELL_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_AREA))
41 #define GTK_CELL_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_AREA, GtkCellAreaClass))
43 typedef struct _GtkCellArea GtkCellArea;
44 typedef struct _GtkCellAreaClass GtkCellAreaClass;
49 * @renderer: the cell renderer to operate on
50 * @data: user-supplied data
52 * The type of the callback functions used for iterating over
53 * the cell renderers of a #GtkCellArea, see gtk_cell_area_forall().
55 typedef void (*GtkCellCallback) (GtkCellRenderer *renderer,
60 * GtkCellAttributeCallback:
61 * @area: the #GtkCellArea containing @renderer
62 * @renderer: the #GtkCellRenderer that has an attribute
63 * @attribute: the property attributed to @id
64 * @id: the identifier of this attributed value
65 * @data: user-supplied data
67 * The type of the callback functions used for iterating over the
68 * attributes of the cell renderers in a #GtkCellArea,
69 * see gtk_cell_area_attribute_forall().
71 typedef void (*GtkCellAttributeCallback) (GtkCellArea *area,
72 GtkCellRenderer *renderer,
73 const gchar *attribute,
80 GInitiallyUnowned parent_instance;
84 struct _GtkCellAreaClass
86 GInitiallyUnownedClass parent_class;
88 /* vtable - not signals */
91 void (* add) (GtkCellArea *area,
92 GtkCellRenderer *renderer);
93 void (* remove) (GtkCellArea *area,
94 GtkCellRenderer *renderer);
95 void (* forall) (GtkCellArea *area,
96 GtkCellCallback callback,
97 gpointer callback_data);
98 gint (* event) (GtkCellArea *area,
101 const GdkRectangle *cell_area);
102 void (* render) (GtkCellArea *area,
105 const GdkRectangle *cell_area);
108 void (* attribute_connect) (GtkCellArea *area,
109 GtkCellRenderer *renderer,
110 const gchar *attribute,
112 void (* attribute_disconnect) (GtkCellArea *area,
113 GtkCellRenderer *renderer,
114 const gchar *attribute,
116 void (* attribute_apply) (GtkCellArea *area,
119 void (* attribute_forall) (GtkCellArea *area,
120 GtkCellRenderer *renderer,
121 GtkCellAttributeCallback callback,
125 GtkSizeRequestMode (* get_request_mode) (GtkCellArea *area);
126 void (* get_preferred_width) (GtkCellArea *area,
130 void (* get_preferred_height_for_width) (GtkCellArea *area,
133 gint *minimum_height,
134 gint *natural_height);
135 void (* get_preferred_height) (GtkCellArea *area,
139 void (* get_preferred_width_for_height) (GtkCellArea *area,
143 gint *natural_width);
146 /* Padding for future expansion */
147 void (*_gtk_reserved1) (void);
148 void (*_gtk_reserved2) (void);
149 void (*_gtk_reserved3) (void);
150 void (*_gtk_reserved4) (void);
151 void (*_gtk_reserved5) (void);
152 void (*_gtk_reserved6) (void);
153 void (*_gtk_reserved7) (void);
154 void (*_gtk_reserved8) (void);
157 GType gtk_cell_area_get_type (void) G_GNUC_CONST;
160 void gtk_cell_area_add (GtkCellArea *area,
161 GtkCellRenderer *renderer);
162 void gtk_cell_area_remove (GtkCellArea *area,
163 GtkCellRenderer *renderer);
164 void gtk_cell_area_forall (GtkCellArea *area,
165 GtkCellCallback callback,
166 gpointer callback_data);
167 gint gtk_cell_area_event (GtkCellArea *area,
170 const GdkRectangle *cell_area);
171 void gtk_cell_area_render (GtkCellArea *area,
174 const GdkRectangle *cell_area);
177 void gtk_cell_area_attribute_connect (GtkCellArea *area,
178 GtkCellRenderer *renderer,
179 const gchar *attribute,
181 void gtk_cell_area_attribute_disconnect (GtkCellArea *area,
182 GtkCellRenderer *renderer,
183 const gchar *attribute,
185 void gtk_cell_area_attribute_apply (GtkCellArea *area,
188 void gtk_cell_area_attribute_forall (GtkCellArea *area,
189 GtkCellRenderer *renderer,
190 GtkCellAttributeCallback callback,
194 GtkSizeRequestMode gtk_cell_area_get_request_mode (GtkCellArea *area);
195 void gtk_cell_area_get_preferred_width (GtkCellArea *area,
199 void gtk_cell_area_get_preferred_height_for_width (GtkCellArea *area,
202 gint *minimum_height,
203 gint *natural_height);
204 void gtk_cell_area_get_preferred_height (GtkCellArea *area,
208 void gtk_cell_area_get_preferred_width_for_height (GtkCellArea *area,
212 gint *natural_width);
217 #endif /* __GTK_CELL_AREA_H__ */