[−][src]Struct crossterm_cursor::sys::winapi::Handle
This abstracts away some WinaApi calls to set and get some console handles.
Methods
impl Handle
[src]
pub fn new(handle: HandleType) -> Result<Handle, Error>
[src]
pub fn current_out_handle() -> Result<*mut c_void, Error>
[src]
Get the handle of the active screen buffer. When using multiple screen buffers this will always point to the to the current screen output buffer.
On success this function returns the HANDLE
to STD_OUTPUT_HANDLE
.
This function uses CONOUT$
to create a file handle to the current output buffer.
Wraps the underlying function call: [CreateFileW] link: [https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilew]
pub fn current_in_handle() -> Result<*mut c_void, Error>
[src]
Get the handle of the active input screen buffer. When using multiple screen buffers this will always point to the to the current screen input buffer.
On success this function returns the HANDLE
to STD_INPUT_HANDLE
.
This function uses CONIN$
to create a file handle to the current input buffer.
Wraps the underlying function call: [CreateFileW] link: [https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilew]
pub fn output_handle() -> Result<*mut c_void, Error>
[src]
Get the handle of the output screen buffer.
On success this function returns the HANDLE
to STD_OUTPUT_HANDLE
.
Wraps the underlying function call: [GetStdHandle] whit argument STD_OUTPUT_HANDLE
link: [https://docs.microsoft.com/en-us/windows/console/getstdhandle]
pub fn input_handle() -> Result<*mut c_void, Error>
[src]
Get the handle of the input screen buffer.
On success this function returns the HANDLE
to STD_INPUT_HANDLE
.
Wraps the underlying function call: [GetStdHandle] whit argument STD_INPUT_HANDLE
link: [https://docs.microsoft.com/en-us/windows/console/getstdhandle]
pub fn is_valid_handle(handle: &*mut c_void) -> bool
[src]
Checks if the console handle is an invalid handle value.
This is done by checking if the passed HANDLE
is equal to INVALID_HANDLE_VALUE
Methods from Deref<Target = *mut c_void>
Trait Implementations
impl Deref for Handle
[src]
type Target = *mut c_void
The resulting type after dereferencing.
fn deref(&self) -> &<Handle as Deref>::Target
[src]
impl From<*mut c_void> for Handle
[src]
impl From<Handle> for ScreenBuffer
[src]
fn from(handle: Handle) -> ScreenBuffer
[src]
impl From<Handle> for Cursor
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,