Exemplo n.º 1
0
        public void SetSortFunc(int sort_column_id, Gtk.TreeIterCompareFunc sort_func)
        {
            GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper(sort_func);
            IntPtr user_data;

            GLib.DestroyNotify destroy;
            if (sort_func == null)
            {
                user_data = IntPtr.Zero;
                destroy   = null;
            }
            else
            {
                user_data = (IntPtr)GCHandle.Alloc(sort_func_wrapper);
                destroy   = GLib.DestroyHelper.NotifyHandler;
            }
            gtk_tree_sortable_set_sort_func(Handle, sort_column_id, sort_func_wrapper.NativeDelegate, user_data, destroy);
        }
Exemplo n.º 2
0
		public void SetSortFunc(int sort_column_id, Gtk.TreeIterCompareFunc sort_func) {
			GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
			IntPtr user_data;
			GLib.DestroyNotify destroy;
			if (sort_func == null) {
				user_data = IntPtr.Zero;
				destroy = null;
			} else {
				user_data = (IntPtr) GCHandle.Alloc (sort_func_wrapper);
				destroy = GLib.DestroyHelper.NotifyHandler;
			}
			gtk_tree_sortable_set_sort_func(Handle, sort_column_id, sort_func_wrapper.NativeDelegate, user_data, destroy);
		}