1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-28 09:12:19 +03:00

reduce deps on glutin in futurecore

This commit is contained in:
Wez Furlong 2018-03-03 21:47:14 -08:00
parent dac2962c29
commit 089e98050d
3 changed files with 7 additions and 7 deletions

View File

@ -13,8 +13,7 @@
use futures::{Async, Future};
use futures::executor::{self, Notify, Spawn};
use futures::future::{ExecuteError, Executor};
use glium::glutin::EventsLoopProxy;
use glutinloop::{channel, GuiSender};
use glutinloop::GuiSender;
use std::cell::{Cell, RefCell};
use std::sync::{Arc, Mutex};
use std::sync::mpsc;
@ -36,8 +35,7 @@ enum Slot {
}
impl Core {
pub fn new(proxy: EventsLoopProxy) -> Self {
let (tx, rx) = channel(proxy);
pub fn new(tx: GuiSender<usize>, rx: mpsc::Receiver<usize>) -> Self {
Self {
notify: Arc::new(Notifier {
tx: Mutex::new(tx.clone()),

View File

@ -66,7 +66,9 @@ pub struct GuiEventLoop {
impl GuiEventLoop {
pub fn new() -> Result<Self, Error> {
let event_loop = glium::glutin::EventsLoop::new();
let core = futurecore::Core::new(event_loop.create_proxy());
let (fut_tx, fut_rx) = channel(event_loop.create_proxy());
let core = futurecore::Core::new(fut_tx, fut_rx);
let (wake_tx, poll_rx) = channel(event_loop.create_proxy());
let (paster, paster_rx) = channel(event_loop.create_proxy());

View File

@ -52,6 +52,7 @@ mod clipboard;
mod glutinloop;
use glutinloop::GuiEventLoop;
mod gliumwindows;
use gliumwindows::TerminalWindow;
mod font;
use font::FontConfiguration;
@ -166,8 +167,7 @@ fn spawn_window(
config.hyperlink_rules.clone(),
);
let window =
gliumwindows::TerminalWindow::new(event_loop, terminal, master, child, fontconfig, config)?;
let window = TerminalWindow::new(event_loop, terminal, master, child, fontconfig, config)?;
event_loop.add_window(window)
}