Esempio n. 1
0
 static void OverridePan(GLib.GType gtype, PanNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("pan"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Esempio n. 2
0
        private void InternalPan(Gtk.PanDirection direction, double offset)
        {
            PanNativeDelegate unmanaged = class_abi.BaseOverride <PanNativeDelegate>(this.LookupGType(), "pan");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, (int)direction, offset);
        }
Esempio n. 3
0
        private void InternalPan(Gtk.PanDirection direction, double offset)
        {
            PanNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle, (int)direction, offset);
        }