2004-12-20 Mike Kestner <mkestner@novell.com>
* generator/Property.cs : generate Interface properties. * gtk/ComboBox.custom : remove dup model prop. * gtk/TreeView.custom : remove dup model prop. svn path=/trunk/gtk-sharp/; revision=37985
This commit is contained in:
parent
e2fd0d5e42
commit
5e298ce11a
7 changed files with 49 additions and 54 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-12-20 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* generator/Property.cs : generate Interface properties.
|
||||
* gtk/ComboBox.custom : remove dup model prop.
|
||||
* gtk/TreeView.custom : remove dup model prop.
|
||||
|
||||
2004-12-20 Jeroen Zwartepoorte <jeroen@xs4all.nl>
|
||||
|
||||
* gnomevfs/Makefile.am:
|
||||
|
|
|
@ -432,5 +432,18 @@
|
|||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Model">
|
||||
<MemberSignature Language="C#" Value="public Gtk.TreeModel Model { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Gtk.TreeModel</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Tree data model.</summary>
|
||||
<returns>a <see cref="T:Gtk.TreeModel" /></returns>
|
||||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
|
@ -1098,5 +1098,18 @@ in a <see cref="T:Gtk.TreeModel" /> for display.</summary>
|
|||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="ChildModel">
|
||||
<MemberSignature Language="C#" Value="public Gtk.TreeModel ChildModel { get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Gtk.TreeModel</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Child tree data model.</summary>
|
||||
<returns>a <see cref="T:Gtk.TreeModel" /></returns>
|
||||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
|
@ -1143,5 +1143,18 @@ node is always the parent.</remarks>
|
|||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Model">
|
||||
<MemberSignature Language="C#" Value="public Gtk.TreeModel Model { get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Gtk.TreeModel</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>Tree data model.</summary>
|
||||
<returns>a <see cref="T:Gtk.TreeModel" /></returns>
|
||||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
|
|
|
@ -56,13 +56,6 @@ namespace GtkSharp.Generation {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (table.IsInterface(c_type)) {
|
||||
// FIXME: Handle interface props properly.
|
||||
Console.Write("Interface property detected ");
|
||||
Statistics.ThrottledCount++;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -100,12 +93,7 @@ namespace GtkSharp.Generation {
|
|||
string v_type = "";
|
||||
if (table.IsEnum(c_type)) {
|
||||
v_type = "(int) (GLib.EnumWrapper)";
|
||||
} else if (table.IsInterface(c_type)) {
|
||||
// FIXME: Handle interface props properly.
|
||||
Console.Write("Interface property detected ");
|
||||
Statistics.ThrottledCount++;
|
||||
return;
|
||||
} else if (table.IsObject(c_type)) {
|
||||
} else if (table.IsObject(c_type) || table.IsInterface (c_type)) {
|
||||
v_type = "(GLib.UnwrappedObject)";
|
||||
} else if (table.IsBoxed (c_type)) {
|
||||
v_type = "(GLib.Boxed)";
|
||||
|
@ -164,11 +152,9 @@ namespace GtkSharp.Generation {
|
|||
} else if (elem.HasAttribute("readable")) {
|
||||
sw.WriteLine(indent + "get {");
|
||||
sw.WriteLine(indent + "\tGLib.Value val = " + RawGetter (qpname) + ";");
|
||||
if (table.IsObject (c_type)) {
|
||||
if (table.IsObject (c_type) || table.IsInterface (c_type)) {
|
||||
sw.WriteLine(indent + "\tSystem.IntPtr raw_ret = (System.IntPtr) {0} val;", v_type);
|
||||
sw.WriteLine(indent + "\t" + cs_type + " ret = " + table.FromNativeReturn(c_type, "raw_ret") + ";");
|
||||
if (!table.IsBoxed (c_type) && !table.IsObject (c_type))
|
||||
sw.WriteLine(indent + "\tif (ret == null) ret = new " + cs_type + "(raw_ret);");
|
||||
} else if (table.IsOpaque (c_type) || table.IsBoxed (c_type)) {
|
||||
sw.WriteLine(indent + "\t" + cs_type + " ret = (" + cs_type + ") val;");
|
||||
} else {
|
||||
|
|
|
@ -19,24 +19,6 @@
|
|||
// Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_combo_box_get_model (IntPtr raw);
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_combo_box_set_model (IntPtr raw, IntPtr raw_model);
|
||||
|
||||
public Gtk.TreeModel Model {
|
||||
get {
|
||||
IntPtr raw_ret = gtk_combo_box_get_model (Handle);
|
||||
Gtk.TreeModel ret = (Gtk.TreeModel) GLib.Object.GetObject (raw_ret, false);
|
||||
return ret;
|
||||
}
|
||||
set {
|
||||
gtk_combo_box_set_model (Handle, value.Handle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SetCellDataFunc (Gtk.CellRenderer renderer, Gtk.CellLayoutDataFunc func)
|
||||
{
|
||||
GtkSharp.CellLayoutDataFuncWrapper func_wrapper = null;
|
||||
|
|
|
@ -56,24 +56,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_tree_view_get_model (IntPtr raw);
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern IntPtr gtk_tree_view_set_model (IntPtr raw, IntPtr raw_model);
|
||||
|
||||
public Gtk.TreeModel Model {
|
||||
get {
|
||||
IntPtr raw_ret = gtk_tree_view_get_model (Handle);
|
||||
Gtk.TreeModel ret = (Gtk.TreeModel) GLib.Object.GetObject (raw_ret, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
set {
|
||||
gtk_tree_view_set_model (Handle, value.Handle);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||
static extern bool gtk_tree_view_get_path_at_pos (IntPtr raw,
|
||||
int x,
|
||||
|
|
Loading…
Reference in a new issue