如何编写使用终端作为GUI应用程序? (C语言) [英] How to write an application that uses the terminal as GUI? (in C)

查看:522
本文介绍了如何编写使用终端作为GUI应用程序? (C语言)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个应用程序(C语言)使用Unix操作系统作为它的图形用户界面的终端。我的意思是种emacs的,六等是占据整个终端窗口,戒烟后跳回到输入提示的应用程序。结果
你会如何​​去这样做,preferably用C?有人能指出我的教程涵盖了吗?

I'd like to write an application (in C) that uses the terminal of a *nix OS as its GUI. I mean an application of the kinds of emacs, vi etc. that take up the whole terminal window and jump back to the input prompt after quitting.
How would you go about doing that, preferably in C? Can someone point me to a tutorial covering that?

推荐答案

您需要使用ncurses的:

You need to use ncurses:

http://en.wikipedia.org/wiki/Ncurses 结果
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

这是适用于所有主要的发行版。

It is available on all major distros.

这篇关于如何编写使用终端作为GUI应用程序? (C语言)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆