简体   繁体   English

编码Mac OS X终端仿真器?

[英]Coding a Mac OS X terminal emulator?

I'd like to create a terminal emulator for Mac OS X. The problem is: I have no idea where to start. 我想为Mac OS X创建一个终端模拟器。问题是:我不知道从哪里开始。 Can I just use a whole bunch of NSTasks? 我可以使用一大堆NSTasks吗? Or do I have to read through tons of source code for programs like xterm, urxvt, etc? 或者我是否必须阅读大量的xterm,urxvt等程序的源代码? I don't want a lot of customizability (= no config file parsing), nor complex features, and I'm only gonna use bash as the shell. 我不想要很多可定制性(=没有配置文件解析),也不需要复杂的功能,而且我只想使用bash作为shell。

Thanks for answers! 谢谢你的回答!

-Mike -麦克风

I'd check out Visor: http://code.google.com/p/blacktree-visor/ It's a Quake-style terminal that slides up and down from the edge of the screen. 我要查看Visor: http//code.google.com/p/blacktree-visor/这是一个Quake风格的终端,可以从屏幕边缘上下滑动。

iTerm ( http://iterm.sourceforge.net/ ) would also be a good project to look at (perhaps even better than Visor). iTerm( http://iterm.sourceforge.net/ )也是一个很好的项目(甚至可能比Visor更好)。

As Dave said, iTerm is probably the best place to start. 正如戴夫所说,iTerm可能是最好的起点。

As for others, xterm/urxvt might not be the easiest thing to read for this, since they'll be mapping between VT100 and Xlib, which is kind of low-level. 至于其他人,xterm / urxvt可能不是最容易阅读的东西,因为它们将在VT100和Xlib之间进行映射,这是一种低级别的。 An implementation that might be easier to read is VTE terminal , which GNOME uses, since it'll be mapping between VT100 and GLib/GTK+, which is probably a lot closer to what Mac OS X provides. 一个可能更容易阅读的实现是GNOME使用的VTE终端 ,因为它将在VT100和GLib / GTK +之间进行映射,这可能与Mac OS X提供的更接近。

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM