1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 06:12:16 +03:00

glium TerminalWindow -> GliumTerminalWindow

This commit is contained in:
Wez Furlong 2019-02-23 20:43:18 -08:00
parent 46cc2cdf99
commit 46c0c7753f
2 changed files with 12 additions and 12 deletions

View File

@ -133,7 +133,7 @@ impl<'a> term::TerminalHost for TabHost<'a> {
self.host.event_loop.spawn_fn(move || {
let (terminal, master, child, fonts) = spawn_window_impl(None, &config, &fonts)?;
let window =
TerminalWindow::new(&event_loop, terminal, master, child, &fonts, &config)?;
GliumTerminalWindow::new(&event_loop, terminal, master, child, &fonts, &config)?;
event_loop.add_window(window)
});
@ -194,7 +194,7 @@ impl<'a> term::TerminalHost for TabHost<'a> {
}
}
pub struct TerminalWindow {
pub struct GliumTerminalWindow {
host: Host,
event_loop: Rc<GuiEventLoop>,
config: Rc<Config>,
@ -210,7 +210,7 @@ pub struct TerminalWindow {
tabs: Tabs,
}
impl TerminalWindow {
impl GliumTerminalWindow {
pub fn new(
event_loop: &Rc<GuiEventLoop>,
terminal: Terminal,
@ -218,7 +218,7 @@ impl TerminalWindow {
process: Child,
fonts: &Rc<FontConfiguration>,
config: &Rc<Config>,
) -> Result<TerminalWindow, Error> {
) -> Result<GliumTerminalWindow, Error> {
let palette = config
.colors
.as_ref()
@ -267,7 +267,7 @@ impl TerminalWindow {
let tab = Tab::new(terminal, process, pty);
Ok(TerminalWindow {
Ok(GliumTerminalWindow {
host,
event_loop: Rc::clone(event_loop),
config: Rc::clone(config),
@ -849,7 +849,7 @@ impl TerminalWindow {
let dpi_scale = self.host.display.gl_window().get_hidpi_factor();
let font_scale = font_scale.unwrap_or_else(|| self.fonts.get_font_scale());
eprintln!(
"TerminalWindow::scaling_changed dpi_scale={} font_scale={}",
"GliumTerminalWindow::scaling_changed dpi_scale={} font_scale={}",
dpi_scale, font_scale
);
self.tabs

View File

@ -1,7 +1,7 @@
use super::GuiSystem;
use crate::futurecore;
use crate::gliumwindows;
pub use crate::gliumwindows::TerminalWindow;
pub use crate::gliumwindows::GliumTerminalWindow;
use crate::guiloop::SessionTerminated;
use crate::{Child, MasterPty};
use failure::Error;
@ -68,10 +68,10 @@ pub enum IOEvent {
}
/// This struct holds references to Windows.
/// The primary mapping is from `WindowId` -> `TerminalWindow`.
/// The primary mapping is from `WindowId` -> `GliumTerminalWindow`.
#[derive(Default)]
struct Windows {
by_id: HashMap<WindowId, gliumwindows::TerminalWindow>,
by_id: HashMap<WindowId, gliumwindows::GliumTerminalWindow>,
}
/// The `GuiEventLoop` represents the combined gui event processor,
@ -144,7 +144,7 @@ impl GuiSystem for GlutinGuiSystem {
config: &Rc<crate::config::Config>,
fontconfig: &Rc<crate::font::FontConfiguration>,
) -> Result<(), Error> {
let window = TerminalWindow::new(
let window = GliumTerminalWindow::new(
&self.event_loop,
terminal,
master,
@ -187,7 +187,7 @@ impl GuiEventLoop {
})
}
pub fn with_window<F: 'static + Fn(&mut TerminalWindow) -> Result<(), Error>>(
pub fn with_window<F: 'static + Fn(&mut GliumTerminalWindow) -> Result<(), Error>>(
events: &Rc<Self>,
window_id: WindowId,
func: F,
@ -256,7 +256,7 @@ impl GuiEventLoop {
}
/// Add a window to the event loop and run it.
pub fn add_window(&self, window: gliumwindows::TerminalWindow) -> Result<(), Error> {
pub fn add_window(&self, window: gliumwindows::GliumTerminalWindow) -> Result<(), Error> {
let window_id = window.window_id();
let pty = window.clone_current_pty()?;
self.schedule_read_pty(pty, window_id, window.get_tab_id_by_idx(0))?;