Esempio n. 1
0
 static void OverrideFill(GLib.GType gtype, FillNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("fill"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Esempio n. 2
0
        private long InternalFill(long count, GLib.Cancellable cancellable)
        {
            FillNativeDelegate unmanaged = class_abi.BaseOverride <FillNativeDelegate>(this.LookupGType(), "fill");

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

            IntPtr error    = IntPtr.Zero;
            IntPtr __result = unmanaged(this.Handle, new IntPtr(count), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);

            return((long)__result);
        }
Esempio n. 3
0
        private Gst.FlowReturn InternalFill(Gst.Buffer buf)
        {
            FillNativeDelegate unmanaged = null;

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

            int __result = unmanaged(this.Handle, buf == null ? IntPtr.Zero : buf.Handle);

            return((Gst.FlowReturn)__result);
        }
        private long InternalFill(long count, GLib.Cancellable cancellable)
        {
            FillNativeDelegate unmanaged = null;

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

            IntPtr error    = IntPtr.Zero;
            IntPtr __result = unmanaged(this.Handle, new IntPtr(count), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);

            return((long)__result);
        }
Esempio n. 5
0
		static void OverrideFill (GLib.GType gtype, FillNativeDelegate callback)
		{
			GBufferedInputStreamClass class_iface = GetClassStruct (gtype, false);
			class_iface.Fill = callback;
			OverrideClassStruct (gtype, class_iface);
		}