标签:c-2 linux clipboard x11 codeblocks
您好我正在编写一个c程序,我需要将剪贴板上的内容变为字符串变量.我找到了很多解决方案,但所有解决方案都是针对Windows编写的.有没有使用QT库的方法?我找到了与X11相关的东西,但不是很清楚.
非常感谢你
解决方法:
您是否尝试首先找到代码而不是实现的程序?我为你做了这个,发现很多使用直接X11调用的实现.我认为最有价值的是this,但你也可以阅读this.只需找到任何程序并查找来源.尝试在维基百科上查看哪些应用程序使用x11剪贴板/选择系统.
The following programs specifically operate on data transfer
mechanisms:
xcutsel
transfers data from selections to cut buffers or vice versa
xclipboard
,glipper
(Gnome),parcellite
(LXDE), andklipper
(KDE) are
clipboard managers, maybewmcliphist
as wellxcb
shows the content of
the cut buffers and allows the user to manipulate them xselection,
xclip
,xsel
andxcopy
are command line programs that copy data to or
from the X selection. xcopy has a verbosity option that helps debug X
selection issues. parcellite also has the ability to read from and
write to specific X selections from the command line.
synergy
is a cross platform tool that allows you to share a clipboard across
multiple computers running multiple operating systems
xfce4-clipman-plugin
is a “clipboard history plugin for the Xfce4
panel” and also a clipboard manager xtranslate looks up words in the
Xselection in a multi-lingual dictionary autocutsel syncs cut buffer
and selection buffer
简而言之,理论上,X11有2个“剪贴板”:实际上是一个键盘和选择 – 你可以通过按鼠标中键将你选中的文字粘贴到你想要的任何地方,而实际的“键盘”是用于主/默认剪贴板目的由不同类型的物体交换.
附:根据我的经验,我不再使用x11了.请享用 :)
标签:c-2,linux,clipboard,x11,codeblocks 来源: https://codeday.me/bug/20190716/1476722.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。