Skip to content

Add GenericInterfaceRegistry#256

Closed
mliberman wants to merge 1 commit into
max/items-source-testfrom
max/add-generic-interface-registry
Closed

Add GenericInterfaceRegistry#256
mliberman wants to merge 1 commit into
max/items-source-testfrom
max/add-generic-interface-registry

Conversation

@mliberman
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor Author

mliberman commented Mar 11, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mliberman mliberman force-pushed the max/items-source-test branch from c3d3b27 to 9cacb51 Compare March 11, 2026 17:23
@mliberman mliberman force-pushed the max/add-generic-interface-registry branch from 37971b2 to 2e381aa Compare March 11, 2026 17:23

/// Enables QueryInterface for Swift-implemented generic interfaces.
///
/// When a Swift collection (e.g. `ArrayVector<Any?>`) is passed to WinRT as `IInspectable`,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

in general a more complete approach would be to support proper generics and runtime pinterface generation. i will work on upstreaming these changes, i have a version of swift-winrt which supports this, along with the few other missing features this repo has. i can work on this if it sounds helpful

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

the main benefit of supporting this is that you can box delegates and use the UIElement.addHandler function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice! Yeah this was a POC that I pushed prematurely, definitely not ready to merge.

Would definitely welcome a PR for that! We ran into the same itemsSource issue described in #159.

@mliberman mliberman closed this Mar 31, 2026
@mliberman mliberman deleted the max/add-generic-interface-registry branch March 31, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants