Anonymous user
Mouse position: Difference between revisions
→{{header|Rust}}: Update to current Rust 0.9-pre syntax
(→{{header|Rust}}: Update to current Rust 0.9-pre syntax) |
|||
Line 586:
}
#[
extern "
pub fn GetCursorPos(lpPoint:&mut POINT) -> BOOL;
pub fn GetForegroundWindow() -> HWND;
Line 593:
}
fn main() {
let mut pt = POINT{x:0, y:0};
Line 604 ⟶ 603:
let h = unsafe { GetForegroundWindow() };
if h == mut_null() { continue }
println!("x: {}, y: {}", pt_client.x, pt_client.y);
}
}
|