Debian Codegraph @

gtk/gtkmm/treeview_private.cc

raw symbols SCIP
1 /* Copyright (C) 2001-2002 The gtkmm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or(at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
15 */
16
17 #include <glibmm.h>
18 #include <gtkmm/treeview_private.h>
19
20
21 namespace Gtk
22 {
23
24 namespace TreeView_Private
25 {
26
27 void SignalProxy_CellData_gtk_callback(GtkTreeViewColumn*, GtkCellRenderer* cell,
28 GtkTreeModel* model, GtkTreeIter* iter, void* data)
29 {
30 if(!model)
31 g_warning("SignalProxy_CellData_gtk_callback(): model is NULL, which is unusual.\n");
32
33 TreeViewColumn::SlotTreeCellData* the_slot = static_cast<TreeViewColumn::SlotTreeCellData*>(data);
34
35 try
36 {
37 // use Slot::operator()
38 Gtk::TreeModel::iterator cppiter = TreeIter(model, iter);
39 if(!cppiter->get_model_gobject())
40 {
41 g_warning("SignalProxy_CellData_gtk_callback() The cppiter has no model\n");
42 return;
43 }
44
45 (*the_slot)(Glib::wrap(cell, false), cppiter);
46 }
47 catch(...)
48 {
49 Glib::exception_handlers_invoke();
50 }
51 }
52
53 void SignalProxy_CellData_gtk_callback_destroy(void* data)
54 {
55 delete static_cast<TreeViewColumn::SlotTreeCellData*>(data);
56 }
57
58
59 gboolean SignalProxy_RowSeparator_gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, void* data)
60 {
61 TreeView::SlotRowSeparator* the_slot = static_cast<TreeView::SlotRowSeparator*>(data);
62
63 try
64 {
65 return (*the_slot)(Glib::wrap(model, true), Gtk::TreeIter(model, iter));
66 }
67 catch(...)
68 {
69 Glib::exception_handlers_invoke();
70 }
71
72 return 0; // arbitrary value
73 }
74
75 void SignalProxy_RowSeparator_gtk_callback_destroy(void* data)
76 {
77 delete static_cast<TreeView::SlotRowSeparator*>(data);
78 }
79
80 } // namespace TreeView_Private
81
82 } // namespace Gtk