public void NativeCallback(IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter_ptr, IntPtr data) { TreeViewColumn col = (Gtk.TreeViewColumn)GLib.Object.GetObject(tree_column); CellRenderer renderer = (Gtk.CellRenderer)GLib.Object.GetObject(cell); NodeStore store = (NodeStore)GLib.Object.GetObject(tree_model); TreeIter iter = TreeIter.New(iter_ptr); managed(col, renderer, store.GetNode(iter)); }
static void rowsreordered_cb(IntPtr tree_model, IntPtr path_ptr, IntPtr iter_ptr, IntPtr new_order) { try { TreeModelSort store = GLib.Object.GetObject(tree_model, false) as TreeModelSort; TreePath path = GLib.Opaque.GetOpaque(path_ptr, typeof(TreePath), false) as TreePath; TreeIter iter = TreeIter.New(iter_ptr); int child_cnt = store.IterNChildren(iter); int[] child_order = new int [child_cnt]; Marshal.Copy(new_order, child_order, 0, child_cnt); store.OnRowsReordered(path, iter, child_order); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, true); // NOTREACHED: above call doesn't return throw e; } }