summaryrefslogtreecommitdiffhomepage
path: root/contrib/luacurses/src/test/pair.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-31 11:14:47 +0000
committerSteven Barth <steven@midlink.org>2008-08-31 11:14:47 +0000
commit36c76090638e80d1cb9ad2dd060aae65976f24c8 (patch)
treeeacc03904f5b6d649e71975dbfacd836fbb149ed /contrib/luacurses/src/test/pair.lua
parentf28422324d9f8aa6ac0af58dca431fa466e8b183 (diff)
Add luacurses to contrib
Diffstat (limited to 'contrib/luacurses/src/test/pair.lua')
-rw-r--r--contrib/luacurses/src/test/pair.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/luacurses/src/test/pair.lua b/contrib/luacurses/src/test/pair.lua
new file mode 100644
index 000000000..f26980061
--- /dev/null
+++ b/contrib/luacurses/src/test/pair.lua
@@ -0,0 +1,18 @@
+
+require("curses");
+
+curses.initscr();
+
+curses.start_color();
+curses.init_pair(1, curses.COLOR_BLUE, curses.COLOR_YELLOW);
+curses.init_pair(2, curses.COLOR_CYAN, curses.COLOR_RED);
+
+for i = 1, 2 do
+ local r, f, b = curses.pair_content(i);
+ curses.attrset(curses.COLOR_PAIR(i));
+ curses.addstr(f .. ", " .. b .. "\n");
+end
+
+curses.getch();
+curses.endwin();
+