初始化

This commit is contained in:
xhm
2023-11-21 23:05:03 +08:00
commit 2455630dad
2252 changed files with 466529 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
using CPF.Mac.Foundation;
using CPF.Mac.ObjCRuntime;
using System;
namespace CPF.Mac.AppKit
{
public class NSWorkspaceMountEventArgs : NSNotificationEventArgs
{
private static IntPtr k0;
private static IntPtr k1;
public string VolumeLocalizedName
{
get
{
if (k0 == IntPtr.Zero)
{
k0 = Dlfcn.GetIntPtr(Libraries.AppKit.Handle, "NSWorkspaceVolumeLocalizedNameKey");
}
IntPtr intPtr = base.Notification.UserInfo.LowlevelObjectForKey(k0);
if (intPtr == IntPtr.Zero)
{
return null;
}
return NSString.FromHandle(intPtr);
}
}
public NSUrl VolumeUrl
{
get
{
if (k1 == IntPtr.Zero)
{
k1 = Dlfcn.GetIntPtr(Libraries.AppKit.Handle, "NSWorkspaceVolumeURLKey");
}
IntPtr intPtr = base.Notification.UserInfo.LowlevelObjectForKey(k1);
if (intPtr == IntPtr.Zero)
{
return null;
}
return (NSUrl)Runtime.GetNSObject(intPtr);
}
}
public NSWorkspaceMountEventArgs(NSNotification notification)
: base(notification)
{
}
}
}