2 * Copyright (C) 2003 Kristian Rietveld <kris@gtk.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
21 #error "Only <gtk/gtk.h> can be included directly."
24 #ifndef __GTK_CELL_LAYOUT_H__
25 #define __GTK_CELL_LAYOUT_H__
27 #include <gtk/gtkcellrenderer.h>
28 #include <gtk/gtkcellarea.h>
29 #include <gtk/gtktreeviewcolumn.h>
30 #include <gtk/gtkbuildable.h>
31 #include <gtk/gtkbuilder.h>
35 #define GTK_TYPE_CELL_LAYOUT (gtk_cell_layout_get_type ())
36 #define GTK_CELL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayout))
37 #define GTK_IS_CELL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_LAYOUT))
38 #define GTK_CELL_LAYOUT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayoutIface))
40 typedef struct _GtkCellLayout GtkCellLayout; /* dummy typedef */
41 typedef struct _GtkCellLayoutIface GtkCellLayoutIface;
43 /* keep in sync with GtkTreeCellDataFunc */
44 typedef void (* GtkCellLayoutDataFunc) (GtkCellLayout *cell_layout,
45 GtkCellRenderer *cell,
46 GtkTreeModel *tree_model,
50 struct _GtkCellLayoutIface
52 GTypeInterface g_iface;
55 void (* pack_start) (GtkCellLayout *cell_layout,
56 GtkCellRenderer *cell,
58 void (* pack_end) (GtkCellLayout *cell_layout,
59 GtkCellRenderer *cell,
61 void (* clear) (GtkCellLayout *cell_layout);
62 void (* add_attribute) (GtkCellLayout *cell_layout,
63 GtkCellRenderer *cell,
64 const gchar *attribute,
66 void (* set_cell_data_func) (GtkCellLayout *cell_layout,
67 GtkCellRenderer *cell,
68 GtkCellLayoutDataFunc func,
70 GDestroyNotify destroy);
71 void (* clear_attributes) (GtkCellLayout *cell_layout,
72 GtkCellRenderer *cell);
73 void (* reorder) (GtkCellLayout *cell_layout,
74 GtkCellRenderer *cell,
76 GList* (* get_cells) (GtkCellLayout *cell_layout);
78 GtkCellArea *(* get_area) (GtkCellLayout *cell_layout);
81 GType gtk_cell_layout_get_type (void) G_GNUC_CONST;
82 void gtk_cell_layout_pack_start (GtkCellLayout *cell_layout,
83 GtkCellRenderer *cell,
85 void gtk_cell_layout_pack_end (GtkCellLayout *cell_layout,
86 GtkCellRenderer *cell,
88 GList *gtk_cell_layout_get_cells (GtkCellLayout *cell_layout);
89 void gtk_cell_layout_clear (GtkCellLayout *cell_layout);
90 void gtk_cell_layout_set_attributes (GtkCellLayout *cell_layout,
91 GtkCellRenderer *cell,
92 ...) G_GNUC_NULL_TERMINATED;
93 void gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout,
94 GtkCellRenderer *cell,
95 const gchar *attribute,
97 void gtk_cell_layout_set_cell_data_func (GtkCellLayout *cell_layout,
98 GtkCellRenderer *cell,
99 GtkCellLayoutDataFunc func,
101 GDestroyNotify destroy);
102 void gtk_cell_layout_clear_attributes (GtkCellLayout *cell_layout,
103 GtkCellRenderer *cell);
104 void gtk_cell_layout_reorder (GtkCellLayout *cell_layout,
105 GtkCellRenderer *cell,
107 GtkCellArea *gtk_cell_layout_get_area (GtkCellLayout *cell_layout);
109 gboolean _gtk_cell_layout_buildable_custom_tag_start (GtkBuildable *buildable,
112 const gchar *tagname,
113 GMarkupParser *parser,
115 void _gtk_cell_layout_buildable_custom_tag_end (GtkBuildable *buildable,
118 const gchar *tagname,
120 void _gtk_cell_layout_buildable_add_child (GtkBuildable *buildable,
127 #endif /* __GTK_CELL_LAYOUT_H__ */