codetether-agent 4.7.0-a-002.4

A2A-native AI coding agent for the CodeTether ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Client-area origin lookup.

use windows::Win32::Foundation::{HWND, POINT};
use windows::Win32::Graphics::Gdi::ClientToScreen;

/// Return the client area's top-left point in physical screen pixels.
pub fn client_origin(hwnd: i64) -> anyhow::Result<(i32, i32)> {
    unsafe {
        let hwnd = HWND(hwnd as *mut _);
        let mut point = POINT { x: 0, y: 0 };
        ClientToScreen(hwnd, &mut point).ok()?;
        Ok((point.x, point.y))
    }
}