-
Notifications
You must be signed in to change notification settings - Fork 76
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
discussion: feasibility for clipboard change events #48
Comments
If anyone will find it interesting: On windows i cam up with simple workaround for console applications to get notified on clipboard change events properly https://github.com/DoumanAsh/clipboard-master Basic sequence of actions:
I'm not familiar with Linux/MacOS ways to do it, but considering that Qt does it, it should be possible. |
cdaringe's link demonstrates how to do it on MacOS (via some swift code, which can be adapted to use msg_send!). It looks like x11-clipboard doesn't have an event loop for this feature yet, but it's probably possible to adapt the existing getter loop (i.e. from Clipboard::load), and ideally factor out some common event loop that can be used for both the getter and the notifier. Since it's supportable on all the platforms so far, it's in-scope for the library. As far as interface goes, does adding a function like |
In X11 this can be implement with FixesExt, but I don't have much time. I'd be happy if someone could help. |
@aweinstock314 By
As clipboard is global on windows, having option to read/write in multiple threads is a bad idea. But I also think there should be configuration option to identify type of clipboard change. So maybe it could be something like:
I guess having it as both iterator or channel's receiver would be good. P.s. for Windows I'm also thinking maybe moving into clipboard crate itself. |
hello, i'm interested on being notified when my clipboard changes.
i saw that there may be a way to get clipboard events. would that be something you feel (a) would be feasible for the system types you currently support and (b) would belong in this lib?
thx!
The text was updated successfully, but these errors were encountered: