* generator/ClassBase.cs: Converted String uses to the string alias.

* generator/ConstStringGen.cs: Ditto
        * generator/Ctor.cs: Ditto
        * generator/EnumGen.cs: Ditto
        * generator/ManualGen.cs: Ditto
        * generator/SignalHandler.cs: Ditto
        * generator/StringGen.cs: Ditto

svn path=/trunk/gtk-sharp/; revision=22710
This commit is contained in:
Martin Willemoes Hansen 2004-02-02 20:19:43 +00:00
parent 84781a4d74
commit 058077b7f1
8 changed files with 32 additions and 22 deletions

View file

@ -1,3 +1,13 @@
2004-02-02 Martin Willemoes Hansen <mwh@sysrq.dk>
* generator/ClassBase.cs: Converted String uses to the string alias.
* generator/ConstStringGen.cs: Ditto
* generator/Ctor.cs: Ditto
* generator/EnumGen.cs: Ditto
* generator/ManualGen.cs: Ditto
* generator/SignalHandler.cs: Ditto
* generator/StringGen.cs: Ditto
2004-02-02 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : add dispose queue and idle handler so we can

View file

@ -104,45 +104,45 @@ namespace GtkSharp.Generation {
}
}
public virtual String MarshalType {
public virtual string MarshalType {
get
{
return "IntPtr";
}
}
public virtual String MarshalReturnType {
public virtual string MarshalReturnType {
get
{
return "IntPtr";
}
}
public virtual String CallByName (String var_name)
public virtual string CallByName (string var_name)
{
return var_name + ".Handle";
}
public virtual String CallByName ()
public virtual string CallByName ()
{
return "Handle";
}
public virtual String AssignToName {
public virtual string AssignToName {
get { return "Raw"; }
}
public virtual String FromNative(String var)
public virtual string FromNative(string var)
{
return "(" + QualifiedName + ") GLib.Object.GetObject(" + var + ")";
}
public virtual String FromNativeReturn(String var)
public virtual string FromNativeReturn(string var)
{
return FromNative (var);
}
public virtual String ToNativeReturn(String var)
public virtual string ToNativeReturn(string var)
{
return CallByName (var);
}

View file

@ -14,14 +14,14 @@ namespace GtkSharp.Generation {
{
}
public override String MarshalReturnType {
public override string MarshalReturnType {
get
{
return "IntPtr";
}
}
public override String FromNativeReturn(String var)
public override string FromNativeReturn(string var)
{
return "Marshal.PtrToStringAnsi(" + var + ")";
}

View file

@ -20,7 +20,7 @@ namespace GtkSharp.Generation {
private ImportSignature isig = null;
private MethodBody body = null;
private bool preferred;
private String clashName = null;
private string clashName = null;
private ClassBase container_type;
private bool force_static;

View file

@ -14,35 +14,35 @@ namespace GtkSharp.Generation {
public EnumGen (XmlElement ns, XmlElement elem) : base (ns, elem) {}
public String MarshalType {
public string MarshalType {
get
{
return "int";
}
}
public String MarshalReturnType {
public string MarshalReturnType {
get
{
return MarshalType;
}
}
public String CallByName (String var_name)
public string CallByName (string var_name)
{
return "(int) " + var_name;
}
public String FromNative(String var)
public string FromNative(string var)
{
return "(" + QualifiedName + ")" + var;
}
public String FromNativeReturn(String var)
public string FromNativeReturn(string var)
{
return FromNative (var);
}
public virtual String ToNativeReturn(String var)
public virtual string ToNativeReturn(string var)
{
return CallByName (var);
}

View file

@ -78,7 +78,7 @@ namespace GtkSharp.Generation {
return FromNative (var);
}
public virtual String ToNativeReturn(String var)
public virtual string ToNativeReturn(string var)
{
return CallByName (var);
}

View file

@ -180,11 +180,11 @@ namespace GtkSharp.Generation {
}
sw.WriteLine("\t\t[DllImport(\"libgobject-2.0-0.dll\")]");
sw.Write("\t\tstatic extern uint g_signal_connect_data(");
sw.Write("IntPtr obj, String name, " + DelegateName + " cb, int key, IntPtr p,");
sw.Write("IntPtr obj, string name, " + DelegateName + " cb, int key, IntPtr p,");
sw.WriteLine(" int flags);");
sw.WriteLine();
sw.Write("\t\tpublic " + Name + "(GLib.Object obj, IntPtr raw, ");
sw.WriteLine("String name, Delegate eh, Type argstype) : base(obj, eh, argstype)");
sw.WriteLine("string name, Delegate eh, Type argstype) : base(obj, eh, argstype)");
sw.WriteLine("\t\t{");
sw.WriteLine("\t\t\tif (_Delegate == null) {");
sw.WriteLine("\t\t\t\t_Delegate = new " + DelegateName + "(" + CallbackName + ");");

View file

@ -14,12 +14,12 @@ namespace GtkSharp.Generation {
{
}
public override String FromNativeReturn(String var)
public override string FromNativeReturn(String var)
{
return "GLibSharp.Marshaller.PtrToStringGFree(" + var + ")";
}
public override String ToNativeReturn(String var)
public override string ToNativeReturn(String var)
{
return "GLibSharp.Marshaller.StringToPtrGStrdup(" + var + ")";
}