Example #1
0
 static void OverrideScrollChild(GLib.GType gtype, ScrollChildNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("scroll_child"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Example #2
0
        private void InternalScrollChild(Gtk.ScrollType scroll, bool horizontal)
        {
            ScrollChildNativeDelegate unmanaged = class_abi.BaseOverride <ScrollChildNativeDelegate>(this.LookupGType(), "scroll_child");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, (int)scroll, horizontal);
        }
Example #3
0
        private void InternalScrollChild(Gtk.ScrollType scroll, bool horizontal)
        {
            ScrollChildNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle, (int)scroll, horizontal);
        }
Example #4
0
		static void OverrideScrollChild (GLib.GType gtype, ScrollChildNativeDelegate callback)
		{
			GtkScrolledWindowClass class_iface = GetClassStruct (gtype, false);
			class_iface.ScrollChild = callback;
			OverrideClassStruct (gtype, class_iface);
		}