mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-07-07 16:20:35 +00:00
2005-03-15 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : hide TreeSortable.SetSortFunc. * gtk/ListStore.custom : implement SetSortFunc for persistence. * gtk/Makefile.am : add custom file. * gtk/TreeModelSort.custom : implement SetSortFunc for persistence. * gtk/TreeSortable.custom : new file, add hidden method decls. * gtk/TreeStore.custom : implement SetSortFunc for persistence. svn path=/trunk/gtk-sharp/; revision=41845
This commit is contained in:
parent
1b4913630b
commit
113a9460c4
|
@ -1,3 +1,12 @@
|
||||||
|
2005-03-15 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* gtk/Gtk.metadata : hide TreeSortable.SetSortFunc.
|
||||||
|
* gtk/ListStore.custom : implement SetSortFunc for persistence.
|
||||||
|
* gtk/Makefile.am : add custom file.
|
||||||
|
* gtk/TreeModelSort.custom : implement SetSortFunc for persistence.
|
||||||
|
* gtk/TreeSortable.custom : new file, add hidden method decls.
|
||||||
|
* gtk/TreeStore.custom : implement SetSortFunc for persistence.
|
||||||
|
|
||||||
2005-03-15 John Luke <john.luke@gmail.com>
|
2005-03-15 John Luke <john.luke@gmail.com>
|
||||||
|
|
||||||
* glib/Object.cs: use IsDefined to check for ClassInitializer
|
* glib/Object.cs: use IsDefined to check for ClassInitializer
|
||||||
|
|
|
@ -94,6 +94,7 @@
|
||||||
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowInserted']" name="name">EmitRowInserted</attr>
|
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowInserted']" name="name">EmitRowInserted</attr>
|
||||||
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowsReordered']" name="name">EmitRowsReordered</attr>
|
<attr path="/api/namespace/interface[@cname='GtkTreeModel']/method[@name='RowsReordered']" name="name">EmitRowsReordered</attr>
|
||||||
<attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SetDefaultSortFunc']" name="hidden">1</attr>
|
<attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SetDefaultSortFunc']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SetSortFunc']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SortColumnChanged']" name="name">ChangeSortColumn</attr>
|
<attr path="/api/namespace/interface[@cname='GtkTreeSortable']/method[@name='SortColumnChanged']" name="name">ChangeSortColumn</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkAccelLabel']/constructor[@cname='gtk_accel_label_new']/*/*[@name='string']" name="property_name">label</attr>
|
<attr path="/api/namespace/object[@cname='GtkAccelLabel']/constructor[@cname='gtk_accel_label_new']/*/*[@name='string']" name="property_name">label</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkAction']/signal[@name='Activate']" name="name">Activated</attr>
|
<attr path="/api/namespace/object[@cname='GtkAction']/signal[@name='Activate']" name="name">Activated</attr>
|
||||||
|
|
|
@ -150,6 +150,27 @@
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int col_id, IntPtr sort_func, IntPtr user_data, IntPtr destroy);
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int col_id, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, GtkSharp.DestroyNotifyNative destroy);
|
||||||
|
|
||||||
|
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
|
||||||
|
{
|
||||||
|
if (sort_func == null) {
|
||||||
|
PersistentData ["column_" + sort_column_id + "_sort_func"] = null;
|
||||||
|
gtk_tree_sortable_set_sort_func (Handle, sort_column_id, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
|
||||||
|
PersistentData ["column_" + sort_column_id + "_sort_func"] = sort_func_wrapper;
|
||||||
|
GtkSharp.DestroyNotifyWrapper destroy_wrapper = null;
|
||||||
|
destroy_wrapper = new GtkSharp.DestroyNotifyWrapper (destroy);
|
||||||
|
gtk_tree_sortable_set_sort_func(Handle, sort_column_id, sort_func_wrapper.NativeDelegate, user_data, destroy_wrapper.NativeDelegate);
|
||||||
|
}
|
||||||
|
|
||||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
static extern void gtk_tree_sortable_set_default_sort_func(IntPtr raw, IntPtr sort_func, IntPtr user_data, IntPtr destroy);
|
static extern void gtk_tree_sortable_set_default_sort_func(IntPtr raw, IntPtr sort_func, IntPtr user_data, IntPtr destroy);
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,7 @@ customs = \
|
||||||
TreeModelSort.custom \
|
TreeModelSort.custom \
|
||||||
TreePath.custom \
|
TreePath.custom \
|
||||||
TreeSelection.custom \
|
TreeSelection.custom \
|
||||||
|
TreeSortable.custom \
|
||||||
TreeStore.custom \
|
TreeStore.custom \
|
||||||
TreeViewColumn.custom \
|
TreeViewColumn.custom \
|
||||||
TreeView.custom \
|
TreeView.custom \
|
||||||
|
|
|
@ -106,3 +106,24 @@
|
||||||
gtk_tree_sortable_set_default_sort_func(Handle, sort_func_wrapper.NativeDelegate, user_data, destroy_wrapper.NativeDelegate);
|
gtk_tree_sortable_set_default_sort_func(Handle, sort_func_wrapper.NativeDelegate, user_data, destroy_wrapper.NativeDelegate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int col_id, IntPtr sort_func, IntPtr user_data, IntPtr destroy);
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int col_id, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, GtkSharp.DestroyNotifyNative destroy);
|
||||||
|
|
||||||
|
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
|
||||||
|
{
|
||||||
|
if (sort_func == null) {
|
||||||
|
PersistentData ["column_" + sort_column_id + "_sort_func"] = null;
|
||||||
|
gtk_tree_sortable_set_sort_func (Handle, sort_column_id, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
|
||||||
|
PersistentData ["column_" + sort_column_id + "_sort_func"] = sort_func_wrapper;
|
||||||
|
GtkSharp.DestroyNotifyWrapper destroy_wrapper = null;
|
||||||
|
destroy_wrapper = new GtkSharp.DestroyNotifyWrapper (destroy);
|
||||||
|
gtk_tree_sortable_set_sort_func(Handle, sort_column_id, sort_func_wrapper.NativeDelegate, user_data, destroy_wrapper.NativeDelegate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
26
gtk/TreeSortable.custom
Normal file
26
gtk/TreeSortable.custom
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
// Gtk.TreeSortable.Custom - Gtk TreeSortable interface customizations
|
||||||
|
//
|
||||||
|
// Author: Mike Kestner <mkestner@novell.com>
|
||||||
|
//
|
||||||
|
// Copyright (c) 2005 Novell, Inc.
|
||||||
|
//
|
||||||
|
// This code is inserted after the automatically generated code.
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of version 2 of the Lesser GNU General
|
||||||
|
// Public License as published by the Free Software Foundation.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this program; if not, write to the
|
||||||
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
// Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
void SetDefaultSortFunc (TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);
|
||||||
|
|
||||||
|
void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy);
|
||||||
|
|
|
@ -214,4 +214,24 @@
|
||||||
gtk_tree_sortable_set_default_sort_func(Handle, sort_func_wrapper.NativeDelegate, user_data, destroy_wrapper.NativeDelegate);
|
gtk_tree_sortable_set_default_sort_func(Handle, sort_func_wrapper.NativeDelegate, user_data, destroy_wrapper.NativeDelegate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int col_id, IntPtr sort_func, IntPtr user_data, IntPtr destroy);
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern void gtk_tree_sortable_set_sort_func(IntPtr raw, int col_id, GtkSharp.TreeIterCompareFuncNative sort_func, IntPtr user_data, GtkSharp.DestroyNotifyNative destroy);
|
||||||
|
|
||||||
|
public void SetSortFunc (int sort_column_id, TreeIterCompareFunc sort_func, IntPtr user_data, Gtk.DestroyNotify destroy)
|
||||||
|
{
|
||||||
|
if (sort_func == null) {
|
||||||
|
PersistentData ["column_" + sort_column_id + "_sort_func"] = null;
|
||||||
|
gtk_tree_sortable_set_sort_func (Handle, sort_column_id, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func);
|
||||||
|
PersistentData ["column_" + sort_column_id + "_sort_func"] = sort_func_wrapper;
|
||||||
|
GtkSharp.DestroyNotifyWrapper destroy_wrapper = null;
|
||||||
|
destroy_wrapper = new GtkSharp.DestroyNotifyWrapper (destroy);
|
||||||
|
gtk_tree_sortable_set_sort_func(Handle, sort_column_id, sort_func_wrapper.NativeDelegate, user_data, destroy_wrapper.NativeDelegate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue