mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 13:21:38 +03:00
add guiloop as indirection over glutinloop
... and remove dep on glutin. We don't properly compile yet, but this is a step to bringing back the egl bits we had originally.
This commit is contained in:
parent
089e98050d
commit
079ac49c6b
@ -11,7 +11,6 @@ failure = "0.1.1"
|
||||
failure_derive = "0.1.1"
|
||||
futures = "0.1.18"
|
||||
gl = "0.10.0"
|
||||
glium = "0.20.0"
|
||||
harfbuzz-sys = "0.1.15"
|
||||
libc = "0.2.36"
|
||||
mio = "0.6.12"
|
||||
@ -28,6 +27,12 @@ path = "term"
|
||||
[target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
|
||||
freetype = "0.3"
|
||||
servo-fontconfig = "0.4.0"
|
||||
egli = "0.4.0"
|
||||
|
||||
[target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies.glium]
|
||||
version = "0.20.0"
|
||||
default-features = false
|
||||
features = []
|
||||
|
||||
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies.xcb]
|
||||
version = "0.8.1"
|
||||
|
@ -1,5 +1,5 @@
|
||||
use failure::Error;
|
||||
use glium::glutin::WindowId;
|
||||
use guiloop::{GuiSender, WindowId};
|
||||
|
||||
mod none;
|
||||
#[cfg(target_os = "macos")]
|
||||
@ -11,8 +11,6 @@ mod x11;
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
pub use self::x11::Clipboard;
|
||||
|
||||
use glutinloop::GuiSender;
|
||||
|
||||
/// A fragment of the clipboard data received from another
|
||||
/// app during paste.
|
||||
#[derive(Debug)]
|
||||
|
@ -1,7 +1,6 @@
|
||||
use clipboard::{ClipboardImpl, Paste};
|
||||
use failure::Error;
|
||||
use glium::glutin::WindowId;
|
||||
use glutinloop::GuiSender;
|
||||
use guiloop::{GuiSender, WindowId};
|
||||
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||
|
||||
/// A no-op clipboard implementation
|
||||
|
@ -2,8 +2,7 @@
|
||||
//! Check out <https://tronche.com/gui/x/icccm/sec-2.html> for some deep and complex
|
||||
//! background on what's happening in here.
|
||||
use failure::{self, Error};
|
||||
use glium::glutin::WindowId;
|
||||
use glutinloop::GuiSender;
|
||||
use guiloop::{GuiSender, WindowId};
|
||||
use mio::{Events, Poll, PollOpt, Ready, Token};
|
||||
use mio::unix::EventedFd;
|
||||
use mio_extras::channel::{channel as mio_channel, Receiver as MioReceiver, Sender as MioSender};
|
||||
|
@ -13,14 +13,15 @@
|
||||
use futures::{Async, Future};
|
||||
use futures::executor::{self, Notify, Spawn};
|
||||
use futures::future::{ExecuteError, Executor};
|
||||
use glutinloop::GuiSender;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::mpsc;
|
||||
|
||||
use guiloop::{GuiReceiver, GuiSender};
|
||||
|
||||
pub struct Core {
|
||||
tx: GuiSender<usize>,
|
||||
rx: mpsc::Receiver<usize>,
|
||||
rx: GuiReceiver<usize>,
|
||||
notify: Arc<Notifier>,
|
||||
// Slab of running futures used to track what's running and what slots are
|
||||
// empty. Slot indexes are then sent along tx/rx above to indicate which
|
||||
@ -35,7 +36,7 @@ enum Slot {
|
||||
}
|
||||
|
||||
impl Core {
|
||||
pub fn new(tx: GuiSender<usize>, rx: mpsc::Receiver<usize>) -> Self {
|
||||
pub fn new(tx: GuiSender<usize>, rx: GuiReceiver<usize>) -> Self {
|
||||
Self {
|
||||
notify: Arc::new(Notifier {
|
||||
tx: Mutex::new(tx.clone()),
|
||||
|
@ -9,7 +9,7 @@ use font::FontConfiguration;
|
||||
use futures;
|
||||
use glium;
|
||||
use glium::glutin::{self, ElementState, MouseCursor};
|
||||
use glutinloop::GuiEventLoop;
|
||||
use guiloop::GuiEventLoop;
|
||||
use opengl::render::Renderer;
|
||||
use opengl::textureatlas::OutOfTextureSpace;
|
||||
use pty::MasterPty;
|
||||
|
17
src/guiloop/mod.rs
Normal file
17
src/guiloop/mod.rs
Normal file
@ -0,0 +1,17 @@
|
||||
#[cfg(target_os = "macos")]
|
||||
mod glutinloop;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub use glutinloop::{GuiEventLoop, GuiSender};
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub use mpsc::Receiver as GuiReceiver;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub use glium::glutin::WindowId;
|
||||
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
pub use mio_extras::channel::{Receiver as GuiReceiver, Sender as GuiSender};
|
||||
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
pub use xcb::xproto::Window as WindowId;
|
@ -49,9 +49,10 @@ mod remotemio;
|
||||
mod opengl;
|
||||
|
||||
mod clipboard;
|
||||
mod glutinloop;
|
||||
use glutinloop::GuiEventLoop;
|
||||
mod guiloop;
|
||||
#[cfg(target_os = "macos")]
|
||||
mod gliumwindows;
|
||||
#[cfg(target_os = "macos")]
|
||||
use gliumwindows::TerminalWindow;
|
||||
|
||||
mod font;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use failure::Error;
|
||||
use futures::sync::oneshot;
|
||||
use glutinloop::GuiSender;
|
||||
use guiloop::GuiSender;
|
||||
use mio::{Event, Evented, Events, Poll, PollOpt, Ready, Token};
|
||||
use mio::unix::EventedFd;
|
||||
use mio_extras::channel::{channel as mio_channel, Receiver as MioReceiver, Sender as MioSender};
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! Helper for detecting SIGCHLD
|
||||
|
||||
use failure::Error;
|
||||
use glutinloop::GuiSender;
|
||||
use guiloop::GuiSender;
|
||||
use libc;
|
||||
use std::io;
|
||||
use std::mem;
|
||||
|
Loading…
Reference in New Issue
Block a user