Chris Vest
ea7b5dbae2
Add Backend::print_at_rep and make Printer::print_hline use it. ( #326 )
...
* Add Backend::print_at_rep and make Printer::print_hline use it.
This avoids a string allocation in `print_hline` and makes it faster, presumably for all backends.
This speeds up the rendering of the background in StackView.
* Fix a bug in how Printer::print_hline computes the repetition count.
2019-03-12 15:03:00 -07:00
Chris Vest
0dfa337ba4
Use a single hashmap lookup to determine if a color has been resolved, and to what, instead of two lookups.
2019-03-12 09:54:48 +01:00
Alexandre Bury
242a3c68a7
Fix clippy warnings
2019-03-04 10:31:36 -08:00
Alexandre Bury
9cd4f21963
Check $TERM on pancurses as well
2019-03-03 19:31:13 -08:00
Alexandre Bury
f765e9ac07
Cursive::ncurses & cie now return io::Result<Self>
2019-03-03 19:24:39 -08:00
Alexandre Bury
dcee6da16a
ncurses: panic with error message if $TERM is unset
2019-03-03 18:24:04 -08:00
Alexandre Bury
b83ab6f2d3
Enable raw mode for pancurses
2019-02-28 16:22:48 -08:00
Alexandre Bury
53ebf90c0c
Enable raw mode for ncurses
2019-02-28 16:20:07 -08:00
Alexandre Bury
06b02e4665
Remove "extern crate" and rustfmt
2019-02-28 16:04:14 -08:00
Alexandre Bury
e096dc9740
Run cargo fix --edition-idioms
2019-02-28 15:55:10 -08:00
Alexandre Bury
e51be07e5d
Update to Rust 2018
...
Run `cargo fix --edition` and update Cargo.toml
2019-02-28 15:54:12 -08:00
Alexandre Bury
88d2fb1f46
Simplifies backend input
2019-02-28 13:41:40 -08:00
Alexandre Bury
79e23bb70e
Update dependencies
2018-11-30 16:55:47 -08:00
Alexandre Bury
d9d34b4350
Add EventTrigger, refactor OnEventView
2018-11-09 10:40:06 -08:00
Alexandre Bury
02c2680eaa
Do not infer WheelDown on non-legacy ncurses backends
2018-11-05 15:19:00 -08:00
Alexandre Bury
e111f982b9
Update for latest bear-lib-terminal
2018-11-05 11:03:52 -08:00
Alexandre Bury
005d505cc4
Enable wheel down detection on ubuntu
2018-11-05 10:59:55 -08:00
Alexandre Bury
9430fec91b
Prepare for next ncurses release
2018-11-02 10:06:53 -07:00
Alexandre Bury
3b81305b16
Update ncurses backend to use mouse_v1
2018-11-01 14:38:14 -07:00
Alexander Gavrilov
a5e9f890d0
Do not compile signal_hook on Windows
2018-10-18 07:52:38 -07:00
Alexandre Bury
92f919978c
Rustfmt
2018-08-22 13:33:29 -07:00
Alexandre Bury
4ccc07c6d3
Update pancurses backend handling of multiple events
2018-07-22 20:13:49 -07:00
Alexandre Bury
6a728bf234
Move resize thread handling to separate module
2018-07-19 21:11:50 -07:00
Alexandre Bury
f4530d688b
Fix compilation for non-Unix platforms
2018-07-19 20:50:46 -07:00
Alexandre Bury
5dfc27bd9f
Fix compilation error on BLT backend
2018-07-19 20:13:37 -07:00
Alexandre Bury
af4e55ed18
Fix dummy & blt backends
2018-07-19 19:45:26 -07:00
Alexandre Bury
2610b697a8
Rustfmt
2018-07-19 19:44:59 -07:00
Alexandre Bury
acd3bbfcca
Share resize thread logic between all unix backends
2018-07-18 20:01:26 -07:00
Alexandre Bury
e0cc2ea703
Share resize thread logic between ncurses backends
2018-07-18 19:49:10 -07:00
Alexandre Bury
fd75249633
Move resize-specific behaviour to backend
2018-07-18 18:17:39 -07:00
Alexandre Bury
1f1e238d2e
Fix pancurses for windows
2018-07-08 12:54:35 -07:00
Alexandre Bury
6135b0df79
Refactor input system
...
* Moves from chan to crossbeam-channel
* Moves from chan_signal to signal-hook
2018-07-08 12:49:12 -07:00
Alexandre Bury
6ce2dba8a1
Fix clippy warnings
2018-06-21 14:44:30 -07:00
Alexandre Bury
bd78bca91b
Don't drag scrollbars if they're not visible
2018-06-20 17:35:58 -07:00
Alexandre Bury
9bd1eb320d
Add size cache to ScrollView
2018-06-20 11:48:09 -07:00
Alexandre Bury
b96ea52a92
Do not import chan_signal if not required
2018-06-18 18:47:11 -07:00
Alexandre Bury
3f16e8ed60
Do not use chan_signal on windows
2018-06-18 16:50:09 -07:00
Alexandre Bury
26e5f51192
Use term_size instead of ioctl
2018-06-18 16:08:55 -07:00
Alexandre Bury
804e41ec43
Fix resize event
2018-06-17 17:26:03 -07:00
Alexandre Bury
14fe6f3b36
Cargo fmt
2018-06-16 13:23:09 -07:00
Alexandre Bury
35eb1ec5a2
Fix pancurses
2018-06-16 12:57:20 -07:00
Alexandre Bury
83bcf4fb72
Merge branch 'master' into callback_preemption
2018-06-16 11:03:39 -07:00
Alexandre Bury
3f5b37951b
Do not consume input before exit
2018-06-16 10:58:55 -07:00
Alexandre Bury
5e1956b737
Merge branch 'master' into scroll
2018-06-15 23:21:10 -07:00
Alexandre Bury
8acc08f340
Rustfmt
2018-06-10 23:29:19 -07:00
Alexandre Bury
70cddae454
Add comments
2018-05-21 22:51:10 -07:00
Alexandre Bury
c8d39910ab
Backend: add AtomicBool to stop input thread
2018-05-20 10:55:13 -07:00
Alexandre Bury
0b6e5b6ad4
Add event polling to Blt backend
...
Basically simulates a constant set_fps(30)
2018-05-20 10:42:52 -07:00
Alexandre Bury
05e1212a50
Refactor Backend input model
...
Backends now have to send input to the given `chan::Sender<Event>`.
They send these events from a separate thread, allowing selection
between input and callbacks.
This currently breaks the BearLibTerminal backend, which requires all
calls to come from the UI thread.
This might not be super-safe for the ncurses backend also. We hope that
input and output are separate enough that they can run concurrently without
problem.
2018-05-20 09:59:35 -07:00
Alexandre Bury
2088d5de2a
Cargo fmt
2018-05-17 17:37:39 -07:00