Commit Graph

  • 63666c66f4 A little more like the OS/2 version. William McBrine 2006-11-20 15:34:28 +00:00
  • 50b5f309b7 Longer click time for OS/2, after Win32. Actually this works a little better... William McBrine 2006-11-20 15:18:30 +00:00
  • 48f436eabc Allow a longer time for clicks to register. To Do: Same for OS/2, DOS; and the interval should be adjustable -- maybe derived from the OS? William McBrine 2006-11-20 13:35:35 +00:00
  • de4b89c4bf Tidy the mouse key display. William McBrine 2006-11-20 13:32:28 +00:00
  • d2ab335859 Call def_prog_mode() in endwin(), just before PDC_scr_close(). Now the mouse works in MultiMail for OS/2 and DOS, yay. To Do: Why does the cursor appear in DOS? (PDCurses or MultiMail issue?) William McBrine 2006-11-20 04:22:50 +00:00
  • d93ca40681 Gratuitous parens. William McBrine 2006-11-20 04:06:00 +00:00
  • 981076bad8 Redid mouse handler along the same lines as OS/2. Cleaner and clearer, IMHO. Now it can also report click events -- though, as with OS/2, you have to be fast. And bogus move events are filtered. William McBrine 2006-11-20 04:03:40 +00:00
  • 2a1a969d83 Scroll wheel support for the CuteMouse driver (cutemouse.sf.net). Not exactly a standard, but seemingly the only widespread int33 scroll wheel extension. Not tested. William McBrine 2006-11-20 02:37:33 +00:00
  • c59e3f19f4 The fix in 2.8 for the scroll wheel in X wasn't very good -- it did report the events as scroll wheel events, but it doubled them. Here is a proper fix. William McBrine 2006-11-20 02:10:15 +00:00
  • 7da8e07e0e Filter bogus move events. William McBrine 2006-11-19 23:13:04 +00:00
  • e61f3ea595 Filter (more) bogus move events. William McBrine 2006-11-19 22:59:10 +00:00
  • a57bf876df Eliminated _win32_kbhit(). Much more to do. William McBrine 2006-11-19 14:47:43 +00:00
  • 09c1fc9fbc Exit on redirected input (instead of hanging). William McBrine 2006-11-18 14:04:27 +00:00
  • d6686d962a Mouse click now suppresses return of modifiers as keys in Win32, as on other platforms. William McBrine 2006-11-18 13:30:02 +00:00
  • c753c12afc Spelling. William McBrine 2006-11-18 13:26:57 +00:00
  • b96ad92488 Simplified -- broke out mouse handling into _process_mouse_event(), etc. William McBrine 2006-11-18 13:00:26 +00:00
  • f130f8f4d3 Correct usage of SP->key_code, in preparation for Unicode input support. William McBrine 2006-11-18 12:03:01 +00:00
  • 33b5fccb10 Include string.h from pdcdos.h. William McBrine 2006-11-18 12:00:04 +00:00
  • 22afd33bd8 More minor tightening. William McBrine 2006-11-18 10:17:01 +00:00
  • 2e664577ed Minor tightening. William McBrine 2006-11-18 09:41:55 +00:00
  • 966d20786b Supress the return of modifiers as keys when a mouse click has occurred since the key press. William McBrine 2006-11-18 09:31:24 +00:00
  • 2e617fbdde XCursesModifierPress() is not used, and in fact, never has been. William McBrine 2006-11-17 23:07:37 +00:00
  • ec5cea3f27 It may have been a mistake to shorten these names... although they're "static" in C terms, they are used as a kind of external interface, and it makes sense for the names to reflect that. But I started doing it because of the Actions... and the "strings" description for the XCursesHandleString action seems to violate the rules. To Do: The RequestorCallbackEtc. functions also fall into this category, but their names are already ridiculous. William McBrine 2006-11-17 22:51:39 +00:00
  • 8a02a6d14f Modifier keys are now returned on key up in X11, as in other ports. (I suppose now someone will complain that they wanted the other behavior.) The O'Reilly X book cautions against relying on KeyRelease events, but this is a marginal feature in any case. The only X server I found a problem with, so far, was the crummy one that comes with Mac OS X; and even that seems to be fixed in the latest release. William McBrine 2006-11-17 22:21:50 +00:00
  • cd45e997d0 Redid the shift reporting for OS/2 along the same lines as DOS -- now it only reports on key up, if no other key was pressed in the interim. William McBrine 2006-11-17 15:47:11 +00:00
  • b47e3b4d9d In getstr(), don't beep on bad character, only on end of string. William McBrine 2006-11-17 15:26:54 +00:00
  • 2197200f58 OK, this fixes the missing first instance. (I knew I'd figure it out as soon as I checked it in <sigh>.) William McBrine 2006-11-17 14:47:18 +00:00
  • dacfb18eb7 Return modifier keys for DOS. This works like the Win32 version, returning only on key up, if no other key was pressed. For some reason I can't quite figure out, it fails to report the first instance. William McBrine 2006-11-17 14:44:10 +00:00
  • bb029e0b31 Use only a single call to int 0x33 for each mouse check. William McBrine 2006-11-17 12:10:20 +00:00
  • 003cfb364a Oops.. moves always showed up as button 1. Apart from that, to my surprise, this was not only much simpler than the other ports, but even works better in some respects (notice what happens when you press a mouse button while holding another). No click events reported, though. William McBrine 2006-11-17 03:39:15 +00:00
  • 4d9d1adaa1 Mouse support for DOS. William McBrine 2006-11-17 03:21:01 +00:00
  • a757d1cd37 Allow for the failure of MouOpen(). William McBrine 2006-11-16 19:26:20 +00:00
  • 8848e9a999 Check for key modifiers only when not handling a mouse key. (The display can get pretty messed up in Win32 otherwise.) William McBrine 2006-11-16 13:41:00 +00:00
  • 31d74bc9d4 Allow return of key modifiers on button release events; clear pdc_key_modifiers before processing mouse events. (X11 port does this, Win32 port doesn't.) William McBrine 2006-11-16 00:40:47 +00:00
  • 7e5fb2cda4 Better use of bitmasks. William McBrine 2006-11-15 19:59:42 +00:00
  • cddfa0bc0d Click support for OS/2, for what it's worth. You have a short, fixed window -- 1/20th of a second, the napms() interval in wgetch() -- in which to have the click register as a CLICK instead of a PRESS/RELEASE. William McBrine 2006-11-15 19:30:24 +00:00
  • 741f9fb43f Mouse + modifiers are bitmasks; don't need to check for equality. (Actually getting more than one of them to show up at once is another issue.) William McBrine 2006-11-15 18:26:59 +00:00
  • 1d28fced6f Modifier + mouse click support for OS/2. This is now pretty much on a par with Win32, except for the scroll wheel support. (I'll have to check if that was ever added to the OS/2 API... it's too new for my books.) William McBrine 2006-11-15 18:25:00 +00:00
  • b17835835e Return-modifiers-as-keys support for OS/2. Note that it returns them on key down, like the X11 port, and not on key up like the Win32 port. William McBrine 2006-11-15 17:16:23 +00:00
  • bd4104d17a Functional implementations of PDC_save_key_modifiers() and PDC_return_key_modifers(); added PDC_modifiers_set(), similar to PDC_mouse_set(). William McBrine 2006-11-15 16:26:45 +00:00
  • 95b9789564 Slightly more efficient. William McBrine 2006-11-15 01:09:31 +00:00
  • 05d7297d5b My solution for the BUTTON_MOVED problem. Next problem: the mouse is shut off after shelling out. William McBrine 2006-11-14 18:11:47 +00:00
  • 157e799133 Moved SP->_trap_mbe filtering to _mouse_key() in getch, for all platforms. Could use more work. William McBrine 2006-11-14 14:51:58 +00:00
  • 7f7c5eb9fb Useless cast. William McBrine 2006-11-13 21:23:47 +00:00
  • 87649a3190 Clear the line for the mouse report. William McBrine 2006-11-13 21:23:17 +00:00
  • 67ee40dd77 Mouse support for OS/2. Currently, like the Win32 version, it makes no attempt to assemble button events into clicks, but filters press events and not release events when set to return clicks (call it bug- compatible). Tested with testcurs and MultiMail... which now works in a window, but still not in a full-screen session, though testcurs does (sigh). So I have a little more to figure out... William McBrine 2006-11-13 21:22:21 +00:00
  • a0200e88cb Include string.h from pdcos2.h. William McBrine 2006-11-13 21:17:54 +00:00
  • e342f8b4ee Bogus PDC_LOG() call. William McBrine 2006-11-13 17:50:08 +00:00
  • aef07a6241 Gratuitous parens. William McBrine 2006-11-13 17:49:48 +00:00
  • bac344e54f Comments. William McBrine 2006-11-13 00:07:24 +00:00
  • 7500885a86 Spacing. William McBrine 2006-11-13 00:07:02 +00:00
  • cc09a62624 This cast corrupted the first (and only the first) mouse event returned in testcurs, such that it always read as position 0, 0, double-click. Introduced in 2.8 (argh). William McBrine 2006-11-12 23:55:17 +00:00
  • 06077d9c2c Check for BUTTON_CLICKED as well as BUTTON_PRESSED in slk mapper. William McBrine 2006-11-12 21:49:08 +00:00
  • 1828c9abdd Bogus gcc warning about unintialized "key". This way saves an int and an assignment anyway. William McBrine 2006-11-12 21:13:19 +00:00
  • 1ef56b5791 Check for SP->key_code when checking KEY_MOUSE in wgetch(); set SP->key_code when returning KEY_MOUSE in Win32 (oops). William McBrine 2006-11-12 20:54:07 +00:00
  • 47a9f29f45 Common handling for PDC_mouse_in_slk(). William McBrine 2006-11-12 20:38:00 +00:00
  • cdfd9046bf New logic for the inner core of wgetch: PDC_check_bios_key() is always called, the loop always recycles if no key (unless nodelay), and napms() is always called if no key (unless nodelay). By stipulating that PDC_check_bios_key() will always be called before PDC_get_bios_key(), I can simplify the implementation of mouse support for DOS and OS/2. Also, the demos no longer hog the CPU under Windows when built with Watcom DOS. (No help for Borland yet; it will need a new delay routine.) The downside: Even in delay mode, the keyboard won't respond more often than every 1/20th of a second. I don't think this will really be a problem, but it needs a lot of testing to be sure. William McBrine 2006-11-12 16:18:09 +00:00
  • ac5dcbeb70 Eliminated _key_core() from DOS and OS/2; made OS/2 check for Russian E0, as in DOS (though I'm not sure it's needed). William McBrine 2006-11-12 12:28:10 +00:00
  • 86ea5dd137 Oops. William McBrine 2006-11-12 11:57:00 +00:00
  • aa0f6763e3 Replaced many redundant if/else's with a switch/case. William McBrine 2006-11-12 11:10:11 +00:00
  • dc02f5f4c2 Use the current foreground color for the line attributes, unless PDC_set_line_color() is explicitly called. After setting the line color, you can reset it to this mode via "PDC_set_line_color(-1)". William McBrine 2006-11-12 10:26:14 +00:00
  • 8e964c0618 Gratuitous parens. William McBrine 2006-11-11 20:27:21 +00:00
  • 905087dacb For DOS and OS/2, for now, PDC_mouse_set() sets SP->_trap_mbe to 0, and returns ERR if appropriate. William McBrine 2006-11-11 20:24:36 +00:00
  • ff99cc08b8 Since mouse events are now disabled when SP->_trap_mbe == 0, there's no need to check for that in _get_interesting_event(); plus minor/cosmetic changes. William McBrine 2006-11-11 19:54:56 +00:00
  • dd84326ae3 Call PDC_mouse_set() when the mouse mask is changed. Currently, the only effect is that the mouse cursor no longer appears in full-screen mode in Win32 unless the mask is nonzero. William McBrine 2006-11-11 17:49:48 +00:00
  • d3ac9ff6b0 PDC_scr_free() is a more appropriate name than PDC_scr_exit(). William McBrine 2006-11-11 16:36:08 +00:00
  • deb923300d Some changes needed to get ncurses_tests building again with recent PDCurses changes. William McBrine 2006-11-10 11:45:08 +00:00
  • 0c88fcbaac The WINDOW fields _pmaxx and _pmaxy have not been meaningfully used since 2.3. The _lastp* and _lasts* fields have never been used (only initialized). William McBrine 2006-11-09 08:52:37 +00:00
  • 88ee8571f9 A proper winsch() -- it wasn't handling the "special" characters correctly before. This also lets me finally chuck PDC_chadd() (or rather, change PDC_chadd() to waddch() and chuck the wrapper). To Do: Make _attr_passthru() external and use it here? William McBrine 2006-11-07 16:32:14 +00:00
  • 165400b662 Spacing. William McBrine 2006-11-07 01:53:21 +00:00
  • ee10d6c63d More like this. William McBrine 2006-11-07 01:36:11 +00:00
  • e694cd7df2 Further tightening; set attributes only when needed; inline PDC_sync() in the main path. William McBrine 2006-11-07 01:13:57 +00:00
  • 7cc11ca0c7 Bogus comment about 7-bit characters. William McBrine 2006-11-06 21:46:58 +00:00
  • 1432e449b2 Fewer tests on the normal path through PDC_chadd(). William McBrine 2006-11-06 20:45:02 +00:00
  • 60255f421b Unneeded calls to PDC_sync() and assignment to x in PDC_chadd(). William McBrine 2006-11-06 14:09:49 +00:00
  • f244cc226b Don't really need _newline(). William McBrine 2006-11-06 13:24:01 +00:00
  • 5888b1dfb7 Spacing. William McBrine 2006-11-06 11:30:19 +00:00
  • c92e07530a Slightly more efficient code for merging in the window's attributes. To Do: Does the algorithm itself make sense? William McBrine 2006-11-06 11:26:21 +00:00
  • 6a51e5b795 Need to call PDC_set_blink() again after the video mode is changed by resize_term(). William McBrine 2006-11-05 07:40:06 +00:00
  • 8155d549ea Simplified. Could use more. William McBrine 2006-11-05 07:27:16 +00:00
  • 68f0edd643 Similar changes for 0 as for NULL. William McBrine 2006-11-05 07:13:40 +00:00
  • 7ce164f026 No underscore. William McBrine 2006-11-05 05:38:47 +00:00
  • d300faf7b9 DeNULLification. William McBrine 2006-11-05 05:37:40 +00:00
  • a3fd68b9c4 Per X/Open, beep() should always return OK. William McBrine 2006-11-05 04:33:00 +00:00
  • 7772b12c05 Spacing. William McBrine 2006-11-05 04:24:15 +00:00
  • 35594674dd Merged some redundant error checks. William McBrine 2006-11-05 04:23:36 +00:00
  • 9790346bd3 Replaced "win == (WINDOW *)NULL" with "!win", etc. These were not used consistently and, IMHO, are no more clear. To Do: Platform dirs. William McBrine 2006-11-05 03:57:26 +00:00
  • a4bb7076e4 Reordered. William McBrine 2006-11-05 02:40:26 +00:00
  • b83a8af26f Reordered functions -- if there's a core function, it goes at the top; others below arranged by group. Use "%p" instead of "%x" for pointers. Made man page prototypes match functions. William McBrine 2006-11-04 12:59:03 +00:00
  • c21dee2e05 Avoid redundant writes. William McBrine 2006-11-03 14:52:20 +00:00
  • ac9676b1dd PDC_chadd() now sets xlat internally; and A_ALTCHARSET is now preserved. William McBrine 2006-11-03 14:08:10 +00:00
  • 8b45cbf907 Well, in fact, we'd better go back to doing it like this. William McBrine 2006-11-03 14:06:02 +00:00
  • b4332204bf Made PDC_chadd() private; consigned PDC_chins() to oblivion. William McBrine 2006-11-03 13:41:14 +00:00
  • 0db3f478ea Oops... need a refresh at the end of wgetnstr(). William McBrine 2006-11-03 13:36:47 +00:00
  • dbc0c9e242 Return ERR on calloc() failure; reset labels to ensure ERR return of other slk functions. William McBrine 2006-11-02 16:07:18 +00:00
  • 449b9fdaaa Divided the prototypes into "Platform implementation functions" -- those functions provided in the dos, os2, etc. directories -- and "Internal cross-module functions" -- functions implemented within the pdcurses directory that use the "PDC_" prefix, but are private. William McBrine 2006-11-01 16:36:31 +00:00
  • b21d3fcbcd Changed the function pointer PDC_initial_slk etc. to a straight call to PDC_slk_initialize(). To Do: It seems likely that the function pointer was an attempt to avoid linking the slk module unless needed, but any such intent was defeated because PDC_initial_slk was always defined within the slk module. However, the goal still might be worth pursuing... it's a tradeoff between the size of the linked code, and legibility. William McBrine 2006-11-01 16:12:35 +00:00
  • 7a547d2cba Missing vw_scanw() from portability chart. William McBrine 2006-11-01 15:22:37 +00:00
  • df74835e68 Now need stdlib.h, don't need string.h; some misplaced variables. William McBrine 2006-10-31 15:33:30 +00:00
  • c12a1f9c6e Range checking. William McBrine 2006-10-31 14:59:00 +00:00