add serde
This commit is contained in:
parent
921377c2cc
commit
9539b2ad76
4 changed files with 44 additions and 6 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
authors = ["Michael Sippel <micha@fragmental.art>"]
|
authors = ["Michael Sippel <micha@fragmental.art>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
@ -7,10 +6,11 @@ version = "0.1.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
no_deadlocks = "*"
|
no_deadlocks = "*"
|
||||||
cgmath = "0.17.0"
|
cgmath = { version = "0.18.0", features = ["serde"] }
|
||||||
termion = "1.5.5"
|
termion = "1.5.5"
|
||||||
signal-hook = "0.3.1"
|
signal-hook = "0.3.1"
|
||||||
signal-hook-async-std = "0.2.0"
|
signal-hook-async-std = "0.2.0"
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|
||||||
[dependencies.async-std]
|
[dependencies.async-std]
|
||||||
version = "1.7.0"
|
version = "1.7.0"
|
||||||
|
|
|
@ -1,3 +1,38 @@
|
||||||
|
#![feature(trait_alias)]
|
||||||
|
|
||||||
|
pub mod core;
|
||||||
|
pub mod index;
|
||||||
|
pub mod grid;
|
||||||
|
pub mod sequence;
|
||||||
|
pub mod singleton;
|
||||||
|
pub mod terminal;
|
||||||
|
pub mod projection;
|
||||||
|
pub mod string_editor;
|
||||||
|
pub mod leveled_term_view;
|
||||||
|
|
||||||
|
/* maybe?
|
||||||
|
pub use {
|
||||||
|
cgmath::{Vector2, Point2},
|
||||||
|
termion::event::{Event, Key},
|
||||||
|
crate::{
|
||||||
|
core::{View, Observer, ObserverExt, ObserverBroadcast, ViewPort, OuterViewPort},
|
||||||
|
index::{ImplIndexView},
|
||||||
|
terminal::{
|
||||||
|
TerminalView,
|
||||||
|
TerminalAtom,
|
||||||
|
TerminalStyle,
|
||||||
|
TerminalEvent,
|
||||||
|
Terminal,
|
||||||
|
TerminalCompositor
|
||||||
|
},
|
||||||
|
sequence::{VecBuffer, SequenceView},
|
||||||
|
grid::{GridOffset, GridWindowIterator},
|
||||||
|
singleton::{SingletonView, SingletonBuffer},
|
||||||
|
string_editor::{StringEditor, insert_view::StringInsertView},
|
||||||
|
leveled_term_view::LeveledTermView
|
||||||
|
}
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
pub fn magic_header() {
|
pub fn magic_header() {
|
||||||
eprintln!("<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>");
|
eprintln!("<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>");
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
use {
|
||||||
|
super::TerminalStyle,
|
||||||
|
serde::{Serialize, Deserialize}
|
||||||
|
};
|
||||||
|
|
||||||
use super::TerminalStyle;
|
#[derive(Clone, Copy, Serialize, Deserialize, Debug)]
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
|
||||||
pub struct TerminalAtom {
|
pub struct TerminalAtom {
|
||||||
pub c: Option<char>,
|
pub c: Option<char>,
|
||||||
pub style: TerminalStyle
|
pub style: TerminalStyle
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
#[derive(Default, Copy, Clone, PartialEq)]
|
#[derive(Default, Copy, Clone, PartialEq, Serialize, Deserialize, Debug)]
|
||||||
pub struct TerminalStyle {
|
pub struct TerminalStyle {
|
||||||
pub fg_color: Option<(u8, u8, u8)>,
|
pub fg_color: Option<(u8, u8, u8)>,
|
||||||
pub bg_color: Option<(u8, u8, u8)>,
|
pub bg_color: Option<(u8, u8, u8)>,
|
||||||
|
|
Loading…
Reference in a new issue