Wez Furlong
d45c6645a1
add basic widgets support infra
2018-07-24 13:49:47 -07:00
Wez Furlong
d1ea0588a3
clarify Blocking enum; Blocking::No -> DoNotWait
2018-07-24 06:25:58 -07:00
Wez Furlong
a781d8eb5a
IOError -> IoError, tidy up cargo deps
2018-07-24 05:57:50 -07:00
Wez Furlong
cba05e3942
tidy up the hello program a tiny bit
2018-07-23 21:45:05 -07:00
Wez Furlong
11a32f7d99
fix comment
2018-07-23 21:31:27 -07:00
Wez Furlong
fa91f1cd7b
Add Terminal::poll_input for decoding terminal input
...
Both blocking and non-blocking are supported
2018-07-23 21:23:26 -07:00
Wez Furlong
64fc64d967
Add a parser for terminal input
...
This includes a trie structure for dealing with the keymap lookups.
2018-07-23 14:49:15 -07:00
Wez Furlong
0825cefb02
terminfo crate has been released with SetAttributes
2018-07-22 12:56:46 -07:00
Wez Furlong
025b46d111
Terminal no longer requires Read+Write
...
This allows adding parsed readers without having to worry about
reconciling Read vs. parsed read.
2018-07-22 11:32:08 -07:00
Wez Furlong
e7486d331a
ensure that we can copy screens even if they are blank
...
We were optimizing away setting the cells if only the background
attributes were different between the src and dest
2018-07-22 10:41:34 -07:00
Wez Furlong
670b0d023f
FlushFileBuffers always errors out for console handles
...
This only showed up intermittently in testing because flushing
was not always needed :-/
2018-07-22 08:54:11 -07:00
Wez Furlong
2559257869
Add BufferedTerminal
2018-07-22 08:03:11 -07:00
Wez Furlong
c91219d65b
add new_terminal() func for ease of use
...
Make the WindowsTerminal constructors more closely match those
of UnixTerminal in behavior.
2018-07-22 07:05:20 -07:00
Wez Furlong
45ec006a5d
rename screen::Screen to surface::Surface
2018-07-22 05:44:51 -07:00
Wez Furlong
ee0dd28278
make use of ClearToEndOfLine and ClearToEndOfScreen
...
Adds an optimization pass that makes use of these operations, and
that is able to coalesce them together to reduce the number of
operations that need to be performed to render the screen.
2018-07-22 05:38:57 -07:00
Wez Furlong
b6aaf829b8
add ClearToEndOfScreen operation
2018-07-21 14:57:24 -07:00
Wez Furlong
10e3f5d2a2
add ClearToEndOfLine
2018-07-21 14:25:19 -07:00
Wez Furlong
86e59293d3
move renderer state into the Terminal instance
...
This simplifies usage and the Terminal trait
2018-07-21 13:19:38 -07:00
Wez Furlong
db787fdfd0
improve fidelity of tcsetattr interface
2018-07-21 11:18:24 -07:00
Wez Furlong
dfaf61ff6a
add drain/purge ops, and tidy up Write::flush
2018-07-21 10:59:41 -07:00
Wez Furlong
c96800a2d4
extract unix tty functions to a trait
...
This also splits up the Handle type; we now just track the read
and write instances separately.
2018-07-21 10:30:15 -07:00
Wez Furlong
82bcccd640
add basic windows console renderer
2018-07-21 08:54:38 -07:00
Wez Furlong
f9fa2733fd
expose windows terminal control handles via Terminal trait
2018-07-21 05:12:56 -07:00
Wez Furlong
0220e6872f
split terminal into unix and windows modules
2018-07-21 04:39:56 -07:00
Wez Furlong
59d1a58297
sketch out a NOP windows renderer
2018-07-21 04:26:27 -07:00
Wez Furlong
7d83833e8c
Now with something approximating windows support
...
I've run hello.rs under wine, but even though wine seems
to happily report that the windows 10 escapes are handled,
they are not. So more work is needed.
2018-07-20 20:39:16 -07:00
Wez Furlong
439c0eba59
shrink some more enums
2018-07-20 13:10:46 -07:00
Wez Furlong
d8cf6181a1
make CSI a bit smaller by boxing Unspecified out of the enum
2018-07-20 12:41:39 -07:00
Wez Furlong
df7ab5f017
Add a little write buffer to UnixTerminal
...
This is important to reduce the the volume of write syscalls generated
during formatting of escape sequences.
2018-07-20 09:56:18 -07:00
Wez Furlong
6dbd5275e8
move Read/Write to the underlying Handle for UnixTerminal
2018-07-20 09:39:45 -07:00
Wez Furlong
232c3ec754
replace EncodeEscape trait with plain old Display
...
This makes it easier to use the escape sequence rendering with
plain old `format!`
2018-07-20 09:11:44 -07:00
Wez Furlong
5ac675bb5b
simplify the terminfo renderer code a little by reducing macro usage
2018-07-20 07:18:18 -07:00
Wez Furlong
4090417b29
tidy up true color fallback handling
2018-07-20 06:59:32 -07:00
Wez Furlong
9c1fad733d
doc updates
2018-07-20 06:59:32 -07:00
Wez Furlong
7111f5f153
remove test_ prefix from tests
2018-07-19 20:55:09 -07:00
Wez Furlong
d37eb906b3
Add a simple optimization to use ClearScreen
2018-07-19 18:48:59 -07:00
Wez Furlong
fe32fac524
Add ClearScreen Action
...
For clearing to a given background color, in some cases we may need
to know the size of the screen. To facilitate this, I've changed
the interface for the renderer to receive the Terminal instance
so that we can query the size of the screen.
2018-07-19 18:01:13 -07:00
Wez Furlong
c78d8a0ccc
add get/set terminal size
2018-07-19 11:26:24 -07:00
Wez Furlong
01f57141e5
Add UnixTerminal and the Terminal and IsTty traits
2018-07-19 10:52:29 -07:00
Wez Furlong
71354f8cb9
flesh out example and a couple of bugs
2018-07-19 09:58:48 -04:00
Wez Furlong
760be03f8e
add failing example
2018-07-17 19:04:23 -07:00
Wez Furlong
b69cc04266
add non-terminfo fallback rendering
2018-07-17 14:30:03 -07:00
Wez Furlong
3a31975f06
Add terminal capabilities struct
2018-07-17 12:00:22 -07:00
Wez Furlong
eb7783242e
add_changes() to improve efficiency of copy/draw operations
2018-07-16 09:30:44 -07:00
Wez Furlong
60912a4d44
add copy_region method
2018-07-16 08:30:27 -07:00
Wez Furlong
2830da269e
Implement screen/region diffing and copying
2018-07-16 08:19:29 -07:00
Wez Furlong
30a549bdab
avoid emitting sgr if the attribute bits are unchanged
2018-07-15 20:42:27 -07:00
Wez Furlong
0828e40b15
adopt encode_escape in the renderer
...
This pulls in the rendering code from the escape sequence parser
module and expands its tests.
Added my compiled xterm terminfo file to make sure that the
test environment is reproducible.
2018-07-15 20:36:51 -07:00
Wez Furlong
bb96508634
add support for DECSET and a handful of known modes
2018-07-15 15:08:09 -07:00
Wez Furlong
a96e4f29ba
Add parsing/encoding for Esc sequences (non-CSI, non-OSC)
2018-07-15 14:17:22 -07:00