Using native Chrome OS FilesApp for file chooser

Joel Hockey joelhockey at chromium.org
Mon May 17 05:22:01 CDT 2021


I'm one of the Chrome OS developers. I would like to make it possible for
wine apps running in the crostini linux VM to use the Chrome OS native
FilesApp for file chooser when possible.  Using the native FilesApp
improves the UX consistency, and also allows us to let VM apps get access
to files outside the VM which can be shared on-demand when a user selects.

Does wine already have any APIs where a native file chooser dialog can be
configured either during compile or at runtime?  I don't see anything.

I've been looking at the possibilities today, and doing some testing using
Notepad2.exe (since it is the simplest windows app I know).  I see that it
calls GetOpenFilenameW() to launch a file chooser which is implemented
in dlls/comdlg32/filedlg.c GetFileDialog95().  Do most (all) apps use this
same API for a file chooser?

Would GetFileDialog95() be a possible place to call out to a native file
chooser?  I'm not familiar with this space, but I've discovered today that
xdg-desktop-portal dbus APIs (org.freedesktop.portal.FileChooser) could be
a suitable approach.
https://github.com/flatpak/xdg-desktop-portal

I'm planning to look at this a little more and try and get some code
running soon. I can send some patches then, but any help now to point me in
a good direction is appreciated.

Thanks
Joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210517/122295e7/attachment.htm>


More information about the wine-devel mailing list