找出是否已在ncurses.h中设置了光标

发布于 2025-02-08 13:25:22 字数 130 浏览 2 评论 0原文

我正在为菜单创建一个包装器

curs_set(0);

。设置...

tldr :是否有任何方法可以找出CURS_SET的当前设置?

I'm creating a wrapper for menu.h and want to ensure that when a menu is displayed, the cursor is turned off, however I don't want to just do a

curs_set(0);

and potentially screw up some other ui that depends on a certain cursor setting...

TLDR: is there any way to find out the current setting of curs_set?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笙痞 2025-02-15 13:25:23

它在

curs_set 例程将光标状态设置为隐形,正常或
非常可见的可见性分别等于0、1或2。 如果是
终端支持所请求的可见性,先前的光标状态
返回
;否则,返回了 err

It's in the manual page:

The curs_set routine sets the cursor state to invisible, normal, or
very visible for visibility equal to 0, 1, or 2 respectively. If the
terminal supports the visibility requested, the previous cursor state
is returned
; otherwise, ERR is returned.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文