Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CoreGraphics] Add support for xcode13 beta 5. #12589

Merged

Conversation

mandel-macaque
Copy link
Member

No description provided.

@mandel-macaque mandel-macaque added the note-highlight Worth calling out specifically in release notes label Aug 30, 2021
@spouliot spouliot changed the title [CoreGrpahics] Add support for xcode13 beta 5. [CoreGraphics] Add support for xcode13 beta 5. Aug 30, 2021
#else
[SupportedOSPlatform ("ios15.0"), SupportedOSPlatform ("tvos15.0"), SupportedOSPlatform ("macos12.0"), SupportedOSPlatform ("maccatalyst15.0")]
#endif
public CGColorSpace (IntPtr? profile, NSDictionary options)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I like a nullable IntPtr
ideally we should not expose IntPtr and, if we must, it should be straightforward and similar to the low-level API we have

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear why this is available for iOS since it's only exposed in macOS' NSColorSpace and the framework, ColorSync, is not available outside macOS
https://developer.apple.com/documentation/colorsync/1462094-colorsyncprofilecreate?language=objc

I suggest disabling the API, at least for iOS/tvOS/watchOS, until we know It can be somehow used on those platforms.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was in the same feeling, we do not suppose that so might not give too much to users.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I parse the last part ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tldr; I agree :)

#if !NET
[MacCatalyst (15,0)]
#else
[SupportedOSPlatform ("maccatalyst15.0")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ indent

#if !NET
[MacCatalyst (15,0)]
#else
[SupportedOSPlatform ("maccatalyst15.0")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

#if !NET
[MacCatalyst (15,0)]
#else
[SupportedOSPlatform ("maccatalyst15.0")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent


[Mac (12, 0), iOS (15, 0), TV (15,0), Watch (8,0), MacCatalyst (15,0)]
[Field ("kCGColorSpaceLinearITUR_2020")]
NSString LinearITUR_2020 { get; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Itur

@@ -1,30 +1,15 @@
!missing-enum! CGCaptureOptions not bound
# ignored in macOs too
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: macOS

@@ -9,5 +9,8 @@ namespace ObjCRuntime {

// iOS 9.0
public const string libcompressionLibrary = "/usr/lib/libcompression.dylib";

// xcode 13
public const string ApplicationServicesCoreGraphicsLibrary = "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/CoreGraphics";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is it used ?

https://developer.apple.com/documentation/colorsync/colorsyncprofileref?changes=_4&language=objc hints to it, but no DllImport uses that constant

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the constant string ApplicationServicesCoreGraphicsLibrary used there ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes github links to a line number of a file in a PR SUCK, better link: https://github.com/xamarin/xamarin-macios/blob/main/src/CoreGraphics/CGEvent.cs#L80

[DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)]
		extern static IntPtr CGEventCreateMouseEvent(IntPtr source, CGEventType mouseType, CGPoint mouseCursorPosition, CGMouseButton mouseButton);
			
		public CGEvent (CGEventSource source, CGEventType mouseType, CGPoint mouseCursorPosition, CGMouseButton mouseButton)
		{
			handle = CGEventCreateMouseEvent (source == null ? IntPtr.Zero : source.Handle, mouseType, mouseCursorPosition, mouseButton);
		}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I see it now 👓 thanks!

@spouliot
Copy link
Contributor

also new manual API needs manual unit tests :-)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build] Tests passed on Build. ✅

Tests passed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

🎉 All 108 tests passed 🎉

Pipeline on Agent XAMBOT-1094.BigSur'
Merge e4f3c47 into 57cf3c7

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [PR Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

Test results

3 tests failed, 105 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Debug [dotnet]: Failed (Tests run: 2644 Passed: 2490 Inconclusive: 35 Failed: 1 Ignored: 153)
  • link all/Mac Catalyst/Debug [dotnet]: TimedOut (Execution timed out after 1200 seconds.
    No test log file was produced)
  • framework-test/Mac Catalyst/Debug [dotnet]: TimedOut (Execution timed out after 1200 seconds.
    No test log file was produced)

Pipeline on Agent XAMBOT-1098.BigSur'
Merge 6111f8d into e3e94d7

@mandel-macaque
Copy link
Member Author

@mandel-macaque mandel-macaque merged commit a004b47 into xamarin:main Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
note-highlight Worth calling out specifically in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants