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

feat: Platform runtime helper #18758

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mcNets
Copy link
Contributor

@mcNets mcNets commented Nov 9, 2024

GitHub Issue (If applicable): closes #11545

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

You have to use conditionals to knot the current platform runtime.

What is the new behavior?

You can use RuntimeHelper.CurrentPlatform enumeration.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Follow this conversation:
#18432 (reply in thread)

I've had some issues with the filtered solutions, I've had been able to test it in Skia only.

Please, someone else should check the other platforms.

Internal Issue (If applicable):
#11545

@github-actions github-actions bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Nov 9, 2024
Comment on lines +18 to +22
SkiaGtk,
SkiaWpf,
SkiaX11,
SkiaFrameBuffer,
SkiaMacOS,
Copy link
Member

Choose a reason for hiding this comment

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

SkiaIslands?

SkiaWpf,
SkiaX11,
SkiaFrameBuffer,
SkiaMacOS,
Copy link
Contributor

Choose a reason for hiding this comment

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

When\where\how would Skia* (e.g. SkiaMacOS) be returned ?

There's no code to allow to set it (from the host) since it's returned from a method. An internal Set... method (only for __SKIA__ could be used by the different hosts).

Also if Skia* values are returned when would the lone Skia value be returned ?

You might want to add an extension method, on the enum, like IsSkia() to make it easier to detect all Skia-based platforms (and remove Skia).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/skia ✏️ Categorizes an issue or PR as relevant to Skia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an API to get the current Uno Platform target at runtime
4 participants