Пример #1
0
 static void OverrideGetFrameTime(GLib.GType gtype, GetFrameTimeNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_frame_time"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Пример #2
0
        private long InternalGetFrameTime()
        {
            GetFrameTimeNativeDelegate unmanaged = class_abi.BaseOverride <GetFrameTimeNativeDelegate>(this.LookupGType(), "get_frame_time");

            if (unmanaged == null)
            {
                return(0);
            }

            long __result = unmanaged(this.Handle);

            return(__result);
        }
Пример #3
0
        private long InternalGetFrameTime()
        {
            GetFrameTimeNativeDelegate unmanaged = null;

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

            long __result = unmanaged(this.Handle);

            return(__result);
        }