Exemple #1
0
 static void OverrideGetStartupNotifyId(GLib.GType gtype, GetStartupNotifyIdNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_startup_notify_id"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Exemple #2
0
        private string InternalGetStartupNotifyId(GLib.IAppInfo info, GLib.List files)
        {
            GetStartupNotifyIdNativeDelegate unmanaged = class_abi.BaseOverride <GetStartupNotifyIdNativeDelegate>(this.LookupGType(), "get_startup_notify_id");

            if (unmanaged == null)
            {
                return(null);
            }

            IntPtr __result = unmanaged(this.Handle, info == null ? IntPtr.Zero : ((info is GLib.Object) ? (info as GLib.Object).Handle : (info as GLib.AppInfoAdapter).Handle), files == null ? IntPtr.Zero : files.Handle);

            return(GLib.Marshaller.PtrToStringGFree(__result));
        }
Exemple #3
0
        private string InternalGetStartupNotifyId(GLib.IAppInfo info, GLib.List files)
        {
            GetStartupNotifyIdNativeDelegate unmanaged = null;

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

            IntPtr __result = unmanaged(this.Handle, info == null ? IntPtr.Zero : ((info is GLib.Object) ? (info as GLib.Object).Handle : (info as GLib.AppInfoAdapter).Handle), files == null ? IntPtr.Zero : files.Handle);

            return(GLib.Marshaller.PtrToStringGFree(__result));
        }
		static void OverrideGetStartupNotifyId (GLib.GType gtype, GetStartupNotifyIdNativeDelegate callback)
		{
			GAppLaunchContextClass class_iface = GetClassStruct (gtype, false);
			class_iface.GetStartupNotifyId = callback;
			OverrideClassStruct (gtype, class_iface);
		}