Linux / Unix控制台图形/控制 [英] Linux/Unix Console Graphics/Control

查看:238
本文介绍了Linux / Unix控制台图形/控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用C来更好地控制输入和输出来创建控制台应用程序。例如,文本编辑器nano如何在屏幕的某个部分显示文件内容,然后保留列表命令固定在底部。我知道你可以使用win32 api在Windows中执行此操作,但是什么是Unix / Linux的对等体?

I would like to know how to create console applications with better control of input and output using C. For example, how does the text-editor nano display the file contents in a certain portion of the screen and then keep a list of commands stationary on the bottom. I know you can use the win32 api to do this in Windows, but what is the Unix/Linux equivalent?

推荐答案

可能有一个 ncurses 界面,用于控制屏幕上的项目在屏幕上的放置和位置位置。 api是linux系统和unix上的标准,一些可能是根据unix的商业变体使用的curses变体定义的实现,但是一些标准的ncurses功能是兼容的。

More than likely there's a ncurses interface that controls the screen drawing and placement of items on the screen in a certain position. The api is standard across the linux systems and on unix also, some may be implementation defined depending on the variant of curses used under the commercial variants of unix but otherwise some standard ncurses functionality are compatible.

希望这有助于,
最好的问候,
汤姆。

Hope this helps, Best regards, Tom.

这篇关于Linux / Unix控制台图形/控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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