static void OverrideApplicationSelected(GLib.GType gtype, ApplicationSelectedNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("application_selected"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Example #2
0
        private void InternalApplicationSelected(GLib.IAppInfo app_info)
        {
            ApplicationSelectedNativeDelegate unmanaged = class_abi.BaseOverride <ApplicationSelectedNativeDelegate>(this.LookupGType(), "application_selected");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, app_info == null ? IntPtr.Zero : ((app_info is GLib.Object) ? (app_info as GLib.Object).Handle : (app_info as GLib.AppInfoAdapter).Handle));
        }
        private void InternalApplicationSelected(GLib.IAppInfo app_info)
        {
            ApplicationSelectedNativeDelegate unmanaged = null;

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

            unmanaged(this.Handle, app_info == null ? IntPtr.Zero : ((app_info is GLib.Object) ? (app_info as GLib.Object).Handle : (app_info as GLib.AppInfoAdapter).Handle));
        }
Example #4
0
		static void OverrideApplicationSelected (GLib.GType gtype, ApplicationSelectedNativeDelegate callback)
		{
			GtkAppChooserWidgetClass class_iface = GetClassStruct (gtype, false);
			class_iface.ApplicationSelected = callback;
			OverrideClassStruct (gtype, class_iface);
		}