2003-02-24 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs : gen GLib.Value ctor, not uint * glib/Object.cs : use GLib.Type in RegisterGType and make the g_object_new ctor use GLib.Type. * glib/Type.cs : new thin wrapper for GValue type * glib/*.cs : s/Type/System.Type svn path=/trunk/gtk-sharp/; revision=11920
This commit is contained in:
parent
0a60bc2916
commit
95fc33f785
7 changed files with 21 additions and 13 deletions
|
@ -1,3 +1,11 @@
|
|||
2003-02-24 Mike Kestner <mkestner@speakeasy.net>
|
||||
|
||||
* generator/ObjectGen.cs : gen GLib.Value ctor, not uint
|
||||
* glib/Object.cs : use GLib.Type in RegisterGType and
|
||||
make the g_object_new ctor use GLib.Type.
|
||||
* glib/Type.cs : new thin wrapper for GValue type
|
||||
* glib/*.cs : s/Type/System.Type
|
||||
|
||||
2003-02-23 Mike Kestner <mkestner@speakeasy.net>
|
||||
|
||||
* generator/GenBase.cs : quote the custom filenames in
|
||||
|
|
|
@ -193,7 +193,7 @@ namespace GtkSharp.Generation {
|
|||
sw.WriteLine("\t\t\tDispose();");
|
||||
sw.WriteLine("\t\t}");
|
||||
sw.WriteLine();
|
||||
sw.WriteLine("\t\tprotected " + Name + "(uint gtype) : base(gtype) {}");
|
||||
sw.WriteLine("\t\tprotected " + Name + "(GLib.Type gtype) : base(gtype) {}");
|
||||
sw.WriteLine("\t\tpublic " + Name + "(IntPtr raw) : base(raw) {}");
|
||||
sw.WriteLine();
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace GLib {
|
|||
{
|
||||
}
|
||||
|
||||
public List (IntPtr raw, Type element_type) : base (raw, element_type)
|
||||
public List (IntPtr raw, System.Type element_type) : base (raw, element_type)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace GLib {
|
|||
private IntPtr list_ptr = IntPtr.Zero;
|
||||
private int length = -1;
|
||||
private bool managed = false;
|
||||
protected Type element_type = null;
|
||||
protected System.Type element_type = null;
|
||||
|
||||
abstract internal IntPtr GetData (IntPtr current);
|
||||
abstract internal IntPtr Next (IntPtr current);
|
||||
|
@ -36,7 +36,7 @@ namespace GLib {
|
|||
{
|
||||
}
|
||||
|
||||
internal ListBase (IntPtr list, Type element_type)
|
||||
internal ListBase (IntPtr list, System.Type element_type)
|
||||
{
|
||||
list_ptr = list;
|
||||
this.element_type = element_type;
|
||||
|
|
|
@ -141,18 +141,18 @@ namespace GLib {
|
|||
[DllImport("gtksharpglue")]
|
||||
static extern uint gtksharp_register_type (string name, uint parent_type);
|
||||
|
||||
public static uint RegisterGType (Type t)
|
||||
public static GLib.Type RegisterGType (System.Type t)
|
||||
{
|
||||
Type parent = t.BaseType;
|
||||
System.Type parent = t.BaseType;
|
||||
PropertyInfo pi = parent.GetProperty ("GType", BindingFlags.DeclaredOnly | BindingFlags.Static | BindingFlags.Public);
|
||||
if (pi == null) {
|
||||
Console.WriteLine ("null PropertyInfo");
|
||||
return 0;
|
||||
return null;
|
||||
}
|
||||
uint parent_gtype = (uint) pi.GetValue (null, null);
|
||||
string name = t.Namespace + t.Name;
|
||||
GtkSharp.ObjectManager.RegisterType (name, t.Namespace + t.Name, t.Assembly.GetName().Name);
|
||||
return gtksharp_register_type (name, parent_gtype);
|
||||
return new GLib.Type (gtksharp_register_type (name, parent_gtype));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -183,9 +183,9 @@ namespace GLib {
|
|||
[DllImport("libgobject-2.0-0.dll")]
|
||||
static extern IntPtr g_object_new (uint gtype, IntPtr dummy);
|
||||
|
||||
public Object (uint gtype)
|
||||
public Object (GLib.Type gtype)
|
||||
{
|
||||
Raw = g_object_new (gtype, IntPtr.Zero);
|
||||
Raw = g_object_new (gtype.Value, IntPtr.Zero);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace GLib {
|
|||
{
|
||||
}
|
||||
|
||||
public SList (IntPtr raw, Type element_type) : base (raw, element_type)
|
||||
public SList (IntPtr raw, System.Type element_type) : base (raw, element_type)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace GtkSharp {
|
|||
protected GLib.Object _obj;
|
||||
protected Delegate _handler;
|
||||
protected int _key;
|
||||
protected Type _argstype;
|
||||
protected System.Type _argstype;
|
||||
|
||||
/// <summary>
|
||||
/// SignalCallback Constructor
|
||||
|
@ -40,7 +40,7 @@ namespace GtkSharp {
|
|||
/// Initializes instance data.
|
||||
/// </remarks>
|
||||
|
||||
public SignalCallback (GLib.Object obj, Delegate eh, Type argstype)
|
||||
public SignalCallback (GLib.Object obj, Delegate eh, System.Type argstype)
|
||||
{
|
||||
_key = _NextKey++;
|
||||
_obj = obj;
|
||||
|
|
Loading…
Reference in a new issue