Beispiel #1
0
 static void OverrideChanged(GLib.GType gtype, ChangedNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("changed"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Beispiel #2
0
        private void InternalChanged()
        {
            ChangedNativeDelegate unmanaged = class_abi.BaseOverride <ChangedNativeDelegate>(this.LookupGType(), "changed");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle);
        }
Beispiel #3
0
        private void InternalChanged(Gtk.RadioAction current)
        {
            ChangedNativeDelegate unmanaged = class_abi.BaseOverride <ChangedNativeDelegate>(this.LookupGType(), "changed");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, current == null ? IntPtr.Zero : current.Handle);
        }
Beispiel #4
0
        private void InternalChanged(GLib.IFile file, GLib.IFile other_file, GLib.FileMonitorEvent event_type)
        {
            ChangedNativeDelegate unmanaged = class_abi.BaseOverride <ChangedNativeDelegate>(this.LookupGType(), "changed");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, file == null ? IntPtr.Zero : ((file is GLib.Object) ? (file as GLib.Object).Handle : (file as GLib.FileAdapter).Handle), other_file == null ? IntPtr.Zero : ((other_file is GLib.Object) ? (other_file as GLib.Object).Handle : (other_file as GLib.FileAdapter).Handle), (int)event_type);
        }
Beispiel #5
0
        private void InternalChanged()
        {
            ChangedNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle);
        }
        private void InternalChanged(GLib.IFile file, GLib.IFile other_file, GLib.FileMonitorEvent event_type)
        {
            ChangedNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle, file == null ? IntPtr.Zero : ((file is GLib.Object) ? (file as GLib.Object).Handle : (file as GLib.FileAdapter).Handle), other_file == null ? IntPtr.Zero : ((other_file is GLib.Object) ? (other_file as GLib.Object).Handle : (other_file as GLib.FileAdapter).Handle), (int)event_type);
        }
Beispiel #7
0
        private void InternalChanged(string key)
        {
            ChangedNativeDelegate unmanaged = null;

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

            IntPtr native_key = GLib.Marshaller.StringToPtrGStrdup(key);

            unmanaged(this.Handle, native_key);
            GLib.Marshaller.Free(native_key);
        }
Beispiel #8
0
		static void OverrideChanged (GLib.GType gtype, ChangedNativeDelegate callback)
		{
			GtkRecentManagerClass class_iface = GetClassStruct (gtype, false);
			class_iface.Changed = callback;
			OverrideClassStruct (gtype, class_iface);
		}
Beispiel #9
0
 static void OverrideChanged(GLib.GType gtype, ChangedNativeDelegate callback)
 {
     OverrideVirtualMethod(gtype, "changed", callback);
 }
Beispiel #10
0
		static void OverrideChanged (GLib.GType gtype, ChangedNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "changed", callback);
		}