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

Decide what WinRT classes to feature/include for next release #461

Closed
timsneath opened this issue May 31, 2022 · 2 comments · Fixed by #551
Closed

Decide what WinRT classes to feature/include for next release #461

timsneath opened this issue May 31, 2022 · 2 comments · Fixed by #551
Labels
quality Truly polished experience

Comments

@timsneath
Copy link
Contributor

We haven't shipped an updated version to pub.dev for a little while, because there's been lots of (good) churn on the WinRT front.

Before we ship again, we should decide which WinRT classes we publish/export. Right now, I've been adding classes purely based on whether they help us improve the projection, rather than whether they're useful to package consumers. We're still limited to classes that don't require async.

[ ] ApplicationData isn't necessary - that was requested when we were exploring a UWP runner for Flutter.
[X] Calendar and PhoneNumber are quite good examples, even if they're of somewhat useful utility
[X] Gamepad is mostly serviceable, although I need to test it with a real connected controller

What else would be useful to add for this initial wave?

@timsneath timsneath added quality Truly polished experience winrt labels May 31, 2022
@halildurmus
Copy link
Member

halildurmus commented May 31, 2022

I'm almost done adding support for asynchronous APIs (need to update the generator to project these APIs as Future and write some tests). It should be ready for review in a couple of days.). In fact, I plan to send a draft PR tonight, you might want to take a look.

Since Dart doesn't support async callbacks yet, I'm using Completer and polling IAsyncInfo's Status until the function completes (with sleeps in the meantime of course). After the async function completes, I call the GetResults method and use the result to complete the Future with Completer's complete() method. It seems to be working pretty well.

While working on the generator today, I realized that the work I'm going to do would also allow us to project Pointer<COMObject> types to their respective types. For example, ICalendar's Clone() would return Calendar instead of Pointer<COMObject>.

What else would be useful to add for this initial wave?

I don't have anything in my mind right now but after we land these changes, I think we will have a lot of options to choose from 😄.

@timsneath timsneath added this to To do in WinRT projection Jun 6, 2022
@timsneath
Copy link
Contributor Author

timsneath commented Jul 18, 2022

Things to do to ship a 3.0.0-pre (draft for discussion):

  • Move WinRT exports to a separate library/libraries within this package (win32/winrt.dart?) just like winsock2 is exposed as a separate library
  • Establish the nature of the breaking changes, particularly for COM, and write up a migration guide
  • Validate and edit the list of WinRT shipped classes, per comment above
  • Improve documentation and examples for WinRT
  • Tidy up the README by moving the examples table elsewhere and doing a better job of establishing the value proposition of this package
  • Make sure that analyzer lints are resolved in the configuration pana uses them

@timsneath timsneath linked a pull request Aug 30, 2022 that will close this issue
WinRT projection automation moved this from To do to Done Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality Truly polished experience
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants