Use correct GType for GLib.InitiallyUnowned

It's not the same type as GLib.Object but a subclass thereof.
This commit is contained in:
Sebastian Dröge 2020-01-28 12:49:29 +02:00 committed by Harry
parent 1b9fe6a8ed
commit 5b63473a1c
3 changed files with 8 additions and 4 deletions

View file

@ -27,9 +27,14 @@ namespace GLib {
protected InitiallyUnowned (IntPtr raw) : base (raw) {}
delegate IntPtr d_g_initially_unowned_get_type ();
static d_g_initially_unowned_get_type g_initially_unowned_get_type = FuncLoader.LoadFunction<d_g_initially_unowned_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_initially_unowned_get_type"));
public new static GLib.GType GType {
get {
return GType.Object;
IntPtr raw_ret = g_initially_unowned_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}

View file

@ -711,8 +711,8 @@ namespace GLib {
delegate float d_g_value_get_float(ref Value val);
static d_g_value_get_float g_value_get_float = FuncLoader.LoadFunction<d_g_value_get_float>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_float"));
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
delegate IntPtr d_g_value_get_gtype(ref Value val);
static d_g_value_get_type g_value_get_gtype = FuncLoader.LoadFunction<d_g_value_get_variant>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_gtype"));
delegate GLib.GType d_g_value_get_gtype(ref Value val);
static d_g_value_get_gtype g_value_get_gtype = FuncLoader.LoadFunction<d_g_value_get_gtype>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_gtype"));
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
delegate int d_g_value_get_int(ref Value val);
static d_g_value_get_int g_value_get_int = FuncLoader.LoadFunction<d_g_value_get_int>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int"));

View file

@ -5,7 +5,6 @@
{
public Buffer() : base(IntPtr.Zero)
{
owned = true;
Raw = gtk_source_buffer_new(IntPtr.Zero);
}
}