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