static void OverrideGetStdin(GLib.GType gtype, GetStdinNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_stdin"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Ejemplo n.º 2
0
        private GLib.InputStream InternalGetStdin()
        {
            GetStdinNativeDelegate unmanaged = class_abi.BaseOverride <GetStdinNativeDelegate>(this.LookupGType(), "get_stdin");

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

            IntPtr __result = unmanaged(this.Handle);

            return(GLib.Object.GetObject(__result) as GLib.InputStream);
        }
        private GLib.InputStream InternalGetStdin()
        {
            GetStdinNativeDelegate unmanaged = null;

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

            IntPtr __result = unmanaged(this.Handle);

            return(GLib.Object.GetObject(__result) as GLib.InputStream);
        }