windows: extract winsize

This commit is contained in:
Wez Furlong committed 2019-03-25 07:20:27 -07:00
1 parent 08cb4af6f4
commit 7875bc4e1a
2 files changed
+12 -12

No files matched your search

+3 -12
View File
@@ -1,5 +1,6 @@
use super::cmdline::CommandBuilder;
use crate::pty::win::ownedhandle::OwnedHandle;
use super::ownedhandle::OwnedHandle;
use super::winsize;
use failure::Error;
use lazy_static::lazy_static;
use shared_library::shared_library;
@@ -7,8 +8,7 @@ use std::env;
use std::ffi::{OsStr, OsString};
use std::io::{self, Error as IoError, Result as IoResult};
use std::mem;
use std::os::windows::ffi::OsStrExt;
use std::os::windows::ffi::OsStringExt;
use std::os::windows::ffi::{OsStrExt, OsStringExt};
use std::os::windows::raw::HANDLE;
use std::path::Path;
use std::ptr;
@@ -329,15 +329,6 @@ pub struct SlavePty {
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 {
pub fn resize(
&self,
+9
View File
@@ -2,3 +2,12 @@ pub mod cmdline;
pub mod conpty;
pub mod ownedhandle;
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,
}