示例#1
0
 static void OverrideChangeEvent(GLib.GType gtype, ChangeEventNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("change_event"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
示例#2
0
        private bool InternalChangeEvent(out int keys, int n_keys)
        {
            ChangeEventNativeDelegate unmanaged = null;

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

            bool __result = unmanaged(this.Handle, out keys, n_keys);

            return(__result);
        }
示例#3
0
		static void OverrideChangeEvent (GLib.GType gtype, ChangeEventNativeDelegate callback)
		{
			GSettingsClass class_iface = GetClassStruct (gtype, false);
			class_iface.ChangeEvent = callback;
			OverrideClassStruct (gtype, class_iface);
		}