[CoreGraphics] Most of CoreGraphics is available in all versions of Mac Catalyst, so mark as such. (#20369)

This commit is contained in:
Rolf Bjarne Kvinge 2024-04-05 20:34:03 +02:00 коммит произвёл GitHub
Родитель f83ec9f2e2
Коммит 5909a2a89a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 46 добавлений и 45 удалений

Просмотреть файл

@ -10,10 +10,10 @@ namespace CoreGraphics
{ {
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGCaptureOptions : uint public enum CGCaptureOptions : uint
{ {
@ -22,10 +22,10 @@ namespace CoreGraphics
} }
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public static class CGDisplay public static class CGDisplay
{ {
@ -86,9 +86,10 @@ namespace CoreGraphics
public static extern void RestoreColorSyncSettings (); public static extern void RestoreColorSyncSettings ();
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
[ObsoletedOSPlatform ("macos10.9")] [ObsoletedOSPlatform ("macos10.9")]
[ObsoletedOSPlatform ("maccatalyst13.1")]
#else #else
[Deprecated (PlatformName.MacOSX, 10, 9)] [Deprecated (PlatformName.MacOSX, 10, 9)]
#endif #endif

Просмотреть файл

@ -30,10 +30,10 @@ using NativeHandle = System.IntPtr;
namespace CoreGraphics { namespace CoreGraphics {
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public sealed class CGEvent : NativeObject { public sealed class CGEvent : NativeObject {
public delegate IntPtr CGEventTapCallback (IntPtr tapProxyEvent, CGEventType eventType, IntPtr eventRef, IntPtr userInfo); public delegate IntPtr CGEventTapCallback (IntPtr tapProxyEvent, CGEventType eventType, IntPtr eventRef, IntPtr userInfo);

Просмотреть файл

@ -25,10 +25,10 @@ using NativeHandle = System.IntPtr;
namespace CoreGraphics { namespace CoreGraphics {
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public sealed class CGEventSource : NativeObject { public sealed class CGEventSource : NativeObject {
#if !NET #if !NET

Просмотреть файл

@ -25,10 +25,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint32_t CGEventTapLocation; // CGEventTypes.h:typedef uint32_t CGEventTapLocation;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGEventTapLocation : int { public enum CGEventTapLocation : int {
HID, HID,
@ -38,10 +38,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint32_t CGEventTapPlacement; // CGEventTypes.h:typedef uint32_t CGEventTapPlacement;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGEventTapPlacement : uint { public enum CGEventTapPlacement : uint {
HeadInsert, HeadInsert,
@ -50,10 +50,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint32_t CGEventTapOptions; // CGEventTypes.h:typedef uint32_t CGEventTapOptions;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGEventTapOptions : uint { public enum CGEventTapOptions : uint {
Default, Default,
@ -62,10 +62,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint32_t CGMouseButton; // CGEventTypes.h:typedef uint32_t CGMouseButton;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGMouseButton : uint { public enum CGMouseButton : uint {
Left, Right, Center Left, Right, Center
@ -73,10 +73,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint32_t CGScrollEventUnit; // CGEventTypes.h:typedef uint32_t CGScrollEventUnit;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGScrollEventUnit : uint { public enum CGScrollEventUnit : uint {
Pixel, Line Pixel, Line
@ -84,10 +84,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint64_t CGEventMask; // CGEventTypes.h:typedef uint64_t CGEventMask;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
[Flags] [Flags]
public enum CGEventMask : ulong { public enum CGEventMask : ulong {
@ -112,10 +112,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint64_t CGEventFlags; // CGEventTypes.h:typedef uint64_t CGEventFlags;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
[Flags] [Flags]
public enum CGEventFlags : ulong { public enum CGEventFlags : ulong {
@ -132,10 +132,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint32_t CGEventField; // CGEventTypes.h:typedef uint32_t CGEventField;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
internal enum CGEventField : int { internal enum CGEventField : int {
MouseEventNumber = 0, MouseEventNumber = 0,
@ -202,10 +202,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint32_t CGEventType; // CGEventTypes.h:typedef uint32_t CGEventType;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGEventType : uint { public enum CGEventType : uint {
Null = 0x0, Null = 0x0,
@ -231,10 +231,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint32_t CGEventMouseSubtype; // CGEventTypes.h:typedef uint32_t CGEventMouseSubtype;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGEventMouseSubtype : uint { public enum CGEventMouseSubtype : uint {
Default, TabletPoint, TabletProximity Default, TabletPoint, TabletProximity
@ -242,10 +242,10 @@ namespace CoreGraphics {
// CGEventTypes.h:typedef uint32_t CGEventSourceStateID; // CGEventTypes.h:typedef uint32_t CGEventSourceStateID;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGEventSourceStateID : int { public enum CGEventSourceStateID : int {
Private = -1, CombinedSession = 0, HidSystem = 1 Private = -1, CombinedSession = 0, HidSystem = 1
@ -253,10 +253,10 @@ namespace CoreGraphics {
// CGRemoteOperation.h:typedef uint32_t CGEventFilterMask; // CGRemoteOperation.h:typedef uint32_t CGEventFilterMask;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
[Flags] [Flags]
public enum CGEventFilterMask : uint { public enum CGEventFilterMask : uint {
@ -267,10 +267,10 @@ namespace CoreGraphics {
// CGRemoteOperation.h:typedef uint32_t CGEventSuppressionState; // CGRemoteOperation.h:typedef uint32_t CGEventSuppressionState;
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public enum CGEventSuppressionState : int { public enum CGEventSuppressionState : int {
SuppressionInterval, SuppressionInterval,

Просмотреть файл

@ -44,10 +44,10 @@ namespace CoreGraphics {
#if MONOMAC || __MACCATALYST__ #if MONOMAC || __MACCATALYST__
// uint32_t -> CGWindow.h (OSX SDK only) // uint32_t -> CGWindow.h (OSX SDK only)
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
[Flags] [Flags]
public enum CGWindowImageOption : uint { public enum CGWindowImageOption : uint {
@ -61,10 +61,10 @@ namespace CoreGraphics {
// uint32_t -> CGWindow.h (OSX SDK only) // uint32_t -> CGWindow.h (OSX SDK only)
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
[Flags] [Flags]
public enum CGWindowListOption : uint { public enum CGWindowListOption : uint {
@ -252,23 +252,23 @@ namespace CoreGraphics {
#if MONOMAC || __MACCATALYST__ #if MONOMAC || __MACCATALYST__
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("ios")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("tvos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
[DllImport (Constants.CoreGraphicsLibrary)] [DllImport (Constants.CoreGraphicsLibrary)]
static extern IntPtr CGWindowListCreateImage(CGRect screenBounds, CGWindowListOption windowOption, uint windowID, CGWindowImageOption imageOption); static extern IntPtr CGWindowListCreateImage(CGRect screenBounds, CGWindowListOption windowOption, uint windowID, CGWindowImageOption imageOption);
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("ios")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("tvos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public static CGImage? ScreenImage (int windownumber, CGRect bounds) public static CGImage? ScreenImage (int windownumber, CGRect bounds)
{ {
@ -276,12 +276,12 @@ namespace CoreGraphics {
} }
#if NET #if NET
[SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("ios")]
[SupportedOSPlatform ("macos")] [SupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("tvos")]
#else #else
[MacCatalyst (15,0)] [MacCatalyst (13,1)]
#endif #endif
public static CGImage? ScreenImage (int windownumber, CGRect bounds, CGWindowListOption windowOption, public static CGImage? ScreenImage (int windownumber, CGRect bounds, CGWindowListOption windowOption,
CGWindowImageOption imageOption) CGWindowImageOption imageOption)