开发者

gtkmm and the system clipboard

开发者 https://www.devze.com 2023-03-28 07:20 出处:网络
I am wondering if there is a signal anywhere in gtkmm that is emitted when the system clipboard contents change/someone copies text.I looked into the gtk docs and it seems the only signal emitted by t

I am wondering if there is a signal anywhere in gtkmm that is emitted when the system clipboard contents change/someone copies text. I looked into the gtk docs and it seems the only signal emitted by the Gtk::Clipboard object is the owner_changed signal. To be more specific, I don't care who changes the system clipboard whether it be my app (which it wont be) or the user.

My only other option to implement this is t开发者_开发技巧o loop and keep checking the clipboard for a change. Was hoping there was a more efficient means of accomplishing this.

Anyone know of a signal?

Thanks.


I'd take a look at this example. I did not compile and run it, but I think it is indicating that the "owner_changed" signal will do what you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号