static void OverrideLocalFileSetAttributes(GLib.GType gtype, LocalFileSetAttributesNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("local_file_set_attributes")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private bool InternalLocalFileSetAttributes(string filename, GLib.FileInfo info, GLib.FileQueryInfoFlags flags, GLib.Cancellable cancellable) { LocalFileSetAttributesNativeDelegate unmanaged = class_abi.BaseOverride <LocalFileSetAttributesNativeDelegate>(this.LookupGType(), "local_file_set_attributes"); if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup(filename); IntPtr error = IntPtr.Zero; bool __result = unmanaged(this.Handle, native_filename, info == null ? IntPtr.Zero : info.Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); GLib.Marshaller.Free(native_filename); return(__result); }
private bool InternalLocalFileSetAttributes(string filename, GLib.FileInfo info, GLib.FileQueryInfoFlags flags, GLib.Cancellable cancellable) { LocalFileSetAttributesNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("local_file_set_attributes")); unmanaged = (LocalFileSetAttributesNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(LocalFileSetAttributesNativeDelegate)); } if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup(filename); IntPtr error = IntPtr.Zero; bool __result = unmanaged(this.Handle, native_filename, info == null ? IntPtr.Zero : info.Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); GLib.Marshaller.Free(native_filename); return(__result); }
static void OverrideLocalFileSetAttributes (GLib.GType gtype, LocalFileSetAttributesNativeDelegate callback) { GVfsClass class_iface = GetClassStruct (gtype, false); class_iface.LocalFileSetAttributes = callback; OverrideClassStruct (gtype, class_iface); }