static void OverrideOrientationChanged(GLib.GType gtype, OrientationChangedNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("orientation_changed")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalOrientationChanged(Gtk.Orientation orientation) { OrientationChangedNativeDelegate unmanaged = class_abi.BaseOverride <OrientationChangedNativeDelegate>(this.LookupGType(), "orientation_changed"); if (unmanaged == null) { return; } unmanaged(this.Handle, (int)orientation); }
private void InternalOrientationChanged(Gtk.Orientation orientation) { OrientationChangedNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("orientation_changed")); unmanaged = (OrientationChangedNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OrientationChangedNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle, (int)orientation); }
static void OverrideOrientationChanged (GLib.GType gtype, OrientationChangedNativeDelegate callback) { GtkToolbarClass class_iface = GetClassStruct (gtype, false); class_iface.OrientationChanged = callback; OverrideClassStruct (gtype, class_iface); }