-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add IWindowNative (microsoft.ui.xaml.window.h) #538
Comments
Thanks. Sounds like another case of #66 which is something we are working on. We'll look into it. |
fyi @jonwis reunion/winui should ship a winmd with this definition. |
@riverar - FYI, for C#/.NET 5 we have added COM interop APIs to the Windows SDK projections, and this will ship in the July .NET 5 SDK update: This will make it easier to call interop functions in C#, for example: var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
var folderPicker = new FolderPicker();
WinRT.Interop.InitializeWithWindow.Initialize(folderPicker, hwnd); We are working on the documentation for these new APIs. |
That helps C# but not any other language (like C++ or Rust) as that knowledge is baked/hardcoded into the C# projection. Ideally, we can have metadata that defines this for every language. |
Any updates on this? Emission of IWindowNative helpers in C#/WinRT is not helpful. Why is this such a weird wart? Politics? |
It does seem awkward that the Win32 metadata includes |
Sorry we haven't made progress on this. It's not a problem of politics--we definitely want to have this available to projections. The problem is that this API isn't part of the Windows SDK which is what win32metadata scrapes into the main .winmd. We are working to have the Windows App SDK scrape its headers and provide additional .winmd files in its packages, but we aren't there yet. We're working on it and hope to have it available soon, but it won't show up in Windows.Win32.winmd, it will be in a .winmd that the Windows App SDK ships. |
Just closing old issues. Since creating this issue, I was able to successfully generate any needed metadata for the entire Windows App SDK, so this isn't really needed anymore. |
IWindowNative is in a weird spot. It's in the realm of MUX and owned by their team but it's not an API they'll want to add to their metadata (Microsoft.UI.winmd) for, well, HWND reasons.
But all MUX developers will need this, if they want to perform basic window operations, such as resizing the window (overriding the non-ideal 50%-width-of-display behavior), setting window styles, or even a window title.
There is no indication WinUI 3 will support these operations in time for Project Reunion 1.0 GA.
The text was updated successfully, but these errors were encountered: