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]
|
||||
authors = ["Michael Sippel <micha@fragmental.art>"]
|
||||
edition = "2018"
|
||||
|
@ -7,10 +6,11 @@ version = "0.1.0"
|
|||
|
||||
[dependencies]
|
||||
no_deadlocks = "*"
|
||||
cgmath = "0.17.0"
|
||||
cgmath = { version = "0.18.0", features = ["serde"] }
|
||||
termion = "1.5.5"
|
||||
signal-hook = "0.3.1"
|
||||
signal-hook-async-std = "0.2.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
||||
[dependencies.async-std]
|
||||
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() {
|
||||
eprintln!("<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>");
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
use {
|
||||
super::TerminalStyle,
|
||||
serde::{Serialize, Deserialize}
|
||||
};
|
||||
|
||||
use super::TerminalStyle;
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
#[derive(Clone, Copy, Serialize, Deserialize, Debug)]
|
||||
pub struct TerminalAtom {
|
||||
pub c: Option<char>,
|
||||
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 fg_color: Option<(u8, u8, u8)>,
|
||||
pub bg_color: Option<(u8, u8, u8)>,
|
||||
|
|
Loading…
Reference in a new issue