Mercurial > pidgin
annotate finch/libgnt/test/key.c @ 23142:dea8b856466e
propagate from branch 'im.pidgin.pidgin.custom_smiley' (head c134ff23eba5faac09c13e731e792fa612c91a9a)
to branch 'im.pidgin.pidgin.next.minor' (head 4d2d20241c7dac5915e142f0aa9811c9eab40111)
| author | Sadrul Habib Chowdhury <imadil@gmail.com> |
|---|---|
| date | Mon, 12 May 2008 23:17:48 +0000 |
| parents | f104e1d45d85 |
| children |
| rev | line source |
|---|---|
| 15817 | 1 #include <ncurses.h> |
| 2 | |
| 3 int main() | |
| 4 { | |
| 5 int ch; | |
| 6 | |
|
18510
f104e1d45d85
Changes to the test apps.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
7 initscr(); |
| 15817 | 8 noecho(); |
|
18510
f104e1d45d85
Changes to the test apps.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
9 cbreak(); |
|
f104e1d45d85
Changes to the test apps.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
10 refresh(); |
|
f104e1d45d85
Changes to the test apps.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
11 |
|
f104e1d45d85
Changes to the test apps.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
12 WINDOW *win = newpad(20, 30); |
|
f104e1d45d85
Changes to the test apps.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
13 box(win, 0, 0); |
|
f104e1d45d85
Changes to the test apps.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
14 prefresh(win, 0, 0, 0, 0, 19, 29); |
|
f104e1d45d85
Changes to the test apps.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
15 doupdate(); |
| 15817 | 16 |
| 17 while ((ch = getch())) { | |
| 18 printw("%d ", ch); | |
| 19 refresh(); | |
| 20 } | |
| 21 | |
| 22 endwin(); | |
| 23 return 0; | |
| 24 } | |
| 25 |
