88 Commits

Author SHA1 Message Date
waltje
67a1f4c505 Remove old files. 2023-10-08 16:58:06 -04:00
Fred N. van Kempen
986f94b2d1 Merge branch 'wmcbrine:master' into master 2023-06-24 01:50:03 -04:00
William McBrine
5596bd765c Merge pull request #91 from mannyamorim/mouse-pos-scroll-event
WINCON: Send real mouse position with scroll event
2023-05-26 22:03:08 -04:00
waltje
14b413c224 Added two quickie shortcuts for building, will do it properly later. 2023-04-24 22:20:52 -04:00
William McBrine
c9367727b0 Redundant distribution stati 2022-01-14 16:15:31 -05:00
William McBrine
f1cd4f4569 Restart output using the non-ansi (WriteConsoleOutput) method when
running under Windows Terminal, and printing an ACS character below
space (i.e. in the control character range). Partial reversal of
b6d6abbf -- extended attributes and redefined basic colors will be
disabled only in the case when printing one of these characters; i.e.,
testcurs looks correct now. ;)
2021-12-08 18:04:46 -05:00
William McBrine
6c31f22692 Revert 07e4d2d8c8. The new mappings casued
problems for some compilers. More to understand here.
2021-11-19 23:07:17 -05:00
William McBrine
4bc97e287b Corrected comments. Reported by Bill Gray. 2021-07-16 23:24:07 -04:00
William McBrine
4bf47a7d03 D'oh! 2021-07-11 11:46:23 -04:00
William McBrine
07e4d2d8c8 More function keys for wincon. 2021-07-10 18:06:29 -04:00
William McBrine
987b203e08 Additional virtual key codes for wincon, after "zingchen". (Blank for
now.)
2021-07-10 17:55:07 -04:00
William McBrine
1d14838cfb Suppress cursor during blink redraw. 2021-07-07 04:22:15 -04:00
William McBrine
b6d6abbf3a ASCII control code processing appears to be (incorrectly) always enabled
for WriteConsole() in Windows Terminal, making it impossible to pass
some of the CP437 altcharset. The kludge is to fall back to the non-ANSI
mode (no extended attributes).
2021-07-06 03:44:20 -04:00
William McBrine
737500862b pdc_wt overrides pdc_conemu -- allows starting WT from ConEmu. (Note that the reverse seems unnecessary -- some
of the ConEmu checks may be unneeded?)
2021-07-05 19:41:05 -04:00
William McBrine
6e3f681509 Remap colors 0-15 for Windows Terminal. 2021-07-05 16:26:59 -04:00
William McBrine
7e46bbdab8 Windows Terminal supports italic and underlining, via escape codes. 2021-07-05 16:23:00 -04:00
William McBrine
e28e705d17 Apparently, ReadConsoleInputA() does mistaken sign extension to 16 bits,
rather than writing only the bottom 8 bits of the decoded key to the
event structure. PDCurses, in turn, was reading the whole 16 bits even
in narrow mode, resulting in corrupted "high-bit" characters in wincon.
Potentially an issue since 3.0 (assuming ReadConsoleInputA() always did
this?), but seemingly unreported (?) until now. Reported by Simon
Sobisch.
2021-06-19 12:12:19 -04:00
William McBrine
793556fff3 Make wincon's PDC_set_keyboard_binary() actually work; retain processed
input mode status if not explicitly set. In other words, ^C will cause a
SIGINT in non-raw mode. (This matches the behavior of OS/2 and some
versions of DOS -- others need fixing.) Suggested by
https://stackoverflow.com/questions/67276939/ To Do: Some other console
attributes are currently ignored, but could be used.
2021-05-12 16:02:48 -04:00
Emmanuel Mathi-Amorim
692a7bb017 WINCON: Send real mouse position with scroll event
Previously PDCurses would send (X,Y) coordinates (-1,-1) when processing a scroll event. Bring the behavior inline with ncurses and send the actual mouse position.
2020-05-12 11:50:09 -04:00
William McBrine
956c5a445a Doesn't work. 2019-09-15 10:33:43 -04:00
William McBrine
f294596357 Redundant code; on resize, move the cursor just enough to keep it
onscreen, instead of resetting it.
2019-09-15 08:22:01 -04:00
William McBrine
2048b6b93e Removed meaningless argc/argv passing for non-X11 ports; made initscr()
the core routine and Xinitscr() the wrapper, as it should be.
2019-09-15 02:01:15 -04:00
William McBrine
dcc68db1fd To match the change in PDC_scr_open(), free SP in delscreen() rather
than PDC_scr_free().
2019-09-11 10:02:57 -04:00
William McBrine
e3c606be1e Updated comments. 2019-09-11 09:52:24 -04:00
William McBrine
492b402134 More common code now. 2019-09-10 19:14:58 -04:00
William McBrine
6503aa9277 The screen should really update on doupdate(), not just on idle.
Tentative fix for x11. Reported by Mark Hessling.
2019-09-10 10:06:24 -04:00
William McBrine
4d1920e51c atrtab, unified again, in the new style. 2019-09-08 23:53:55 -04:00
William McBrine
48b0c12975 PDC_get_input_fd() only returned a meaningful result under x11, but this
is impossible to reproduce in the single-process model. All other
platforms always returned zero... which may or may not have actually
worked with select(). Better to deprecate this, discourage its use, and
suggest alternative mechanisms.
2019-09-06 09:05:43 -04:00
William McBrine
f3a0ce5009 "When using cross-compilers, windres has various prefixes. A patch like
that helps" -- Marc-Andre Lureau
2019-08-14 08:58:11 -04:00
William McBrine
c18d86d4a2 save_key_modifiers isn't useful -- they can always be saved. A pseudo-
prototype is retained for backwards compatibility.
2019-08-05 02:26:52 -04:00
William McBrine
f5886b69c7 ... and finally (for now), this. To Do: more testing. 2019-08-04 12:19:35 -04:00
William McBrine
9ce10d9a16 and even this 2019-08-04 00:18:12 -04:00
William McBrine
690f11dc8d also this 2019-08-03 22:42:35 -04:00
William McBrine
9bfddf1368 Consolidate the dirtying. 2019-08-02 18:38:01 -04:00
William McBrine
24f0a59256 Only use these attributes if defined for the terminal. 2019-07-19 08:28:48 -04:00
William McBrine
af54b43b92 Italic for ConEmu. 2019-07-19 05:11:23 -04:00
William McBrine
e7e7b99ad8 Color redefinition (via ANSI sequences) and 768 colors for ConEmu. As an
extension, color_content() now returns all -1's for unmapped colors, and
init_color() accepts all -1's to reset the color to an unmapped state.
This is a bit of hackery to fit with what testcurs already did, and to
get around the (AFAIK) lack of any way to get the proper values for
colors 0-15 in ConEmu. Currently only implemented for wincon.
2019-07-17 23:59:14 -04:00
William McBrine
07d22542ae Merge branch 'master' of wendy:pdcurses 2019-07-14 23:49:01 -04:00
William McBrine
f687f32e55 Windows 10 1903 behaves erraticly when changing the palette, so adopt
the dirtying mechanism from X11 to update the full screen on a pause,
after init_color(). Could be more selective.
2019-07-14 21:44:11 -04:00
William McBrine
17e1150f57 Spacing. 2019-07-04 09:05:30 -04:00
William McBrine
166b5205c8 MAX_COLORS -> PDC_MAXCOL, a consolidated definition. 2019-05-17 15:46:35 -04:00
William McBrine
a75a9444db Use DIVROUND here too, for consistency. 2019-05-16 11:54:43 -04:00
William McBrine
7c43bd6990 Return ERR from color_content() if unmapped (>= 16) in wincon. 2019-05-16 11:10:18 -04:00
William McBrine
6ebc10f22f 768 colors for the Windows console; also, colors 16-255 can now be remapped. 2019-05-16 10:52:11 -04:00
William McBrine
3c67ce4471 Adding the NetBSD functions reminded me how outdated the "Portability"
tables were. Hopefully this is more useful, if still questionable.
2019-05-12 18:35:47 -04:00
William McBrine
a0b7d587c1 Inconsistent line wrap length and spacing in "man page" descriptions. 2019-05-11 20:34:11 -04:00
William McBrine
e0c29054e8 Added has_mouse() for ncurses compatibility. See GitHub issue #62. 2019-05-07 18:09:27 -04:00
William McBrine
6d85027ec1 Limit the scope of these options. 2019-02-22 02:20:05 -05:00
vyv03354
e67e247b71 Correctly restore Insert mode and QuickEdit mode 2019-02-20 22:10:03 +09:00
William McBrine
4a15672341 Rebranding -- it's still public domain, but I'll no longer refer to it
as "Public Domain Curses". (Outside of the official docs, no one ever
did, anyway.)
2019-01-30 15:32:02 -05:00