]> Pileus Git - ~andy/gtk/blob - gtk/gtkcelllayout.h
Rename buildable methods to not clash with widget methods. (#448928,
[~andy/gtk] / gtk / gtkcelllayout.h
1 /* gtkcelllayout.h
2  * Copyright (C) 2003  Kristian Rietveld  <kris@gtk.org>
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 #ifndef __GTK_CELL_LAYOUT_H__
21 #define __GTK_CELL_LAYOUT_H__
22
23 #include <glib-object.h>
24
25 #include <gtk/gtkcellrenderer.h>
26 #include <gtk/gtktreeviewcolumn.h>
27 #include <gtk/gtkbuildable.h>
28 #include <gtk/gtkbuilder.h>
29
30 G_BEGIN_DECLS
31
32 #define GTK_TYPE_CELL_LAYOUT            (gtk_cell_layout_get_type ())
33 #define GTK_CELL_LAYOUT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayout))
34 #define GTK_IS_CELL_LAYOUT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_LAYOUT))
35 #define GTK_CELL_LAYOUT_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayoutIface))
36
37 typedef struct _GtkCellLayout           GtkCellLayout; /* dummy typedef */
38 typedef struct _GtkCellLayoutIface      GtkCellLayoutIface;
39
40 /* keep in sync with GtkTreeCellDataFunc */
41 typedef void (* GtkCellLayoutDataFunc) (GtkCellLayout   *cell_layout,
42                                         GtkCellRenderer *cell,
43                                         GtkTreeModel    *tree_model,
44                                         GtkTreeIter     *iter,
45                                         gpointer         data);
46
47 struct _GtkCellLayoutIface
48 {
49   GTypeInterface g_iface;
50
51   /* Virtual Table */
52   void (* pack_start)         (GtkCellLayout         *cell_layout,
53                                GtkCellRenderer       *cell,
54                                gboolean               expand);
55   void (* pack_end)           (GtkCellLayout         *cell_layout,
56                                GtkCellRenderer       *cell,
57                                gboolean               expand);
58   void (* clear)              (GtkCellLayout         *cell_layout);
59   void (* add_attribute)      (GtkCellLayout         *cell_layout,
60                                GtkCellRenderer       *cell,
61                                const gchar           *attribute,
62                                gint                   column);
63   void (* set_cell_data_func) (GtkCellLayout         *cell_layout,
64                                GtkCellRenderer       *cell,
65                                GtkCellLayoutDataFunc  func,
66                                gpointer               func_data,
67                                GDestroyNotify         destroy);
68   void (* clear_attributes)   (GtkCellLayout         *cell_layout,
69                                GtkCellRenderer       *cell);
70   void (* reorder)            (GtkCellLayout         *cell_layout,
71                                GtkCellRenderer       *cell,
72                                gint                   position);
73   GList* (* get_cells)        (GtkCellLayout         *cell_layout);
74 };
75
76 GType gtk_cell_layout_get_type           (void) G_GNUC_CONST;
77 void  gtk_cell_layout_pack_start         (GtkCellLayout         *cell_layout,
78                                           GtkCellRenderer       *cell,
79                                           gboolean               expand);
80 void  gtk_cell_layout_pack_end           (GtkCellLayout         *cell_layout,
81                                           GtkCellRenderer       *cell,
82                                           gboolean               expand);
83 GList *gtk_cell_layout_get_cells         (GtkCellLayout         *cell_layout);
84 void  gtk_cell_layout_clear              (GtkCellLayout         *cell_layout);
85 void  gtk_cell_layout_set_attributes     (GtkCellLayout         *cell_layout,
86                                           GtkCellRenderer       *cell,
87                                           ...) G_GNUC_NULL_TERMINATED;
88 void  gtk_cell_layout_add_attribute      (GtkCellLayout         *cell_layout,
89                                           GtkCellRenderer       *cell,
90                                           const gchar           *attribute,
91                                           gint                   column);
92 void  gtk_cell_layout_set_cell_data_func (GtkCellLayout         *cell_layout,
93                                           GtkCellRenderer       *cell,
94                                           GtkCellLayoutDataFunc  func,
95                                           gpointer               func_data,
96                                           GDestroyNotify         destroy);
97 void  gtk_cell_layout_clear_attributes   (GtkCellLayout         *cell_layout,
98                                           GtkCellRenderer       *cell);
99 void  gtk_cell_layout_reorder            (GtkCellLayout         *cell_layout,
100                                           GtkCellRenderer       *cell,
101                                           gint                   position);
102 gboolean _gtk_cell_layout_buildable_custom_tag_start (GtkBuildable  *buildable,
103                                                       GtkBuilder    *builder,
104                                                       GObject       *child,
105                                                       const gchar   *tagname,
106                                                       GMarkupParser *parser,
107                                                       gpointer      *data);
108 void _gtk_cell_layout_buildable_custom_tag_end       (GtkBuildable  *buildable,
109                                                       GtkBuilder    *builder,
110                                                       GObject       *child,
111                                                       const gchar   *tagname,
112                                                       gpointer      *data);
113 void _gtk_cell_layout_buildable_add_child            (GtkBuildable  *buildable,
114                                                       GtkBuilder    *builder,
115                                                       GObject       *child,
116                                                       const gchar   *type);
117
118 G_END_DECLS
119
120 #endif /* __GTK_CELL_LAYOUT_H__ */