mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-03-31 04:27:02 +00:00
* generator/ClassBase.cs (Validate): Don't fully validate the
parent class and interfaces (because we don't want to see the warnings about certain GtkWidget methods in every single library that defines a widget, etc). Instead, use the new ValidateForSubclass() method. (ValidateForSubclass): only validate the signals * generator/InterfaceGen.cs (ValidateForSubclass): for interfaces we need to validate the methods too. svn path=/trunk/gtk-sharp/; revision=48177
This commit is contained in:
parent
12cd8d0d17
commit
9a71bd5ee2
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2005-08-09 Dan Winship <danw@novell.com>
|
||||
|
||||
* generator/ClassBase.cs (Validate): Don't fully validate the
|
||||
parent class and interfaces (because we don't want to see the
|
||||
warnings about certain GtkWidget methods in every single library
|
||||
that defines a widget, etc). Instead, use the new
|
||||
ValidateForSubclass() method.
|
||||
(ValidateForSubclass): only validate the signals
|
||||
|
||||
* generator/InterfaceGen.cs (ValidateForSubclass): for interfaces
|
||||
we need to validate the methods too.
|
||||
|
||||
2005-08-09 Dan Winship <danw@novell.com>
|
||||
|
||||
* generator/OpaqueGen.cs (Generate): Tweak the generated Ref/Unref
|
||||
|
|
|
@ -125,15 +125,15 @@ namespace GtkSharp.Generation {
|
|||
|
||||
public override bool Validate ()
|
||||
{
|
||||
if (Parent != null && !Parent.Validate ())
|
||||
if (Parent != null && !Parent.ValidateForSubclass ())
|
||||
return false;
|
||||
foreach (string iface in interfaces) {
|
||||
IGeneratable gen = SymbolTable.Table[iface];
|
||||
if (!(gen is InterfaceGen)) {
|
||||
InterfaceGen igen = SymbolTable.Table[iface] as InterfaceGen;
|
||||
if (igen == null) {
|
||||
Console.WriteLine (QualifiedName + " implements unknown GInterface " + iface);
|
||||
return false;
|
||||
}
|
||||
if (!gen.Validate ()) {
|
||||
if (!igen.ValidateForSubclass ()) {
|
||||
Console.WriteLine (QualifiedName + " implements invalid GInterface " + iface);
|
||||
return false;
|
||||
}
|
||||
|
@ -194,6 +194,23 @@ namespace GtkSharp.Generation {
|
|||
return true;
|
||||
}
|
||||
|
||||
public virtual bool ValidateForSubclass ()
|
||||
{
|
||||
ArrayList invalids = new ArrayList ();
|
||||
|
||||
foreach (Signal sig in sigs.Values) {
|
||||
if (!sig.Validate ()) {
|
||||
Console.WriteLine ("in type " + QualifiedName);
|
||||
invalids.Add (sig);
|
||||
}
|
||||
}
|
||||
foreach (Signal sig in invalids)
|
||||
sigs.Remove (sig.Name);
|
||||
invalids.Clear ();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool IsDeprecated {
|
||||
get {
|
||||
return deprecated;
|
||||
|
|
|
@ -52,6 +52,23 @@ namespace GtkSharp.Generation {
|
|||
}
|
||||
}
|
||||
|
||||
public override bool ValidateForSubclass ()
|
||||
{
|
||||
ArrayList invalids = new ArrayList ();
|
||||
|
||||
foreach (Method method in methods.Values) {
|
||||
if (!method.Validate ()) {
|
||||
Console.WriteLine ("in type " + QualifiedName);
|
||||
invalids.Add (method);
|
||||
}
|
||||
}
|
||||
foreach (Method method in invalids)
|
||||
methods.Remove (method.Name);
|
||||
invalids.Clear ();
|
||||
|
||||
return base.ValidateForSubclass ();
|
||||
}
|
||||
|
||||
string IfaceName {
|
||||
get {
|
||||
return Name + "Iface";
|
||||
|
|
Loading…
Reference in a new issue