Skip to content

byfourthwall/em-termbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

em-termbox

MIT License

Emeralds wrapper for termbox library.

Installation

em install https://github.com/byfourthwall/em-termbox

Usage

#include "em-termbox.h"

int main(int argc, char **argv) {
  struct tb_event ev;
  int y = 0;

  tb_init();

  tb_printf(0, y++, TB_GREEN, 0, "hello from termbox");
  tb_printf(0, y++, 0, 0, "width=%d height=%d", tb_width(), tb_height());
  tb_printf(0, y++, 0, 0, "press any key...");
  tb_present();

  tb_poll_event(&ev);

  y++;
  tb_printf(0, y++, 0, 0, "event type=%d key=%d ch=%c", ev.type, ev.key, ev.ch);
  tb_printf(0, y++, 0, 0, "press any key to quit...");
  tb_present();

  tb_poll_event(&ev);
  tb_shutdown();

  return 0;
}

Contributing

  1. Fork it (https://github.com/byfourthwall/em-termbox/fork)
  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

  • atha - creator and maintainer

About

termbox2 wrapper for emeralds.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages