Ncurses
Interface to the C ncurses library
Install / Use
/learn @D-Programming-Deimos/NcursesREADME
Ncurses
Description
This repository hosts D bindings for the C library ncurses, as well as some examples.
The bindings are implemented as source-only (.di files), and do not need to be compiled into a library or object files first.
Status
The main C header files are up to date with ncurses 6.3, as it is configured and packaged by Arch Linux.
C++ header files, and the termcap-related header files, are not currently translated.
Build settings
Dub configurations
Three dub configurations are made available, which select which libraries are added to be linked into your application:
-
minimal: The minimal (which is the default configuration) configurations only links the ncursesw library.
-
panels: The panels configuration additionally links the panelw library.
-
full: The full configuration additionally links the formw and menuw library.
To use a specific configuration in your projects, depend on this package by adding the following config snippet to your project's dub.sdl:
subConfiguration "ncurses" "full"
Reentrant API
ncurses provides a reentrant API. If the ncurses library you are linking against was built with the reentrant API enabled, you can enable it in the bindings by building with -version=NCURSES_REENTRANT. In dub.sdl this can be done by adding:
versions "NCURSES_REENTRANT"
Building on macOS
The stock ncurses libraries on macOS don't include the wide libraries. Thus the full ncurses version needs to be installed with Homebrew. Homebrew installs ncurses below /usr/local/opt/ncurses, where the dub configuration will pick it up.
First install Homebrew using the instructions on the web site, then you can add the ncurses package with
brew install ncurses
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
