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

windows: extract winsize

This commit is contained in:
Wez Furlong 2019-03-25 07:20:27 -07:00
parent 08cb4af6f4
commit 7875bc4e1a
2 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,6 @@
use super::cmdline::CommandBuilder; use super::cmdline::CommandBuilder;
use crate::pty::win::ownedhandle::OwnedHandle; use super::ownedhandle::OwnedHandle;
use super::winsize;
use failure::Error; use failure::Error;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use shared_library::shared_library; use shared_library::shared_library;
@ -7,8 +8,7 @@ use std::env;
use std::ffi::{OsStr, OsString}; use std::ffi::{OsStr, OsString};
use std::io::{self, Error as IoError, Result as IoResult}; use std::io::{self, Error as IoError, Result as IoResult};
use std::mem; use std::mem;
use std::os::windows::ffi::OsStrExt; use std::os::windows::ffi::{OsStrExt, OsStringExt};
use std::os::windows::ffi::OsStringExt;
use std::os::windows::raw::HANDLE; use std::os::windows::raw::HANDLE;
use std::path::Path; use std::path::Path;
use std::ptr; use std::ptr;
@ -329,15 +329,6 @@ pub struct SlavePty {
inner: Arc<Mutex<Inner>>, inner: Arc<Mutex<Inner>>,
} }
#[derive(Debug, Clone, Copy)]
#[allow(non_camel_case_types)]
pub struct winsize {
pub ws_row: u16,
pub ws_col: u16,
pub ws_xpixel: u16,
pub ws_ypixel: u16,
}
impl MasterPty { impl MasterPty {
pub fn resize( pub fn resize(
&self, &self,

View File

@ -2,3 +2,12 @@ pub mod cmdline;
pub mod conpty; pub mod conpty;
pub mod ownedhandle; pub mod ownedhandle;
pub mod winpty; pub mod winpty;
#[derive(Debug, Clone, Copy)]
#[allow(non_camel_case_types)]
pub struct winsize {
pub ws_row: u16,
pub ws_col: u16,
pub ws_xpixel: u16,
pub ws_ypixel: u16,
}