Пример #1
0
 static void OverrideActivateItem(GLib.GType gtype, ActivateItemNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("activate_item"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Пример #2
0
        private void InternalActivateItem()
        {
            ActivateItemNativeDelegate unmanaged = class_abi.BaseOverride <ActivateItemNativeDelegate>(this.LookupGType(), "activate_item");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle);
        }
Пример #3
0
        private void InternalActivateItem()
        {
            ActivateItemNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle);
        }
Пример #4
0
		static void OverrideActivateItem (GLib.GType gtype, ActivateItemNativeDelegate callback)
		{
			gtksharp_menuitem_override_activate_item (gtype.GetClassPtr (), callback);
		}
Пример #5
0
		static extern void gtksharp_menuitem_override_activate_item (IntPtr class_struct, ActivateItemNativeDelegate cb);