Commit Graph

19 Commits

Author SHA1 Message Date
Garrett D'Amore 16556370d7 Support for new Suspend and Resume API.
fixes #194 Starting multiple screen sessions (lost key event)

You can test this by using the mouse demo, which now supports pressing
CTRL-Z.  This does not actually suspend the demo, but starts a subshell
which takes over.  After the subshell is exited, the demo takes control
of the screen back.  This can be done multiple times, and it is possible
to start multiple "nested" iterations of the demo this way.
2021-02-20 13:20:58 -08:00
Garrett D'Amore 19e17097d8 Mark PostEventWait deprecated.
At some point in the future this is going to be replaced with
a simpler channel design, and the current blocking approach
is both non-idiomatic, and fragile.  Don't use it.
2021-01-24 16:48:47 -08:00
Garrett D'Amore 13bc6c2778 fixes #420 RFE: Mouse wheel only reporting
This adds optional MouseFlags that can be used to adjust what is
tracked for mouse reporting (leaving the other modes to be handled
by the terminal.)  This should work on all XTerm style terminals,
but on Windows we have no way to be selective here.
2021-01-24 15:18:06 -08:00
Garrett D'Amore e9095fe4f1 fixes #394 Screen.Fini does not leave the terminal in a usable state in MacOS
This does sort the main problem of screen.Fini(), but really we
want to use a separate Pause() and Resume() function, because
screen.Fini() is not meant for reuse in this way.

Note that one side effect of this change is that applications which
redirect stdin and stdout and expect us to just use /dev/tty instead
are going to break -- we are now using stdin and stdout like nearly
every other screen oriented application.
2021-01-24 13:26:36 -08:00
Garrett D'Amore 197faf3eae fixes #120 Support for bracketed paste mode
This adds Bracketed Paste support for terminals that have mouse
support and support it.  The bracketing events are EventPaste,
with methods to note Start() or End() of the paste.  Content
comes in as normal rune events.  Programs must opt-in to this by
calling screen.EnablePaste().
2020-10-15 23:13:03 -07:00
Ben Burwell 8ec73b6fa6 Implement Beep() API
Add a Beep() method to the Screen interface. On *nix systems, this
writes the bell character (0x07) to the tty. On Windows, we call the
MessageBeep syscall.

Fixes: #2
2020-03-15 10:36:32 -07:00
Garrett D'Amore 2fca0432ba Windows should always try for console first.
We had problems where if $TERM was set on a Windows console, we would
fail to allocate the screen because of missing termios.  This caused
lots of problems for many Windows users.  This should make this easier
for folks who might have set $TERM for other reasons, even in a Windows
console environment.

Eventually we will want to support emitting characters for 256 color
support, but that's later.
2019-03-19 00:07:29 -07:00
Jaime Piña 44772c121b Fix small lint & spelling issues 2016-12-06 09:19:16 -08:00
Garrett D'Amore 91d5e748ae fixes #114 Add Fill() method View API
fixes #113 Create SimpleStyledTextBar
2016-05-23 14:55:11 -07:00
Garrett D'Amore 5dc5326c0e fixes #44 Expose some capability info 2016-01-19 15:51:33 -08:00
Garrett D'Amore e7d14c2863 fixes #62 windows console may have FIFO hang
fixes #63 Initial views API integration
2015-10-30 12:18:06 -07:00
Garrett D'Amore 6939959660 fixes #50 Expose CanDisplay(rune) 2015-10-14 19:46:35 -07:00
Garrett D'Amore 5bef83acf3 fixes #45 Add fallback rune support 2015-10-14 19:09:00 -07:00
Garrett D'Amore 7322e40c26 fixes #37 Improve docs & fix golint
fixes #38 Broke wide characters in last update
fixes #39 Clean up logic for encodings, enhance fallback options
fixes #36 Support more mouse buttons on Windows.
2015-10-08 09:48:01 -07:00
Garrett D'Amore 02eef725e2 fixes #35 Inadequate buffering dirty/detection algorithm 2015-10-07 02:35:14 -07:00
Garrett D'Amore b19d7067f2 fixes #26 Improved docs desired 2015-10-05 15:46:51 -07:00
Garrett D'Amore 061768321e fixes #20 Wide characters & combining characters busted
fixes #21 Want unicode test program
fixes #15 Add ACS drawing support
2015-10-04 19:53:38 -07:00
Garrett D'Amore 434fc57169 fixes #10 Eliminate separate buffered implementation
fixes #9 Various API enhancements
fixes #8 Mouse demo improvements
fixes #7 Add support for handling $<delay> delays
fixes #6 mkinfo doesn't honor terminfo LINES and COLUMNS
fixes #5 Add better mouse tracking
fixes #3 Windows performance improvements
2015-10-02 21:49:13 -07:00
Garrett D'Amore b4ae936d42 Initial import of Tcell. 2015-09-26 23:37:54 -07:00