Wez Furlong
5c76670acd
start making Cell aware of graphemes
2018-08-01 09:35:07 -07:00
Wez Furlong
92d1d63841
add (untested) mouse hit tester
2018-08-01 08:26:01 -07:00
Wez Furlong
db49040d5d
rethink the widget stuff
...
This feels a bit more idiomatic and flexible
2018-08-01 07:56:24 -07:00
Wez Furlong
de38d1aad7
cut over to the new widget bits
2018-07-29 12:45:18 -07:00
Wez Furlong
e71e6d2f5a
start building out alternate widget api
2018-07-29 00:15:14 -07:00
Wez Furlong
3c8adfaf16
use fancier colors in the widget example
2018-07-28 13:21:56 -07:00
Wez Furlong
ed4810b2af
remove debugging code
2018-07-28 12:29:17 -07:00
Wez Furlong
bb609df317
internalizing boxing when creating widgets
2018-07-28 12:28:10 -07:00
Wez Furlong
612ac84454
decode device attributes csi sequence
2018-07-28 10:54:34 -07:00
Wez Furlong
c275146336
add mouse reporting
2018-07-28 07:52:57 -07:00
Wez Furlong
d89814c8ad
add bracketed paste mode
2018-07-27 21:30:49 -07:00
Wez Furlong
2a5721d50a
start a todo section in the readme
2018-07-27 17:46:00 -07:00
Wez Furlong
bc0c0c7848
Add ALT key press handling
...
ECMA-35 and a host of terminals send ESC followed by a keypress as
a 7-bit encoding for representing that ALT (or META) was held down
for that keypress.
We need to keep some more state in the input parser to track this.
There's a little bit of nuance; we don't want to block processing
of a lone escape indefinitely.
The keymap code has been changed to return a clone of the value
in lookup to appease the borrow checker: it can't see that we don't
modify the keymap in the context of the dispatch_callback function :-/
2018-07-27 15:07:41 -07:00
Wez Furlong
abe9bf8f56
simplify input/read buffering
2018-07-27 14:31:05 -07:00
Wez Furlong
e21516d4d2
Add safe sigwinch handling
...
the signal-hook crate provides a nice way to do this without
stomping on other signal handlers
2018-07-27 08:48:34 -07:00
Wez Furlong
947f965c31
make resize signal catching function
2018-07-26 22:13:04 -07:00
Wez Furlong
16dbbb2bad
Trying to improve resize detection and processing
2018-07-26 21:58:08 -07:00
Wez Furlong
250fb20fca
add widget layout solver
2018-07-26 15:33:57 -07:00
Wez Furlong
b3346b9a43
ensure that we set the cursor attributes
...
Set the cursor to match the positioning info reported
by the focused widget
2018-07-24 16:47:41 -07:00
Wez Furlong
837cfae566
fixup comment for Blocking::Yes -> Blocking::Wait
2018-07-24 14:19:18 -07:00
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