Function: tty-frame-at

tty-frame-at is a function defined in term.c.

Signature

(tty-frame-at X Y)

Documentation

Return tty frame containing absolute pixel position (X, Y).

Value is nil if no frame found. Otherwise it is a list (FRAME CX CY), where FRAME is the frame containing (X, Y) and CX and CY are X and Y relative to FRAME.

Source Code

// Defined in /usr/src/emacs/src/term.c
{
  if (! FIXNUMP (x) || ! FIXNUMP (y))
    /* Coordinates this big can not correspond to any frame.  */
    return Qnil;

  int cx, cy;
  Lisp_Object frame = tty_frame_at (XFIXNUM (x), XFIXNUM (y), &cx, &cy);
  if (NILP (frame))
    return Qnil;

  return list3 (frame, make_fixnum (cx), make_fixnum (cy));
}