Function rustwlc::callback::pointer_motion_v2
[−]
[src]
pub fn pointer_motion_v2(
callback: extern "C" fn(_: WlcView, _: u32, _: f64, _: f64) -> bool
)
Callback invoked on pointer motion.
Return true
to block the motion from the view.
rustwlc::input::pointer::set_position_v2
must be invoked to actually move the cursor!
Example
use rustwlc::WlcView; use rustwlc::Point; use rustwlc::input::pointer; extern fn pointer_motion(view: WlcView, time: u32, x: f64, y: f64) -> bool { println!("Pointer was moved to {} {} in {:?} at {}", x, y, view, time); // This is very important. pointer::set_position_v2(x, y); return false; }