Skip to main content

post_mouse

Function post_mouse 

Source
pub unsafe fn post_mouse(
    window: *mut c_void,
    kind: u64,
    x: f64,
    y: f64,
    clicks: i64,
)
Expand description

Post a synthetic mouse event to window, to be delivered by pump_events.

kind is an NSEventType: 1 left-down, 2 left-up, 6 left-dragged, 3 right-down, 4 right-up. x/y are in the window’s coordinate space, with the origin at the bottom left.

§Safety

window must be a live NSWindow.