refactor: pull gui sources up one level

It hasn't been necessary to have them go under `gui` since
the mux server was moved out to its own binary.
This commit is contained in:
Wez Furlong committed 2021-02-28 00:11:17 -08:00
1 parent ac376fb9c6
commit c5b7fbaccf
36 files changed
+53 -58

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
use crate::gui::TermWindow;
use crate::TermWindow;
use ::window::*;
use anyhow::Error;
pub use config::FrontEndSelection;
File renamed without changes.
File renamed without changes.
File renamed without changes.
-18
View File
@@ -1,18 +0,0 @@
use ::window::*;
pub use config::FrontEndSelection;
mod glyphcache;
mod overlay;
mod quad;
mod renderstate;
mod scrollbar;
mod selection;
mod shapecache;
mod tabbar;
mod termwindow;
mod utilsprites;
pub use selection::SelectionMode;
pub use termwindow::set_window_class;
pub use termwindow::TermWindow;
pub use termwindow::ICON_DATA;
File renamed without changes.
File renamed without changes.
+17 -2
View File
@@ -2,6 +2,7 @@
#![windows_subsystem = "windows"]
use crate::frontend::front_end;
use ::window::*;
use anyhow::anyhow;
use mux::activity::Activity;
use mux::domain::{Domain, LocalDomain};
@@ -17,13 +18,27 @@ use wezterm_gui_subcommands::*;
use wezterm_toast_notification::*;
mod frontend;
mod gui;
mod glyphcache;
mod markdown;
mod overlay;
mod quad;
mod renderstate;
mod scripting;
mod scrollbar;
mod selection;
mod shapecache;
mod stats;
mod tabbar;
mod termwindow;
mod update;
mod utilsprites;
mod window_config;
pub use selection::SelectionMode;
pub use termwindow::set_window_class;
pub use termwindow::TermWindow;
pub use termwindow::ICON_DATA;
#[derive(Debug, StructOpt)]
#[structopt(
about = "Wez's Terminal Emulator\nhttp://github.com/wez/wezterm",
@@ -268,7 +283,7 @@ async fn async_run_terminal_gui(
fn run_terminal_gui(opts: StartCommand) -> anyhow::Result<()> {
if let Some(cls) = opts.class.as_ref() {
crate::gui::set_window_class(cls);
crate::set_window_class(cls);
}
let unix_socket_path =
@@ -1,4 +1,4 @@
use crate::gui::TermWindow;
use crate::TermWindow;
use mux::pane::PaneId;
use mux::tab::TabId;
use mux::termwiztermtab::TermWizTerminal;
@@ -16,7 +16,7 @@ fn run_confirmation_app(message: &str, term: &mut TermWizTerminal) -> anyhow::Re
let size = term.get_screen_size()?;
/*
use crate::gui::termwindow::ICON_DATA;
use crate::termwindow::ICON_DATA;
use image::GenericImageView;
use std::sync::Arc;
use termwiz::surface::change::ImageData;
@@ -1,5 +1,5 @@
use crate::gui::selection::{SelectionCoordinate, SelectionRange};
use crate::gui::termwindow::TermWindow;
use crate::selection::{SelectionCoordinate, SelectionRange};
use crate::termwindow::TermWindow;
use config::keyassignment::ScrollbackEraseMode;
use mux::domain::DomainId;
use mux::pane::{Pane, PaneId};
@@ -5,9 +5,9 @@
//! be rendered as a popup/context menu if the system supports it; at the
//! time of writing our window layer doesn't provide an API for context
//! menus.
use crate::gui::termwindow::clipboard::ClipboardHelper;
use crate::gui::termwindow::spawn::SpawnWhere;
use crate::gui::termwindow::TermWindow;
use crate::termwindow::clipboard::ClipboardHelper;
use crate::termwindow::spawn::SpawnWhere;
use crate::termwindow::TermWindow;
use anyhow::anyhow;
use config::configuration;
use config::keyassignment::{SpawnCommand, SpawnTabDomain};
@@ -1,4 +1,4 @@
use crate::gui::termwindow::TermWindow;
use crate::termwindow::TermWindow;
use mux::pane::{Pane, PaneId};
use mux::tab::{Tab, TabId};
use mux::termwiztermtab::{allocate, TermWizTerminal};
@@ -1,5 +1,5 @@
use crate::gui::selection::{SelectionCoordinate, SelectionRange};
use crate::gui::termwindow::TermWindow;
use crate::selection::{SelectionCoordinate, SelectionRange};
use crate::termwindow::TermWindow;
use config::keyassignment::ScrollbackEraseMode;
use mux::domain::DomainId;
use mux::pane::{Pane, PaneId, Pattern, SearchResult};
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -1,7 +1,7 @@
//! GuiWin represents a Gui TermWindow (as opposed to a Mux window) in lua code
use super::luaerr;
use super::pane::PaneObject;
use crate::gui::TermWindow;
use crate::TermWindow;
use anyhow::anyhow;
use config::keyassignment::KeyAssignment;
use luahelper::JsonLua;
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
use crate::gui::glyphcache::CachedGlyph;
use crate::glyphcache::CachedGlyph;
use ::window::bitmaps::Texture2d;
use config::TextStyle;
use std::rc::Rc;
@@ -210,10 +210,10 @@ impl<'a> std::hash::Hash for (dyn ShapeCacheKeyTrait + 'a) {
#[cfg(test)]
mod test {
use super::*;
use crate::gui::glyphcache::GlyphCache;
use crate::gui::shapecache::GlyphPosition;
use crate::gui::shapecache::ShapedInfo;
use crate::gui::utilsprites::RenderMetrics;
use crate::glyphcache::GlyphCache;
use crate::shapecache::GlyphPosition;
use crate::shapecache::ShapedInfo;
use crate::utilsprites::RenderMetrics;
use config::TextStyle;
use k9::assert_equal as assert_eq;
use std::rc::Rc;
File renamed without changes.
@@ -1,4 +1,4 @@
use crate::gui::TermWindow;
use crate::TermWindow;
use config::keyassignment::{ClipboardCopyDestination, ClipboardPasteSource};
use mux::pane::Pane;
use mux::window::WindowId as MuxWindowId;
@@ -2,17 +2,17 @@
use super::quad::*;
use super::renderstate::*;
use super::utilsprites::RenderMetrics;
use crate::gui::glium::texture::SrgbTexture2d;
use crate::gui::overlay::{
use crate::glium::texture::SrgbTexture2d;
use crate::overlay::{
confirm_close_pane, confirm_close_tab, confirm_close_window, confirm_quit_program, launcher,
start_overlay, start_overlay_pane, tab_navigator, CopyOverlay, SearchOverlay,
};
use crate::gui::scrollbar::*;
use crate::gui::selection::Selection;
use crate::gui::shapecache::*;
use crate::gui::tabbar::TabBarState;
use crate::scripting::guiwin::GuiWin;
use crate::scripting::pane::PaneObject;
use crate::scrollbar::*;
use crate::selection::Selection;
use crate::shapecache::*;
use crate::tabbar::TabBarState;
use ::wezterm_term::input::MouseButton as TMB;
use ::window::*;
use anyhow::{anyhow, ensure};
@@ -62,7 +62,7 @@ lazy_static::lazy_static! {
static ref WINDOW_CLASS: Mutex<String> = Mutex::new("org.wezfurlong.wezterm".to_owned());
}
pub const ICON_DATA: &'static [u8] = include_bytes!("../../../../assets/icon/terminal.png");
pub const ICON_DATA: &'static [u8] = include_bytes!("../../../assets/icon/terminal.png");
pub fn set_window_class(cls: &str) {
*WINDOW_CLASS.lock().unwrap() = cls.to_owned();
@@ -1,6 +1,6 @@
use crate::gui::tabbar::TabBarItem;
use crate::gui::termwindow::keyevent::window_mods_to_termwiz_mods;
use crate::gui::termwindow::{ScrollHit, TMB};
use crate::tabbar::TabBarItem;
use crate::termwindow::keyevent::window_mods_to_termwiz_mods;
use crate::termwindow::{ScrollHit, TMB};
use ::window::{
Modifiers, MouseButtons as WMB, MouseCursor, MouseEvent, MouseEventKind as WMEK, MousePress,
WindowOps,
@@ -1,9 +1,7 @@
use crate::gui::glium::texture::SrgbTexture2d;
use crate::gui::glyphcache::{CachedGlyph, GlyphCache};
use crate::gui::shapecache::*;
use crate::gui::termwindow::{
BorrowedShapeCacheKey, MappedQuads, RenderState, ScrollHit, ShapedInfo,
};
use crate::glium::texture::SrgbTexture2d;
use crate::glyphcache::{CachedGlyph, GlyphCache};
use crate::shapecache::*;
use crate::termwindow::{BorrowedShapeCacheKey, MappedQuads, RenderState, ScrollHit, ShapedInfo};
use ::window::bitmaps::atlas::OutOfTextureSpace;
use ::window::bitmaps::{TextureCoord, TextureRect, TextureSize};
use ::window::glium;
@@ -1,4 +1,4 @@
use crate::gui::utilsprites::RenderMetrics;
use crate::utilsprites::RenderMetrics;
use ::window::{Dimensions, WindowOps};
use config::ConfigHandle;
use mux::Mux;
@@ -1,4 +1,4 @@
use crate::gui::selection::{SelectionCoordinate, SelectionMode, SelectionRange};
use crate::selection::{SelectionCoordinate, SelectionMode, SelectionRange};
use ::window::WindowOps;
use mux::pane::Pane;
use std::rc::Rc;
@@ -1,4 +1,4 @@
use crate::gui::termwindow::{ClipboardHelper, MuxWindowId};
use crate::termwindow::{ClipboardHelper, MuxWindowId};
use anyhow::{anyhow, bail};
use config::keyassignment::{SpawnCommand, SpawnTabDomain};
use mux::activity::Activity;
+1 -1
View File
@@ -1,4 +1,4 @@
use crate::gui::ICON_DATA;
use crate::ICON_DATA;
use anyhow::anyhow;
use config::configuration;
use config::wezterm_version;
File renamed without changes.
File renamed without changes.