mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-16 11:34:47 +02:00
2007-11-02 Mike Kestner <mkestner@novell.com>
* generator/Method.cs: need to use on the Base method name to lookup complements and determine if the method is a getter or setter when an explicit interface method name is used. svn path=/trunk/gtk-sharp/; revision=88726
This commit is contained in:
parent
1fa0231217
commit
663b457f63
@ -1,3 +1,9 @@
|
|||||||
|
2007-11-02 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* generator/Method.cs: need to use on the Base method name to
|
||||||
|
lookup complements and determine if the method is a getter or setter
|
||||||
|
when an explicit interface method name is used.
|
||||||
|
|
||||||
2007-10-24 Mike Kestner <mkestner@novell.com>
|
2007-10-24 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* generator/SymbolTable.cs: mappings for GCallback and GSourceFunc.
|
* generator/SymbolTable.cs: mappings for GCallback and GSourceFunc.
|
||||||
|
@ -89,6 +89,16 @@ namespace GtkSharp.Generation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string BaseName {
|
||||||
|
get {
|
||||||
|
string name = Name;
|
||||||
|
int idx = Name.LastIndexOf (".");
|
||||||
|
if (idx > 0)
|
||||||
|
name = Name.Substring (idx + 1);
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override bool Validate ()
|
public override bool Validate ()
|
||||||
{
|
{
|
||||||
if (!retval.Validate () || !base.Validate ()) {
|
if (!retval.Validate () || !base.Validate ()) {
|
||||||
@ -96,9 +106,10 @@ namespace GtkSharp.Generation {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string name = BaseName;
|
||||||
Parameters parms = Parameters;
|
Parameters parms = Parameters;
|
||||||
is_get = ((((parms.IsAccessor && retval.IsVoid) || (parms.Count == 0 && !retval.IsVoid)) || (parms.Count == 0 && !retval.IsVoid)) && Name.Length > 3 && (Name.StartsWith ("Get") || Name.StartsWith ("Is") || Name.StartsWith ("Has")));
|
is_get = ((((parms.IsAccessor && retval.IsVoid) || (parms.Count == 0 && !retval.IsVoid)) || (parms.Count == 0 && !retval.IsVoid)) && name.Length > 3 && (name.StartsWith ("Get") || name.StartsWith ("Is") || name.StartsWith ("Has")));
|
||||||
is_set = ((parms.IsAccessor || (parms.VisibleCount == 1 && retval.IsVoid)) && (Name.Length > 3 && Name.Substring(0, 3) == "Set"));
|
is_set = ((parms.IsAccessor || (parms.VisibleCount == 1 && retval.IsVoid)) && (name.Length > 3 && name.Substring(0, 3) == "Set"));
|
||||||
|
|
||||||
call = "(" + (IsStatic ? "" : container_type.CallByName () + (parms.Count > 0 ? ", " : "")) + Body.GetCallString (is_set) + ")";
|
call = "(" + (IsStatic ? "" : container_type.CallByName () + (parms.Count > 0 ? ", " : "")) + Body.GetCallString (is_set) + ")";
|
||||||
|
|
||||||
@ -113,7 +124,7 @@ namespace GtkSharp.Generation {
|
|||||||
else
|
else
|
||||||
complement = 'G';
|
complement = 'G';
|
||||||
|
|
||||||
return container_type.GetMethod (complement + name.Substring (1));
|
return container_type.GetMethod (complement + BaseName.Substring (1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Declaration {
|
public string Declaration {
|
||||||
|
Loading…
Reference in New Issue
Block a user