view finch/libgnt/test/key.c @ 32669:692d32072539

propagate from branch 'im.pidgin.pidgin' (head 662fd6d0faf9634c19691e926ec572bae1df2fd6) to branch 'im.pidgin.cpw.qulogic.gtk3' (head e4a9539c557603484c2ae651f52bacd1509bbac5)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 22 Aug 2011 22:39:32 +0000
parents f104e1d45d85
children
line wrap: on
line source

#include <ncurses.h>

int main()
{
	int ch;

	initscr();
	noecho();
	cbreak();
	refresh();

	WINDOW *win = newpad(20, 30);
	box(win, 0, 0);
	prefresh(win, 0, 0, 0, 0, 19, 29);
	doupdate();

	while ((ch = getch())) {
		printw("%d ", ch);
		refresh();
	}

	endwin();
	return 0;
}