https://github.com/samuallb/ncurses
Ncurses bindings for Crystal
https://github.com/samuallb/ncurses
crystal crystal-language curses library ncurses ncurses-library
Last synced: 10 months ago
JSON representation
Ncurses bindings for Crystal
- Host: GitHub
- URL: https://github.com/samuallb/ncurses
- Owner: SamualLB
- License: mit
- Created: 2018-07-14T19:09:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-15T05:16:37.000Z (over 1 year ago)
- Last Synced: 2025-04-15T01:07:45.861Z (10 months ago)
- Topics: crystal, crystal-language, curses, library, ncurses, ncurses-library
- Language: Crystal
- Homepage: https://samuallb.github.io/ncurses/
- Size: 187 KB
- Stars: 28
- Watchers: 2
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.com/SamualLB/ncurses)
# ncurses
Ncurses Bindings for Crystal
## Installation
1. Add this to your application's `shard.yml`:
```yaml
dependencies:
ncurses:
github: SamualLB/ncurses
```
2. Run `shards install`
**NOTE**: You may need to install the wide ncurses development library `libncursesw5-dev` (Debian)
## Usage
```crystal
require "ncurses"
```
#### Basic Printing
```crystal
NCurses.start
NCurses.print "Hello world!"
NCurses.end
```
#### Run Examples
Prints input
```text
$ crystal run examples/input.cr
```
Displays text with attributes
```text
$ crystal run examples/attributes.cr
```
Displays text with colors
```text
$ crystal run examples/colors.cr
```
Shows separate windows
```text
$ crystal run examples/windows.cr
```
Mouse interaction with individual windows
```text
$ crystal run examples/window_enclose.cr
```
Scroll when overflowing window
```text
$ crystal run examples/scroll.cr
```
## Contributing
1. Fork it ( https://github.com/SamualLB/ncurses.git )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- (https://github.com/jreinert) Joakim Reinert - creator, maintainer
- (https://github.com/SamualLB) Samual Black - maintainer