static void OverrideGetChildProperty(GLib.GType gtype, GetChildPropertyNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_child_property")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalGetChildProperty(Gtk.Widget child, uint property_id, GLib.Value value, IntPtr pspec) { GetChildPropertyNativeDelegate unmanaged = class_abi.BaseOverride <GetChildPropertyNativeDelegate>(this.LookupGType(), "get_child_property"); if (unmanaged == null) { return; } IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc(value); unmanaged(this.Handle, child == null ? IntPtr.Zero : child.Handle, property_id, native_value, pspec); Marshal.FreeHGlobal(native_value); }
private void InternalGetChildProperty(Gtk.Widget child, uint property_id, GLib.Value value, IntPtr pspec) { GetChildPropertyNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_child_property")); unmanaged = (GetChildPropertyNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetChildPropertyNativeDelegate)); } if (unmanaged == null) { return; } IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc(value); unmanaged(this.Handle, child == null ? IntPtr.Zero : child.Handle, property_id, native_value, pspec); Marshal.FreeHGlobal(native_value); }
static void OverrideGetChildProperty (GLib.GType gtype, GetChildPropertyNativeDelegate callback) { gtksharp_container_override_get_child_property (gtype.GetClassPtr (), callback); }
static extern void gtksharp_container_override_get_child_property (IntPtr class_struct, GetChildPropertyNativeDelegate cb);