-
Notifications
You must be signed in to change notification settings - Fork 177
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
File Drag & Drop Support? #80
Comments
This comment has been minimized.
This comment has been minimized.
Hi, it would definitely need to be implemented in all three platforms we support. I've considered that maybe we could switch to winit for windowing, so we do not have to maintain separate windowing code but even winit does not have drag & drop implemented (see rust-windowing/winit#720). It will probably be difficult to get right for all the platforms, but maybe we can start with Windows as a prototype first? EDIT: Oh, it seems that winit has some basic drop file support. |
I cannot promise anything, but I can definitely start poking OLE API around for drag & drop support. (Maybe we can even use com-rs for this?) |
Is there any advantage in using com-rs instead of using winapi-rs directly? But sure, use whatever you want, write it in Rust, write it in C, whatever suits you, we can iterate on that after we've got something working :). |
I investigated more and we would most certainly need to use com-rs because winapi-rs does not have the required interfaces implemented, there are PRs to add many remaining interfaces we need such as IOleObject, but if we use com-rs we can define them ourselves, instead of waiting for them to be merged into winapi-rs (they sit there for quite some time). |
Has there been any progress on this issue? Or perhaps a workaround for a MacOS platform? |
What is the advantage of implementing this in webview instead of pointing users to the js api designed to handle this? https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop |
@FreeMasen I was under the impression that the javascript drag and drop api does not give you the full path name of the file and needs to be implemented in webview. see the issue in the webview repository. |
That is correct you cannot get the true file path, however you can get the bytes and the file name which could be passed through the existing eventing system. |
My application needs to listen for file system events on the file dragged into the application, so direct access to the full path is needed. So I still think that this would be a useful feature to implement within Webview rather than just the JavaScript api. There might be some way to implement file system notifications within JavaScript, but it seems a hacky workaround. |
I am using this crate via neutrino for a Windows-specific desktop app and in need of file drag & drop support.
I don't know much about WinAPI stuff, but looked some things up: can it be as easy as implementing
UI_GetDropTarget()
function?The text was updated successfully, but these errors were encountered: