1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 22:01:47 +03:00

move FrontEndSelection to config module

This commit is contained in:
Wez Furlong 2020-10-02 10:38:07 -07:00
parent e0dcf40967
commit 35f6a3dd9d
3 changed files with 20 additions and 18 deletions

17
src/config/frontend.rs Normal file
View File

@ -0,0 +1,17 @@
use super::*;
#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
pub enum FrontEndSelection {
OpenGL,
Software,
OldSoftware,
MuxServer,
Null,
}
impl_lua_conversion!(FrontEndSelection);
impl Default for FrontEndSelection {
fn default() -> Self {
FrontEndSelection::OpenGL
}
}

View File

@ -5,7 +5,6 @@ use crate::create_user_owned_dirs;
use crate::font::locator::FontLocatorSelection;
use crate::font::rasterizer::FontRasterizerSelection;
use crate::font::shaper::FontShaperSelection;
use crate::frontend::FrontEndSelection;
use anyhow::{anyhow, bail, Context, Error};
use lazy_static::lazy_static;
use luahelper::impl_lua_conversion;
@ -27,6 +26,7 @@ use toml;
mod color;
mod daemon;
mod font;
mod frontend;
pub mod keyassignment;
mod keys;
mod ssh;
@ -36,6 +36,7 @@ mod unix;
pub use color::*;
pub use daemon::*;
pub use font::*;
pub use frontend::*;
pub use keys::*;
pub use ssh::*;
pub use terminal::*;

View File

@ -3,8 +3,6 @@ use crate::mux::tab::Tab;
use crate::mux::window::WindowId;
use anyhow::{anyhow, Error};
use downcast_rs::{impl_downcast, Downcast};
use luahelper::impl_lua_conversion;
use serde::{Deserialize, Serialize};
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::atomic::{AtomicBool, Ordering};
@ -13,21 +11,7 @@ pub mod activity;
pub mod gui;
pub mod muxserver;
#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
pub enum FrontEndSelection {
OpenGL,
Software,
OldSoftware,
MuxServer,
Null,
}
impl_lua_conversion!(FrontEndSelection);
impl Default for FrontEndSelection {
fn default() -> Self {
FrontEndSelection::OpenGL
}
}
pub use crate::config::FrontEndSelection;
thread_local! {
static FRONT_END: RefCell<Option<Rc<dyn FrontEnd>>> = RefCell::new(None);