Unix中的鼠标编程 [英] Mouse programming in Unix
问题描述
团队,
我想为Unix系统准备一个文本编辑器,甚至想编写一个鼠标以在编辑器中从一个位置移动到另一个位置,并且还要使用滚动条.但是,请您告诉我如何在Unix中完成所有操作.
小提示:由于大多数Unix用户都将通过Putty访问服务器,因此我希望对编辑器进行编程,使得只要有人尝试使用我的编辑器,都可以通过Putty来显示鼠标.
很少的详细说明对我启动这个项目真的很有帮助.
问候,
Kiran
Hi Team,
I want to prepare a Text Editor for unix systems and would like to even program a mouse for moving from One Location to Another location in the editor and also use scroll bars. But can you please tell me how can all this be done in Unix.
Little Hint: Since most of the Unix Users will be accessing the server through Putty, i would like to program my editor in such a way that through putty when ever some one tries to use my editor, mouse should also appear.
Little detailed explanation would be really helpful for me to start this project.
Regards,
Kiran
推荐答案
使用 ncurses [ ^ ]库,以创建鼠标可控制的字符模式程序.服务器必须运行 gpm [
Use the ncurses[^] library to make a mouse-controllable character mode program. The server must run gpm[^] for mouse support on text consoles like PuTTY.
您应该尝试使用PuTTY网站有关使用X11类似功能的信息.互联网上还有很多资源可以帮助您编写XTerm模拟器.
You should try the PuTTY website for information about using X11 like features this way. There are also lots of resources on the internet that will help you write an XTerm emulator.
这篇关于Unix中的鼠标编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!