public bool Seek(long offset, GLib.SeekType type, GLib.Cancellable cancellable) { IntPtr error = IntPtr.Zero; bool raw_ret = g_seekable_seek(Handle, offset, (int)type, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); bool ret = raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
private bool InternalSeek(long offset, GLib.SeekType type, GLib.Cancellable cancellable) { SeekNativeDelegate unmanaged = class_abi.BaseOverride <SeekNativeDelegate>(this.LookupGType(), "seek"); if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr error = IntPtr.Zero; bool __result = unmanaged(this.Handle, offset, (int)type, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); return(__result); }
static bool SeekCallback(IntPtr seekable, long offset, GLib.SeekType type, IntPtr cancellable, out IntPtr error) { error = IntPtr.Zero; try { GLib.SeekableImplementor __obj = GLib.Object.GetObject(seekable, false) as GLib.SeekableImplementor; bool __result = __obj.Seek(offset, type, GLib.Object.GetObject(cancellable) as GLib.Cancellable); return(__result); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, true); // NOTREACHED: above call does not return. throw e; } }
private bool InternalSeek(long offset, GLib.SeekType type, GLib.Cancellable cancellable) { SeekNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("seek")); unmanaged = (SeekNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SeekNativeDelegate)); } if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr error = IntPtr.Zero; bool __result = unmanaged(this.Handle, offset, (int)type, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); return(__result); }
protected virtual bool OnSeek(long offset, GLib.SeekType type, GLib.Cancellable cancellable) { return(InternalSeek(offset, type, cancellable)); }
static extern bool g_seekable_seek(IntPtr raw, long offset, GLib.SeekType type, IntPtr cancellable, out IntPtr error);