static void OverrideSetChildProperty(GLib.GType gtype, SetChildPropertyNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("set_child_property")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalSetChildProperty(Gtk.Widget child, uint property_id, GLib.Value value, IntPtr pspec) { SetChildPropertyNativeDelegate unmanaged = class_abi.BaseOverride <SetChildPropertyNativeDelegate>(this.LookupGType(), "set_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 InternalSetChildProperty(Gtk.Widget child, uint property_id, GLib.Value value, IntPtr pspec) { SetChildPropertyNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("set_child_property")); unmanaged = (SetChildPropertyNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetChildPropertyNativeDelegate)); } 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 OverrideSetChildProperty (GLib.GType gtype, SetChildPropertyNativeDelegate callback) { gtksharp_container_override_set_child_property (gtype.GetClassPtr (), callback); }
static extern void gtksharp_container_override_set_child_property (IntPtr class_struct, SetChildPropertyNativeDelegate cb);