static void OverridePrefixInserted(GLib.GType gtype, PrefixInsertedNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("insert_prefix")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private bool InternalPrefixInserted(string prefix) { PrefixInsertedNativeDelegate unmanaged = class_abi.BaseOverride <PrefixInsertedNativeDelegate>(this.LookupGType(), "insert_prefix"); if (unmanaged == null) { return(false); } IntPtr native_prefix = GLib.Marshaller.StringToPtrGStrdup(prefix); bool __result = unmanaged(this.Handle, native_prefix); GLib.Marshaller.Free(native_prefix); return(__result); }
private bool InternalPrefixInserted(string prefix) { PrefixInsertedNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("insert_prefix")); unmanaged = (PrefixInsertedNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrefixInsertedNativeDelegate)); } if (unmanaged == null) { return(false); } IntPtr native_prefix = GLib.Marshaller.StringToPtrGStrdup(prefix); bool __result = unmanaged(this.Handle, native_prefix); GLib.Marshaller.Free(native_prefix); return(__result); }