Beispiel #1
0
 static void OverrideGatherCandidates(GLib.GType gtype, GatherCandidatesNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("gather_candidates"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Beispiel #2
0
        private bool InternalGatherCandidates()
        {
            GatherCandidatesNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("gather_candidates"));
                unmanaged = (GatherCandidatesNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GatherCandidatesNativeDelegate));
            }
            if (unmanaged == null)
            {
                return(false);
            }

            bool __result = unmanaged(this.Handle);

            return(__result);
        }