mirror of
https://github.com/wez/wezterm.git
synced 2024-11-24 07:46:59 +03:00
rename SoftwareFrontend to GuiFrontend
It started out as a software only cpu renderer but grew into the current gui frontend; rename to reflect that.
This commit is contained in:
parent
728df5662d
commit
01669266f2
@ -17,7 +17,7 @@ mod renderstate;
|
||||
mod termwindow;
|
||||
mod utilsprites;
|
||||
|
||||
pub struct SoftwareFrontEnd {
|
||||
pub struct GuiFrontEnd {
|
||||
connection: Rc<Connection>,
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ pub fn is_opengl_enabled() -> bool {
|
||||
USE_OPENGL.load(Ordering::Acquire)
|
||||
}
|
||||
|
||||
impl SoftwareFrontEnd {
|
||||
impl GuiFrontEnd {
|
||||
pub fn try_new_no_opengl(mux: &Rc<Mux>) -> Fallible<Rc<dyn FrontEnd>> {
|
||||
USE_OPENGL.store(false, Ordering::Release);
|
||||
Self::try_new(mux)
|
||||
@ -37,7 +37,7 @@ impl SoftwareFrontEnd {
|
||||
|
||||
pub fn try_new(_mux: &Rc<Mux>) -> Fallible<Rc<dyn FrontEnd>> {
|
||||
let connection = Connection::init()?;
|
||||
let front_end = Rc::new(SoftwareFrontEnd { connection });
|
||||
let front_end = Rc::new(GuiFrontEnd { connection });
|
||||
Ok(front_end)
|
||||
}
|
||||
}
|
||||
@ -55,7 +55,7 @@ impl Executor for GuiExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
impl FrontEnd for SoftwareFrontEnd {
|
||||
impl FrontEnd for GuiFrontEnd {
|
||||
fn gui_executor(&self) -> Box<dyn Executor> {
|
||||
Box::new(GuiExecutor {})
|
||||
}
|
@ -12,8 +12,8 @@ use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
pub mod gui;
|
||||
pub mod muxserver;
|
||||
pub mod software;
|
||||
|
||||
#[derive(Debug, Deserialize, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum FrontEndSelection {
|
||||
@ -59,8 +59,8 @@ impl FrontEndSelection {
|
||||
let front_end = match self {
|
||||
FrontEndSelection::MuxServer => muxserver::MuxServerFrontEnd::try_new(mux),
|
||||
FrontEndSelection::Null => muxserver::MuxServerFrontEnd::new_null(mux),
|
||||
FrontEndSelection::Software => software::SoftwareFrontEnd::try_new_no_opengl(mux),
|
||||
FrontEndSelection::OpenGL => software::SoftwareFrontEnd::try_new(mux),
|
||||
FrontEndSelection::Software => gui::GuiFrontEnd::try_new_no_opengl(mux),
|
||||
FrontEndSelection::OpenGL => gui::GuiFrontEnd::try_new(mux),
|
||||
}?;
|
||||
|
||||
EXECUTOR.lock().unwrap().replace(front_end.gui_executor());
|
||||
|
Loading…
Reference in New Issue
Block a user