Пример #1
0
 public CellLayoutDataFuncWrapper(Gtk.CellLayoutDataFunc managed)
 {
     this.managed = managed;
     if (managed != null)
     {
         NativeDelegate = new CellLayoutDataFuncNative(NativeCallback);
     }
 }
Пример #2
0
        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 CellLayoutDataFuncWrapper (Gtk.CellLayoutDataFunc managed)
		{
			this.managed = managed;
			if (managed != null)
				NativeDelegate = new CellLayoutDataFuncNative (NativeCallback);
		}
Пример #4
0
 public void SetCellDataFunc(object target, Gtk.CellRenderer cr, Gtk.CellLayoutDataFunc dataFunc)
 {
     Widget.SetCellDataFunc(cr, dataFunc);
 }