static void OverrideTextPushed(GLib.GType gtype, TextPushedNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("text_pushed")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalTextPushed(uint context_id, string text) { TextPushedNativeDelegate unmanaged = class_abi.BaseOverride <TextPushedNativeDelegate>(this.LookupGType(), "text_pushed"); if (unmanaged == null) { return; } IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); unmanaged(this.Handle, context_id, native_text); GLib.Marshaller.Free(native_text); }
private void InternalTextPushed(uint context_id, string text) { TextPushedNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("text_pushed")); unmanaged = (TextPushedNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TextPushedNativeDelegate)); } if (unmanaged == null) { return; } IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); unmanaged(this.Handle, context_id, native_text); GLib.Marshaller.Free(native_text); }
static void OverrideTextPushed (GLib.GType gtype, TextPushedNativeDelegate callback) { GtkStatusbarClass class_iface = GetClassStruct (gtype, false); class_iface.TextPushed = callback; OverrideClassStruct (gtype, class_iface); }