theframework/
lib.rs

1pub mod theapp;
2pub mod thecolor;
3pub mod thecontext;
4pub mod thedraw2d;
5pub mod thepalette;
6pub mod thetrait;
7
8#[cfg(feature = "ui")]
9pub mod theui;
10
11#[cfg(feature = "code")]
12pub mod thecode;
13
14#[cfg(feature = "gpu")]
15pub mod thegpu;
16
17#[cfg(feature = "gpu")]
18pub use wgpu;
19
20pub use crate::theapp::TheApp;
21pub use crate::thecontext::TheContext;
22pub use crate::thetrait::TheTrait;
23
24#[cfg(feature = "ui")]
25pub use crate::theui::TheUI;
26
27use rust_embed::RustEmbed;
28#[derive(RustEmbed)]
29#[folder = "embedded/"]
30#[exclude = "*.txt"]
31#[exclude = "*.DS_Store"]
32pub struct Embedded;
33pub use serde::{Deserialize, Serialize};
34
35#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
36pub enum TheKeyCode {
37    Escape,
38    Return,
39    Delete,
40    Up,
41    Right,
42    Down,
43    Left,
44    Space,
45    Tab,
46}
47
48pub mod prelude {
49
50    pub use serde::{Deserialize, Serialize};
51
52    pub use rustc_hash::*;
53    pub use uuid::Uuid;
54    pub use vek::*;
55
56    pub use crate::theapp::TheApp;
57    pub use crate::thecolor::TheColor;
58    pub use crate::thecontext::TheContext;
59    pub use crate::thedraw2d::TheDraw2D;
60    pub use crate::thedraw2d::TheHorizontalAlign;
61    pub use crate::thedraw2d::TheVerticalAlign;
62    pub use crate::thepalette::ThePalette;
63
64    pub use crate::thetrait::TheTrait;
65    pub use crate::TheKeyCode;
66
67    //#[cfg(feature = "renderer")]
68    //pub use therenderer::prelude::*;
69
70    #[cfg(feature = "ui")]
71    pub use crate::theui::prelude::*;
72
73    //#[cfg(feature = "code")]
74    //pub use crate::thecode::prelude::*;
75
76    #[cfg(feature = "gpu")]
77    pub use crate::thegpu::prelude::*;
78}