From 46c0c7753fc702011a65c3b62e54aa7b50082006 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 23 Feb 2019 20:43:18 -0800 Subject: [PATCH] glium TerminalWindow -> GliumTerminalWindow --- src/gliumwindows.rs | 12 ++++++------ src/guiloop/glutinloop.rs | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gliumwindows.rs b/src/gliumwindows.rs index a3de95f98..cc9015d17 100644 --- a/src/gliumwindows.rs +++ b/src/gliumwindows.rs @@ -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, config: Rc, @@ -210,7 +210,7 @@ pub struct TerminalWindow { tabs: Tabs, } -impl TerminalWindow { +impl GliumTerminalWindow { pub fn new( event_loop: &Rc, terminal: Terminal, @@ -218,7 +218,7 @@ impl TerminalWindow { process: Child, fonts: &Rc, config: &Rc, - ) -> Result { + ) -> Result { 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 diff --git a/src/guiloop/glutinloop.rs b/src/guiloop/glutinloop.rs index ebfbd9fb6..e694ac929 100644 --- a/src/guiloop/glutinloop.rs +++ b/src/guiloop/glutinloop.rs @@ -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, + by_id: HashMap, } /// The `GuiEventLoop` represents the combined gui event processor, @@ -144,7 +144,7 @@ impl GuiSystem for GlutinGuiSystem { config: &Rc, fontconfig: &Rc, ) -> 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 Result<(), Error>>( + pub fn with_window Result<(), Error>>( events: &Rc, 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))?;