XlibApp

Struct XlibApp 

Source
pub struct XlibApp {
Show 16 fields pub display: *mut _XDisplay, pub xim: *mut _XIM, pub clipboard: String, pub display_fd: i32, pub window_map: HashMap<u64, *mut XlibWindow>, pub timers: SelectTimers, pub last_scroll_time: f64, pub last_click_time: f64, pub last_click_pos: (i32, i32), pub event_callback: Option<Box<dyn FnMut(&mut XlibApp, XlibEvent) -> EventFlow>>, pub event_flow: EventFlow, pub current_cursor: MouseCursor, pub internal_cursor: MouseCursor, pub atoms: XlibAtoms, pub dnd: Dnd, pub next_keypress_is_repeat: bool, /* private fields */
}

Fields§

§display: *mut _XDisplay§xim: *mut _XIM§clipboard: String§display_fd: i32§window_map: HashMap<u64, *mut XlibWindow>§timers: SelectTimers§last_scroll_time: f64§last_click_time: f64§last_click_pos: (i32, i32)§event_callback: Option<Box<dyn FnMut(&mut XlibApp, XlibEvent) -> EventFlow>>§event_flow: EventFlow§current_cursor: MouseCursor§internal_cursor: MouseCursor§atoms: XlibAtoms§dnd: Dnd§next_keypress_is_repeat: bool

Implementations§

Source§

impl XlibApp

Source

pub fn new( event_callback: Box<dyn FnMut(&mut XlibApp, XlibEvent) -> EventFlow>, ) -> XlibApp

Source

pub unsafe fn event_loop_poll(&mut self)

Source

pub fn event_loop(&mut self)

Source

pub fn do_callback(&mut self, event: XlibEvent)

Source

pub fn terminate_event_loop(&mut self)

Source

pub fn start_timer(&mut self, id: u64, timeout: f64, repeats: bool)

Source

pub fn stop_timer(&mut self, id: u64)

Source

pub fn time_now(&self) -> f64

Source

pub fn load_first_cursor(&self, names: &[&[u8]]) -> Option<u64>

Source

pub fn set_internal_mouse_cursor(&mut self, cursor: MouseCursor)

Source

pub fn restore_mouse_cursor(&mut self, cursor: MouseCursor)

Source

pub fn set_mouse_cursor(&mut self, cursor: MouseCursor)

Source

pub unsafe fn copy_to_clipboard( &mut self, text: &String, window_id: u64, time: u64, )

Auto Trait Implementations§

§

impl Freeze for XlibApp

§

impl !RefUnwindSafe for XlibApp

§

impl !Send for XlibApp

§

impl !Sync for XlibApp

§

impl Unpin for XlibApp

§

impl !UnwindSafe for XlibApp

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.