Exemple #1
0
 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);
     }
 }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
		static void OverrideOrientationChanged (GLib.GType gtype, OrientationChangedNativeDelegate callback)
		{
			GtkToolbarClass class_iface = GetClassStruct (gtype, false);
			class_iface.OrientationChanged = callback;
			OverrideClassStruct (gtype, class_iface);
		}