tests/cefclient/browser/osr_accessibility_node_win.cc
// Returns back the screen coordinates of our element or one of its childs
Returns back the screen coordinates of our element or one of its childs
Returns back the screen coordinates of our element or one of its childs
STDMETHODIMP CefIAccessible::accLocation(long* pxLeft,
                                         long* pyTop,
                                         long* pcxWidth,
                                         long* pcyHeight,
                                         VARIANT varChild) {
  HRESULT retCode = DATACHECK(node_);
  if (SUCCEEDED(retCode)) {
    if (pxLeft && pyTop && pcxWidth && pcyHeight && VALID_CHILDID(varChild)) {
      CefRect loc = node_->AxLocation();
      RECT rcItem = {loc.x, loc.y, loc.x + loc.width, loc.y + loc.height};
      HWND hwnd = node_->GetWindowHandle();
      ClientToScreen(hwnd, &rcItem);
      *pxLeft = rcItem.left;
      *pyTop = rcItem.top;
      *pcxWidth = rcItem.right - rcItem.left;
      *pcyHeight = rcItem.bottom - rcItem.top;
    } else {
      retCode = E_INVALIDARG;
    }
  }
  return retCode;
}
STDMETHODIMP CefIAccessible :: accLocation ( long * pxLeft , long * pyTop , long * pcxWidth , long * pcyHeight , VARIANT varChild ) { HRESULT retCode = DATACHECK ( node_ ) ; if ( SUCCEEDED ( retCode ) ) { if ( pxLeft && pyTop && pcxWidth && pcyHeight && VALID_CHILDID ( varChild ) ) { CefRect loc = node_ -> AxLocation ( ) ; RECT rcItem = { loc . x , loc . y , loc . x + loc . width , loc . y + loc . height } ; HWND hwnd = node_ -> GetWindowHandle ( ) ; ClientToScreen ( hwnd , & rcItem ) ; * pxLeft = rcItem . left ; * pyTop = rcItem . top ; * pcxWidth = rcItem . right - rcItem . left ; * pcyHeight = rcItem . bottom - rcItem . top ; } else { retCode = E_INVALIDARG ; } } return retCode ; }
Returns back the screen coordinates of our element or one of its childs
Returns back the screen coordinates of our element or one of its childs