Exemplo n.º 1
0
        public void SetCellDataFunc(Gtk.CellRenderer cell_renderer, Gtk.TreeCellDataFunc func)
        {
            GtkSharp.TreeCellDataFuncWrapper func_wrapper = new GtkSharp.TreeCellDataFuncWrapper(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_tree_view_column_set_cell_data_func(Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, func_wrapper.NativeDelegate, func_data, destroy);
        }
Exemplo n.º 2
0
		public void SetCellDataFunc(Gtk.CellRenderer cell_renderer, Gtk.TreeCellDataFunc func) {
			GtkSharp.TreeCellDataFuncWrapper func_wrapper = new GtkSharp.TreeCellDataFuncWrapper (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_tree_view_column_set_cell_data_func(Handle, cell_renderer == null ? IntPtr.Zero : cell_renderer.Handle, func_wrapper.NativeDelegate, func_data, destroy);
		}