[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Revisiting Windows support

From: Thomas Dickey
Subject: Re: Revisiting Windows support
Date: Tue, 21 Mar 2023 04:07:45 -0400

On Mon, Mar 20, 2023 at 09:56:54PM -0400, Bill Gray wrote:
> Hi Richard,
>    To Thomas' reasons,  I'll add
>    d) the Windows support for such sequences is a nice start,  but is a work
> in progress at best.  I did have some hopes that it would mean that
> PDCursesMod [1] (a curses library for non-termcap/terminfo environments)
> could use escape sequences on Windows.  One of its many "platforms" [2] uses
> ANSI sequences to good effect within xterm and the Linux console, and
> somewhat within DOS.  I thought that with minor changes,  this would all
> work on Windows as well.
>    But the Windows console support for things such as terminal resizing is

I think that's doable - though the lack of something like SIGWINCH hurts.
vile (vi-like-emacs) iirc does something to handle window resizing.

> absent,  and the color support is a little scattershot.  It's been a while,
> and it doesn't appear that getting further escape sequences to work is a
> priority at Microsoft.  There are a variety of nuisances involving getting

yes... supposedly "replaced" by Windows Terminal, which is Modern(TM).

However, the Windows Terminal stuff appears to have lost its way.
I noticed recently that its support for Console API's mouse feature
has been unimplemented for the past four years (seems that it got
sidelined by bikeshedding).  Since it's not complete, it's not a replacement.

Ditto for its escape sequence support (neither complete nor documented).

In retrospect, this is kind of sketchy


and misses a lot.  The updated Windows Console can handle mouse events,
but I don't see it mentioned.  Juergen provided for that in the experimental
driver -- however

In the Windows Console, the experimental driver's support for mouse
isn't working (perhaps overlooked if Juergen's initial implementation
was before some change in the Console's escape sequences support).
I've been looking into that recently -- the older MinGW driver works fine.

Without that distraction, I'd be working on wide-character support in
the experimental driver.  There's some gain in the Windows Terminal
(but it uses a lot of hard-coded workarounds to "work" with its preferred
font, which I'd have no use for -- all undocumented, of course).

With all of that, revising the build support doesn't rank very high on my
to-do lists.

> into virtual terminal mode and handling input (still different from what it
> is on any other OS).
>    I've left things such that you can build PDCursesMod using escape
> sequences on Windows,  and it "sort of" works.  But I'm fairly sure that
> most people just use the "Windows console" platform [3],  which relies on
> the Windows console library functions,  or the "Windows GUI" platform [4],
> rather than put up with the shortcomings of MS's implementation of escape
> sequences.
> -- Bill
> [1] https://github.com/Bill-Gray/PDCursesMod/
> [2] https://github.com/Bill-Gray/PDCursesMod/tree/master/vt
> [3] https://github.com/Bill-Gray/PDCursesMod/tree/master/wincon
> [4] https://github.com/Bill-Gray/PDCursesMod/tree/master/wingui
> On 3/20/23 20:24, Thomas Dickey wrote:
> > On Mon, Mar 20, 2023 at 08:31:45PM -0000, Richard wrote:
> > > [Please do not mail me a copy of your followup]
> > > 
> > > Now that the console supports the standard ANSI escape sequences (see 
> > > [1]),
> > > is there any chance that ncurses can be properly supported on Windows?
> > > (By "properly", I mean as a native Win32 build, not using a POSIX
> > > compatibility shim like cygwin or mingw.)
> > 
> > I don't see that as being likely:
> > 
> > a) none of the "native Win32" tools are actually that useful for the things
> >     that generate code, and
> > 
> > b) maintaining a set of generated files to prop up a native Win32 build,
> >     or constructing some throwaway PowerShell scripts isn't where I want
> >     to spend my time -- doing that would require less attention in places
> >     where I do spend time -- and
> > 
> > c) you might have noticed that no one's available to fill in that gap :-)
> > 

Thomas E. Dickey <dickey@invisible-island.net>

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]