annotate src/gtkcelllayout.h @ 10789:0caa9827edf5

[gaim-migrate @ 12431] " The following log snippets should explain it: " --rlaager (20:24:00) rlaager: Regarding the signal handling conversation the other day... I've written a patch to stop calling signal handlers and return as soon as we find one signal handler that returns TRUE to indicate that it's handled the signal. Is this the right approach? (20:24:22) Ethan Blanton (Paco-Paco): the trouble is that it's documented to behave exactly the way it does (20:24:31) Ethan Blanton (Paco-Paco): so changing it is notbackwards compatible (20:24:31) rlaager: I'm talking for HEAD. (20:24:41) Ethan Blanton (Paco-Paco): oh, I think that's a good approach, yes (20:24:53) rlaager: The way I've described is how I *expected* it to work, having not read the documentation. (20:25:09) Ethan Blanton (Paco-Paco): I'm convinced (20:27:04) Stu Tomlinson (nosnilmot): rlaager: this, I assume, breaks the generic-ness of signals, by assuming that any that return values return booleans? (20:27:26) Ethan Blanton (Paco-Paco): please break it (20:27:33) Ethan Blanton (Paco-Paco): we already have out-parameters (20:27:42) rlaager: nosnilmot: from what I can see, the return type is handled as a (void *)... so I'm checking that ret_value != NULL (20:27:57) rlaager: nosnilmot: that's the correct way to do it, right? ... (20:29:01) Ethan Blanton (Paco-Paco): allowing a meaningful return value is an over-engineering (20:30:07) rlaager: even after this patch, you should be able to return meaningful return values (20:30:15) rlaager: it'll just short-circuit on the first handler that does committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 07 Apr 2005 14:55:02 +0000
parents d0d1d631ed49
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10708
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
1 /* gtkcelllayout.h
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
2 * Copyright (C) 2003 Kristian Rietveld <kris@gtk.org>
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
3 *
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
4 * This library is free software; you can redistribute it and/or
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
5 * modify it under the terms of the GNU Library General Public
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
6 * License as published by the Free Software Foundation; either
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
7 * version 2 of the License, or (at your option) any later version.
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
8 *
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
9 * This library is distributed in the hope that it will be useful,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
12 * Library General Public License for more details.
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
13 *
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
14 * You should have received a copy of the GNU Library General Public
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
15 * License along with this library; if not, write to the
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
17 * Boston, MA 02111-1307, USA.
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
18 */
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
19
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
20 #ifndef __GTK_CELL_LAYOUT_H__
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
21 #define __GTK_CELL_LAYOUT_H__
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
22
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
23 #include <glib-object.h>
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
24
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
25 #include <gtk/gtkcellrenderer.h>
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
26 #include <gtk/gtktreeviewcolumn.h>
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
27
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
28 G_BEGIN_DECLS
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
29
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
30 #define GTK_TYPE_CELL_LAYOUT (gtk_cell_layout_get_type ())
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
31 #define GTK_CELL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayout))
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
32 #define GTK_IS_CELL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_LAYOUT))
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
33 #define GTK_CELL_LAYOUT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayoutIface))
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
34
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
35 typedef struct _GtkCellLayout GtkCellLayout; /* dummy typedef */
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
36 typedef struct _GtkCellLayoutIface GtkCellLayoutIface;
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
37
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
38 /* keep in sync with GtkTreeCellDataFunc */
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
39 typedef void (* GtkCellLayoutDataFunc) (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
40 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
41 GtkTreeModel *tree_model,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
42 GtkTreeIter *iter,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
43 gpointer data);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
44
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
45 struct _GtkCellLayoutIface
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
46 {
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
47 GTypeInterface g_iface;
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
48
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
49 /* Virtual Table */
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
50 void (* pack_start) (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
51 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
52 gboolean expand);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
53 void (* pack_end) (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
54 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
55 gboolean expand);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
56 void (* clear) (GtkCellLayout *cell_layout);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
57 void (* add_attribute) (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
58 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
59 const gchar *attribute,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
60 gint column);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
61 void (* set_cell_data_func) (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
62 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
63 GtkCellLayoutDataFunc func,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
64 gpointer func_data,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
65 GDestroyNotify destroy);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
66 void (* clear_attributes) (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
67 GtkCellRenderer *cell);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
68 void (* reorder) (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
69 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
70 gint position);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
71 };
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
72
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
73 GType gtk_cell_layout_get_type (void);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
74 void gtk_cell_layout_pack_start (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
75 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
76 gboolean expand);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
77 void gtk_cell_layout_pack_end (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
78 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
79 gboolean expand);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
80 void gtk_cell_layout_clear (GtkCellLayout *cell_layout);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
81 void gtk_cell_layout_set_attributes (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
82 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
83 ...);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
84 void gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
85 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
86 const gchar *attribute,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
87 gint column);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
88 void gtk_cell_layout_set_cell_data_func (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
89 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
90 GtkCellLayoutDataFunc func,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
91 gpointer func_data,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
92 GDestroyNotify destroy);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
93 void gtk_cell_layout_clear_attributes (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
94 GtkCellRenderer *cell);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
95 void gtk_cell_layout_reorder (GtkCellLayout *cell_layout,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
96 GtkCellRenderer *cell,
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
97 gint position);
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
98
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
99
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
100 G_END_DECLS
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
101
d0d1d631ed49 [gaim-migrate @ 12297]
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
102 #endif /* __GTK_CELL_LAYOUT_H__ */