mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 07:53:17 +02:00
2005-03-03 Mike Kestner <mkestner@novell.com>
* gdk/Gdk.metadata : remove unnecessary null_ok rules. * generator/Ctor.cs : don't add null params to CreateNativeObject call for InterfaceGen or OpaqueGen in addition to ObjectGen. * generator/Field.cs : simplify Object/Opaque gen. * generator/Method.cs : remove OpaqueGen special casing. * generator/OpaqueGen.cs : make FromNative null_ok robust. * generator/Signal.cs : remove arg marshaling ClassBase special case. * gtk/Gtk.metadata : remove unnecessary null_ok rules. svn path=/trunk/gtk-sharp/; revision=41416
This commit is contained in:
parent
801cbb7e65
commit
8b6cf6e5ea
@ -1,8 +1,12 @@
|
|||||||
2005-03-03 Mike Kestner <mkestner@novell.com>
|
2005-03-03 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* gdk/Gdk.metadata : remove unnecessary null_ok rules.
|
* gdk/Gdk.metadata : remove unnecessary null_ok rules.
|
||||||
* generator/Ctor.cs : remove NullOk check.
|
* generator/Ctor.cs : don't add null params to CreateNativeObject call
|
||||||
* gnome/Gnome.metadata : remove unnecessary null_ok rules.
|
for InterfaceGen or OpaqueGen in addition to ObjectGen.
|
||||||
|
* generator/Field.cs : simplify Object/Opaque gen.
|
||||||
|
* generator/Method.cs : remove OpaqueGen special casing.
|
||||||
|
* generator/OpaqueGen.cs : make FromNative null_ok robust.
|
||||||
|
* generator/Signal.cs : remove arg marshaling ClassBase special case.
|
||||||
* gtk/Gtk.metadata : remove unnecessary null_ok rules.
|
* gtk/Gtk.metadata : remove unnecessary null_ok rules.
|
||||||
|
|
||||||
2005-03-03 Mike Kestner <mkestner@novell.com>
|
2005-03-03 Mike Kestner <mkestner@novell.com>
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
<attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='StringToCompoundTextForDisplay']" name="hidden">1</attr>
|
<attr path="/api/namespace/class[@cname='GdkGlobal']/method[@name='StringToCompoundTextForDisplay']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/class[@cname='GdkPango_']" name="name">PangoHelper</attr>
|
<attr path="/api/namespace/class[@cname='GdkPango_']" name="name">PangoHelper</attr>
|
||||||
<attr path="/api/namespace/class[@cname='GdkPixbuf_']" name="hidden">1</attr>
|
<attr path="/api/namespace/class[@cname='GdkPixbuf_']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/class[@cname='GdkPointer_']/method[@name='Grab']/*/*[@name='cursor']" name="null_ok">1</attr>
|
|
||||||
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']/*/*[@name='actual_property_type']" name="pass_as">out</attr>
|
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']/*/*[@name='actual_property_type']" name="pass_as">out</attr>
|
||||||
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']/*/*[@name='data']" name="pass_as">out</attr>
|
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']/*/*[@name='data']" name="pass_as">out</attr>
|
||||||
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']/*/*[@name='data']" name="array">1</attr>
|
<attr path="/api/namespace/class[@cname='GdkProperty_']/method[@name='Get']/*/*[@name='data']" name="array">1</attr>
|
||||||
@ -116,7 +115,6 @@
|
|||||||
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='GetPointer']/*/*[@type='GdkModifierType*']" name="pass_as">out</attr>
|
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='GetPointer']/*/*[@type='GdkModifierType*']" name="pass_as">out</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='GetToplevels']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='GetToplevels']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='PeekChildren']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='PeekChildren']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='SetCursor']/parameters/parameter[@name='cursor']" name="null_ok">1</attr>
|
|
||||||
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='SetIconList']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='SetIconList']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='GetUserData']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@name='GetUserData']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@cname='gdk_window_set_user_data']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GdkWindow']/method[@cname='gdk_window_set_user_data']" name="hidden">1</attr>
|
||||||
|
@ -124,7 +124,7 @@ namespace GtkSharp.Generation {
|
|||||||
for (int i = 0; i < names.Count; i++) {
|
for (int i = 0; i < names.Count; i++) {
|
||||||
Parameter p = Parameters [i];
|
Parameter p = Parameters [i];
|
||||||
string indent = "\t\t\t\t";
|
string indent = "\t\t\t\t";
|
||||||
if (p.Generatable is ObjectGen) {
|
if (p.Generatable is ClassBase && !(p.Generatable is StructBase)) {
|
||||||
sw.WriteLine (indent + "if (" + p.Name + " != null) {");
|
sw.WriteLine (indent + "if (" + p.Name + " != null) {");
|
||||||
indent += "\t";
|
indent += "\t";
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ namespace GtkSharp.Generation {
|
|||||||
else
|
else
|
||||||
sw.WriteLine ("new GLib.Value (" + values[i] + "));");
|
sw.WriteLine ("new GLib.Value (" + values[i] + "));");
|
||||||
|
|
||||||
if (p.Generatable is ObjectGen)
|
if (p.Generatable is ClassBase && !(p.Generatable is StructBase))
|
||||||
sw.WriteLine ("\t\t\t\t}");
|
sw.WriteLine ("\t\t\t\t}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,10 +197,7 @@ namespace GtkSharp.Generation {
|
|||||||
if (Access != "private") {
|
if (Access != "private") {
|
||||||
sw.WriteLine ("\t\t" + Access + " " + wrapped + " " + wrapped_name + " {");
|
sw.WriteLine ("\t\t" + Access + " " + wrapped + " " + wrapped_name + " {");
|
||||||
sw.WriteLine ("\t\t\tget { ");
|
sw.WriteLine ("\t\t\tget { ");
|
||||||
sw.WriteLine ("\t\t\t\t" + wrapped + " ret = " + table.FromNativeReturn(CType, Name) + ";");
|
sw.WriteLine ("\t\t\t\treturn " + table.FromNativeReturn(CType, Name) + ";");
|
||||||
if (table.IsOpaque (CType))
|
|
||||||
sw.WriteLine ("\t\t\t\tif (ret == null) ret = new " + wrapped + "(" + Name + ");");
|
|
||||||
sw.WriteLine ("\t\t\t\treturn ret;");
|
|
||||||
sw.WriteLine ("\t\t\t}");
|
sw.WriteLine ("\t\t\t}");
|
||||||
|
|
||||||
sw.WriteLine ("\t\t\tset { " + Name + " = " + table.CallByName (CType, "value") + "; }");
|
sw.WriteLine ("\t\t\tset { " + Name + " = " + table.CallByName (CType, "value") + "; }");
|
||||||
|
@ -327,19 +327,14 @@ namespace GtkSharp.Generation {
|
|||||||
sw.Write(indent + "\t\t\t");
|
sw.Write(indent + "\t\t\t");
|
||||||
if (retval.MarshalType == "void") {
|
if (retval.MarshalType == "void") {
|
||||||
sw.WriteLine(CName + call + ";");
|
sw.WriteLine(CName + call + ";");
|
||||||
} else if (ret_igen is OpaqueGen) {
|
|
||||||
sw.WriteLine(retval.MarshalType + " raw_ret = " + CName + call + ";");
|
|
||||||
sw.WriteLine(indent +"\t\t\t" + retval.CSType + " ret;");
|
|
||||||
sw.WriteLine(indent + "\t\t\tif (raw_ret == IntPtr.Zero)");
|
|
||||||
sw.WriteLine(indent + "\t\t\t\tret = null;");
|
|
||||||
sw.WriteLine(indent + "\t\t\telse");
|
|
||||||
sw.WriteLine(indent +"\t\t\t\tret = " + table.FromNativeReturn(retval.CType, "raw_ret" + (retval.Owned ? ", true" : "")) + ";");
|
|
||||||
} else {
|
} else {
|
||||||
sw.WriteLine(retval.MarshalType + " raw_ret = " + CName + call + ";");
|
sw.WriteLine(retval.MarshalType + " raw_ret = " + CName + call + ";");
|
||||||
sw.Write(indent + "\t\t\t");
|
sw.Write(indent + "\t\t\t");
|
||||||
string raw_parms = "raw_ret";
|
string raw_parms = "raw_ret";
|
||||||
if (retval.ElementType != String.Empty)
|
if (retval.ElementType != String.Empty)
|
||||||
raw_parms += ", typeof (" + retval.ElementType + ")";
|
raw_parms += ", typeof (" + retval.ElementType + ")";
|
||||||
|
else if (retval.Owned)
|
||||||
|
raw_parms += ", true";
|
||||||
sw.WriteLine(retval.CSType + " ret = " + table.FromNativeReturn(retval.CType, raw_parms) + ";");
|
sw.WriteLine(retval.CSType + " ret = " + table.FromNativeReturn(retval.CType, raw_parms) + ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ namespace GtkSharp.Generation {
|
|||||||
|
|
||||||
public override string FromNative(string var)
|
public override string FromNative(string var)
|
||||||
{
|
{
|
||||||
return "new " + QualifiedName + "(" + var + ")";
|
return var + " == IntPtr.Zero ? null : new " + QualifiedName + "(" + var + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool DisableRawCtor {
|
private bool DisableRawCtor {
|
||||||
|
@ -209,7 +209,7 @@ namespace GtkSharp.Generation {
|
|||||||
IGeneratable igen = p.Generatable;
|
IGeneratable igen = p.Generatable;
|
||||||
if (p.PassAs == "out")
|
if (p.PassAs == "out")
|
||||||
finish += "\t\t\targ" + idx + " = " + igen.ToNativeReturn ("((" + p.CSType + ")args.Args[" + (idx - 1) + "])") + ";\n";
|
finish += "\t\t\targ" + idx + " = " + igen.ToNativeReturn ("((" + p.CSType + ")args.Args[" + (idx - 1) + "])") + ";\n";
|
||||||
else if ((igen is ClassBase && !(igen is StructBase)) || igen is ManualGen) {
|
else if (igen is ManualGen) {
|
||||||
sw.WriteLine("\t\t\tif (arg{0} == IntPtr.Zero)", idx);
|
sw.WriteLine("\t\t\tif (arg{0} == IntPtr.Zero)", idx);
|
||||||
sw.WriteLine("\t\t\t\targs.Args[{0}] = null;", idx - 1);
|
sw.WriteLine("\t\t\t\targs.Args[{0}] = null;", idx - 1);
|
||||||
sw.WriteLine("\t\t\telse {");
|
sw.WriteLine("\t\t\telse {");
|
||||||
|
@ -335,7 +335,6 @@
|
|||||||
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='PrependElement']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='PrependElement']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='PrependItem']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkToolbar']/method[@name='PrependItem']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkToolItem']/signal[@name='SetTooltip']" name="name">TooltipSet</attr>
|
<attr path="/api/namespace/object[@cname='GtkToolItem']/signal[@name='SetTooltip']" name="name">TooltipSet</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/constructor[@cname='gtk_tree_model_filter_new']/*/*[@type='GtkTreePath*']" name="null_ok">1</attr>
|
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertIterToChildIter']/*/*[@name='child_iter']" name="pass_as">out</attr>
|
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertIterToChildIter']/*/*[@name='child_iter']" name="pass_as">out</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertChildIterToIter']/*/*[@name='filter_iter']" name="pass_as">out</attr>
|
<attr path="/api/namespace/object[@cname='GtkTreeModelFilter']/method[@name='ConvertChildIterToIter']/*/*[@name='filter_iter']" name="pass_as">out</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeModelSort']/constructor[@cname='gtk_tree_model_sort_new_with_model']/*/*[@name='child_model']" name="property_name">model</attr>
|
<attr path="/api/namespace/object[@cname='GtkTreeModelSort']/constructor[@cname='gtk_tree_model_sort_new_with_model']/*/*[@name='child_model']" name="property_name">model</attr>
|
||||||
@ -378,7 +377,6 @@
|
|||||||
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='InsertColumnWithDataFunc']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='InsertColumnWithDataFunc']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='RowActivated']" name="name">ActivateRow</attr>
|
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='RowActivated']" name="name">ActivateRow</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='RowExpanded']" name="name">GetRowExpanded</attr>
|
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='RowExpanded']" name="name">GetRowExpanded</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeView']/method[@name='ScrollToCell']/*/*[@type='GtkTreePath*']" name="null_ok">1</attr>
|
|
||||||
<attr path="/api/namespace/object[@cname='GtkTreeView']/signal[@name='SetScrollAdjustments']" name="name">ScrollAdjustmentsSet</attr>
|
<attr path="/api/namespace/object[@cname='GtkTreeView']/signal[@name='SetScrollAdjustments']" name="name">ScrollAdjustmentsSet</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkUIManager']/constructor[@cname='gtk_ui_manager_new_merge_id']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkUIManager']/constructor[@cname='gtk_ui_manager_new_merge_id']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@cname='gtk_ui_manager_get_action_groups']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkUIManager']/method[@cname='gtk_ui_manager_get_action_groups']" name="hidden">1</attr>
|
||||||
@ -407,7 +405,6 @@
|
|||||||
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Path']/*/*[@type='gchar**']" name="pass_as">out</attr>
|
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Path']/*/*[@type='gchar**']" name="pass_as">out</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Ref']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Ref']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SetEvents']/*/*[@type='gint']" name="type">GdkEventMask</attr>
|
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SetEvents']/*/*[@type='gint']" name="type">GdkEventMask</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='ModifyFont']/parameters/parameter[@type='PangoFontDescription*']" name="null_ok">1</attr>
|
|
||||||
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Set']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='Set']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SetState']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SetState']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SizeRequest']/*/*[@name='requisition']" name="pass_as">out</attr>
|
<attr path="/api/namespace/object[@cname='GtkWidget']/method[@name='SizeRequest']/*/*[@name='requisition']" name="pass_as">out</attr>
|
||||||
|
Loading…
Reference in New Issue
Block a user