public void SetCellDataFunc(Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func) { GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper(func); IntPtr func_data; GLib.DestroyNotify destroy; if (func == null) { func_data = IntPtr.Zero; destroy = null; } else { func_data = (IntPtr)GCHandle.Alloc(func_wrapper); destroy = GLib.DestroyHelper.NotifyHandler; } gtk_cell_layout_set_cell_data_func(Handle, cell == null ? IntPtr.Zero : cell.Handle, func_wrapper.NativeDelegate, func_data, destroy); }
public void SetCellDataFunc(Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func) { GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func); IntPtr func_data; GLib.DestroyNotify destroy; if (func == null) { func_data = IntPtr.Zero; destroy = null; } else { func_data = (IntPtr) GCHandle.Alloc (func_wrapper); destroy = GLib.DestroyHelper.NotifyHandler; } gtk_cell_layout_set_cell_data_func(Handle, cell == null ? IntPtr.Zero : cell.Handle, func_wrapper.NativeDelegate, func_data, destroy); }