481 |
DEFUN ("window-edges", Fwindow_edges, Swindow_edges, 0, 1, 0, |
DEFUN ("window-edges", Fwindow_edges, Swindow_edges, 0, 1, 0, |
482 |
doc: /* Return a list of the edge coordinates of WINDOW. |
doc: /* Return a list of the edge coordinates of WINDOW. |
483 |
\(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. |
\(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. |
484 |
RIGHT is one more than the rightmost column used by WINDOW, |
RIGHT is one more than the rightmost column occupied by WINDOW, |
485 |
and BOTTOM is one more than the bottommost row used by WINDOW |
and BOTTOM is one more than the bottommost row occupied by WINDOW. |
486 |
and its mode-line. */) |
The edges include the space used by the window's scroll bar, |
487 |
|
display margins, fringes, header line, and mode line, if it has them. |
488 |
|
To get the edges of the actual text area, use `window-inside-edges'. */) |
489 |
(window) |
(window) |
490 |
Lisp_Object window; |
Lisp_Object window; |
491 |
{ |
{ |
498 |
Qnil)))); |
Qnil)))); |
499 |
} |
} |
500 |
|
|
501 |
|
DEFUN ("window-pixel-edges", Fwindow_pixel_edges, Swindow_pixel_edges, 0, 1, 0, |
502 |
|
doc: /* Return a list of the edge pixel coordinates of WINDOW. |
503 |
|
\(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. |
504 |
|
RIGHT is one more than the rightmost x position occupied by WINDOW, |
505 |
|
and BOTTOM is one more than the bottommost y position occupied by WINDOW. |
506 |
|
The pixel edges include the space used by the window's scroll bar, |
507 |
|
display margins, fringes, header line, and mode line, if it has them. |
508 |
|
To get the edges of the actual text area, use `window-inside-pixel-edges'. */) |
509 |
|
(window) |
510 |
|
Lisp_Object window; |
511 |
|
{ |
512 |
|
register struct window *w = decode_window (window); |
513 |
|
|
514 |
|
return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)), |
515 |
|
Fcons (make_number (WINDOW_TOP_EDGE_Y (w)), |
516 |
|
Fcons (make_number (WINDOW_RIGHT_EDGE_X (w)), |
517 |
|
Fcons (make_number (WINDOW_BOTTOM_EDGE_Y (w)), |
518 |
|
Qnil)))); |
519 |
|
} |
520 |
|
|
521 |
|
DEFUN ("window-inside-edges", Fwindow_inside_edges, Swindow_inside_edges, 0, 1, 0, |
522 |
|
doc: /* Return a list of the edge coordinates of WINDOW. |
523 |
|
\(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. |
524 |
|
RIGHT is one more than the rightmost column used by text in WINDOW, |
525 |
|
and BOTTOM is one more than the bottommost row used by text in WINDOW. |
526 |
|
The inside edges do not include the space used by the window's scroll bar, |
527 |
|
display margins, fringes, header line, and/or mode line. */) |
528 |
|
(window) |
529 |
|
Lisp_Object window; |
530 |
|
{ |
531 |
|
register struct window *w = decode_window (window); |
532 |
|
|
533 |
|
return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) |
534 |
|
+ WINDOW_LEFT_MARGIN_COLS (w) |
535 |
|
+ WINDOW_LEFT_FRINGE_COLS (w)), |
536 |
|
make_number (WINDOW_TOP_EDGE_LINE (w) |
537 |
|
+ WINDOW_HEADER_LINE_LINES (w)), |
538 |
|
make_number (WINDOW_RIGHT_EDGE_COL (w) |
539 |
|
- WINDOW_RIGHT_MARGIN_COLS (w) |
540 |
|
- WINDOW_RIGHT_FRINGE_COLS (w)), |
541 |
|
make_number (WINDOW_BOTTOM_EDGE_LINE (w) |
542 |
|
- WINDOW_MODE_LINE_LINES (w))); |
543 |
|
} |
544 |
|
|
545 |
|
DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, |
546 |
|
doc: /* Return a list of the edge coordinates of WINDOW. |
547 |
|
\(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. |
548 |
|
RIGHT is one more than the rightmost x position used by text in WINDOW, |
549 |
|
and BOTTOM is one more than the bottommost y position used by text in WINDOW. |
550 |
|
The inside edges do not include the space used by the window's scroll bar, |
551 |
|
display margins, fringes, header line, and/or mode line. */) |
552 |
|
(window) |
553 |
|
Lisp_Object window; |
554 |
|
{ |
555 |
|
register struct window *w = decode_window (window); |
556 |
|
|
557 |
|
return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) |
558 |
|
+ WINDOW_LEFT_MARGIN_WIDTH (w) |
559 |
|
+ WINDOW_LEFT_FRINGE_WIDTH (w)), |
560 |
|
make_number (WINDOW_TOP_EDGE_Y (w) |
561 |
|
+ WINDOW_HEADER_LINE_HEIGHT (w)), |
562 |
|
make_number (WINDOW_RIGHT_EDGE_X (w) |
563 |
|
- WINDOW_RIGHT_MARGIN_WIDTH (w) |
564 |
|
- WINDOW_RIGHT_FRINGE_WIDTH (w)), |
565 |
|
make_number (WINDOW_BOTTOM_EDGE_Y (w) |
566 |
|
- WINDOW_MODE_LINE_HEIGHT (w))); |
567 |
|
} |
568 |
|
|
569 |
/* Test if the character at column *X, row *Y is within window W. |
/* Test if the character at column *X, row *Y is within window W. |
570 |
If it is not, return ON_NOTHING; |
If it is not, return ON_NOTHING; |
571 |
if it is in the window's text area, |
if it is in the window's text area, |
6417 |
defsubr (&Swindow_redisplay_end_trigger); |
defsubr (&Swindow_redisplay_end_trigger); |
6418 |
defsubr (&Sset_window_redisplay_end_trigger); |
defsubr (&Sset_window_redisplay_end_trigger); |
6419 |
defsubr (&Swindow_edges); |
defsubr (&Swindow_edges); |
6420 |
|
defsubr (&Swindow_pixel_edges); |
6421 |
|
defsubr (&Swindow_inside_edges); |
6422 |
|
defsubr (&Swindow_inside_pixel_edges); |
6423 |
defsubr (&Scoordinates_in_window_p); |
defsubr (&Scoordinates_in_window_p); |
6424 |
defsubr (&Swindow_at); |
defsubr (&Swindow_at); |
6425 |
defsubr (&Swindow_point); |
defsubr (&Swindow_point); |