示例#1
0
 static void OverrideGetValue(GLib.GType gtype, GetValueNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_value"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
示例#2
0
        private byte InternalGetValue(out ulong length)
        {
            GetValueNativeDelegate unmanaged = class_abi.BaseOverride <GetValueNativeDelegate>(this.LookupGType(), "get_value");

            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            UIntPtr native_length;
            byte    __result = unmanaged(this.Handle, out native_length);

            length = (ulong)native_length;
            return(__result);
        }
示例#3
0
        private GLib.Value InternalGetValue(ulong timestamp)
        {
            GetValueNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_value"));
                unmanaged = (GetValueNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetValueNativeDelegate));
            }
            if (unmanaged == null)
            {
                return(GLib.Value.Empty);
            }

            IntPtr __result = unmanaged(this.Handle, timestamp);

            return((GLib.Value)Marshal.PtrToStructure(__result, typeof(GLib.Value)));
        }
        private byte InternalGetValue(out ulong length)
        {
            GetValueNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_value"));
                unmanaged = (GetValueNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetValueNativeDelegate));
            }
            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            UIntPtr native_length;
            byte    __result = unmanaged(this.Handle, out native_length);

            length = (ulong)native_length;
            return(__result);
        }