Commit Graph

223 Commits

Author SHA1 Message Date
Paul LeoNerd Evans 5a6e289d23 #include termkey.h from the correct path in unit tests 2011-03-31 13:51:21 +01:00
Paul LeoNerd Evans f230bc86fb Added some unit tests for keyname <=> sym constant conversions 2011-03-31 13:43:16 +01:00
Paul LeoNerd Evans 1bf3c958b1 taplib's is_str() should take const char * 2011-03-31 13:42:27 +01:00
Paul LeoNerd Evans be153dc5ee Added some unit testing for termkey_getkey(3) and friends 2011-03-31 12:47:09 +01:00
Paul LeoNerd Evans 0ea0fb331b is()-like testing for ints and strings 2011-03-31 12:46:06 +01:00
Paul LeoNerd Evans 9d7f0037a8 Remember to exit with exit_status() from unit testing 2011-03-31 12:13:37 +01:00
Paul LeoNerd Evans 3bbda921b7 Created a little Test::More-like library for TAP testing 2011-03-31 12:11:19 +01:00
Paul LeoNerd Evans 620038af72 bzr ignore t/*.t 2011-03-31 11:41:14 +01:00
Paul LeoNerd Evans c228335bca Created a unit-testing system using perl's prove 2011-03-31 11:38:40 +01:00
Paul LeoNerd Evans 26ef76349e Renamed snprint_key() to strfkey(); provide redirection trampoline 2011-03-31 11:08:43 +01:00
Paul LeoNerd Evans 280047e745 Minor whitespace fixes in termkey.h.in 2011-03-31 11:06:21 +01:00
Paul LeoNerd Evans 824e7e157a Provide guarded extern "C" { ... } wrapper for C++ compilers 2011-03-30 20:32:51 +01:00
Paul LeoNerd Evans f93587a4c7 C++ compilers don't like trailing commas in enums; remove them 2011-03-30 20:31:26 +01:00
Paul LeoNerd Evans 391f795c67 include <curses.h> before <term.h> as it's required in that order on Solaris 2011-03-30 20:24:06 +01:00
Paul LeoNerd Evans a0f86dcd98 Bumped VERSION_MINOR to 0.6 2011-03-24 00:03:41 +00:00
Paul LeoNerd Evans 9f0ef4953d Don't steal Ctrl-C from the kernel by default (so leave SIGINT enabled); add a flag to take it if required 2011-03-23 23:20:24 +00:00
Paul LeoNerd Evans a71f68dd57 Interpret space as Unicode by default, add a flag to make it symbolic instead 2011-03-23 22:17:25 +00:00
Paul LeoNerd Evans ba0c32e8d8 Allow formatting the mouse position when rendering an event to a string 2009-11-27 15:07:05 +00:00
Paul LeoNerd Evans 571e5b701f Make DEBUG=1 mode work with mouse events 2009-11-27 14:56:38 +00:00
Paul LeoNerd Evans 0ae5aea7ac Moved code around so DEBUG=1 actually compiles again 2009-11-27 14:50:58 +00:00
Paul LeoNerd Evans 24f9711846 Return opaque mouse events in the key structure; add a function to interpret this into its component fields 2009-11-27 14:36:29 +00:00
Paul LeoNerd Evans 6dc2b9c72b Implement mouse catching also in CSI driver, in case xterm-alike terminal without 'key_mouse' terminfo string 2009-11-26 00:33:30 +00:00
Paul LeoNerd Evans c4bc0486d4 Moved mouse parsing code out of driver-ti.c into core termkey.c 2009-11-26 00:27:58 +00:00
Paul LeoNerd Evans bdc22b8b3d Remember to zero key->modifiers for mouse events 2009-11-25 14:46:19 +00:00
Paul LeoNerd Evans ade9d760d3 Supply --tag=CC to libtool to inform it we're a C library; in case it doesn't detect that (mumble openbsd mumble) 2009-11-25 14:36:44 +00:00
Paul LeoNerd Evans 7d5b64ff3d Bumped VERSION_MINOR to 0.4 2009-11-25 02:31:10 +00:00
Paul LeoNerd Evans f2f2c03b56 Complete reworking of build system to use libtool 2009-11-25 02:30:24 +00:00
Paul LeoNerd Evans d1842f8a00 Document the new mouse reporting interface 2009-11-24 01:37:46 +00:00
Paul LeoNerd Evans c9d2bd93fd Implement XTerm mouse parsing in terminfo driver 2009-11-24 01:31:35 +00:00
Paul LeoNerd Evans 7459a038fb Make demo enable mouse mode if given on commandline 2009-11-24 01:30:52 +00:00
Paul LeoNerd Evans ceeaf717bd Print Mouse() rather than shouting MOUSE() 2009-11-24 01:25:40 +00:00
Paul LeoNerd Evans 2ba9849ab5 Public interface for MOUSE support 2009-11-24 01:22:55 +00:00
Paul LeoNerd Evans 513e0ac59b Bugfix to termkey_format_key() in FORMAT_CARETCTRL case when formatting Ctrl-Letter 2009-11-23 23:59:46 +00:00
Paul LeoNerd Evans 83c7c3f668 Cope with building distdir at minor versions .3 (otherwise it clashes with *.3) 2009-07-15 20:52:35 +01:00
Paul LeoNerd Evans be998cef1b Renamed all type names to CamelCaseNames for visual distinctness, separate from variables/functions 2009-07-15 20:40:44 +01:00
Paul LeoNerd Evans af50967d12 Substitute version into termkey.pc.in at 'make dist' time 2008-12-15 20:49:59 +00:00
Paul LeoNerd Evans 51ed20590a Bump VERSION_MAJOR to 0.2 2008-12-12 00:43:52 +00:00
Paul LeoNerd Evans 215b02e77f Represent Ctrl-letter in lowercase in the struct, so as one day to be able to do Ctrl-Shift-letter. Make sure ^X notation is still capital 2008-12-10 01:34:40 +00:00
Paul LeoNerd Evans 9f1e7b34eb Resort back to using GNU sed in .sh built manpages, as we only need them at 'make dist' time now; doesn't matter that BSD can't run them 2008-12-10 01:03:43 +00:00
Paul LeoNerd Evans 696c145599 Make termkey_getkey() set a peeked key structure if it returns TERMKEY_RET_AGAIN 2008-12-10 00:38:21 +00:00
Paul LeoNerd Evans ef669c134d Complete change of driver internals - peek and return size but don't eat bytes; eat later in getkey() 2008-12-10 00:23:47 +00:00
Paul LeoNerd Evans eee8ddcee3 Linefeed properly in main() in demo files 2008-12-08 22:54:14 +00:00
Paul LeoNerd Evans d54b7b4274 Documentation fix for termkey_get_fd - returns int, not void 2008-12-02 23:06:08 +00:00
Paul LeoNerd Evans c10d6f02e4 Make sure only to slide buffer down when returning a real key to the user, or else it might upset the meta-key logic when it returns 2008-12-06 00:03:48 +00:00
Paul LeoNerd Evans 97a47e9b16 Make common static function getkey(), roll functionallity of termkey_getkey{,_force}() into it 2008-12-05 23:55:44 +00:00
Paul LeoNerd Evans 43a99e64f2 strdup() the terminfo keypad_local and keypad_xmit strings at construct time, in case multiple instances and they change beneath us 2008-12-03 20:19:15 +00:00
Paul LeoNerd Evans 2c1bea4f15 Use a C99 flexible array member rather than the [0] hack 2008-12-02 01:05:47 +00:00
Paul LeoNerd Evans 2fba93b690 Added termkey_keyname2sym() to API 2008-12-02 00:56:43 +00:00
Paul LeoNerd Evans f75bdf1516 Added termkey_get_fd() to API 2008-12-01 22:36:14 +00:00
Paul LeoNerd Evans 8737046c4d Extra documentation about the three types of key event structure, and what the code members mean 2008-11-30 12:43:13 +00:00