mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-16 11:34:47 +02: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>
|
2005-08-09 Dan Winship <danw@novell.com>
|
||||||
|
|
||||||
* generator/OpaqueGen.cs (Generate): Tweak the generated Ref/Unref
|
* generator/OpaqueGen.cs (Generate): Tweak the generated Ref/Unref
|
||||||
|
@ -125,15 +125,15 @@ namespace GtkSharp.Generation {
|
|||||||
|
|
||||||
public override bool Validate ()
|
public override bool Validate ()
|
||||||
{
|
{
|
||||||
if (Parent != null && !Parent.Validate ())
|
if (Parent != null && !Parent.ValidateForSubclass ())
|
||||||
return false;
|
return false;
|
||||||
foreach (string iface in interfaces) {
|
foreach (string iface in interfaces) {
|
||||||
IGeneratable gen = SymbolTable.Table[iface];
|
InterfaceGen igen = SymbolTable.Table[iface] as InterfaceGen;
|
||||||
if (!(gen is InterfaceGen)) {
|
if (igen == null) {
|
||||||
Console.WriteLine (QualifiedName + " implements unknown GInterface " + iface);
|
Console.WriteLine (QualifiedName + " implements unknown GInterface " + iface);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!gen.Validate ()) {
|
if (!igen.ValidateForSubclass ()) {
|
||||||
Console.WriteLine (QualifiedName + " implements invalid GInterface " + iface);
|
Console.WriteLine (QualifiedName + " implements invalid GInterface " + iface);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -194,6 +194,23 @@ namespace GtkSharp.Generation {
|
|||||||
return true;
|
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 {
|
public bool IsDeprecated {
|
||||||
get {
|
get {
|
||||||
return deprecated;
|
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 {
|
string IfaceName {
|
||||||
get {
|
get {
|
||||||
return Name + "Iface";
|
return Name + "Iface";
|
||||||
|
Loading…
Reference in New Issue
Block a user