aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-03-09 14:50:33 +0000
committerGerd Moellmann2001-03-09 14:50:33 +0000
commita1b0a6dbe8fb397dc867ce72f93699d8fd0514fe (patch)
tree0c4a511b22f587341b19effffe52aa9b5af8c34d /src
parente0d9aa62ba6959c1289ecbf15717b88e4fa0ede5 (diff)
downloademacs-a1b0a6dbe8fb397dc867ce72f93699d8fd0514fe.tar.gz
emacs-a1b0a6dbe8fb397dc867ce72f93699d8fd0514fe.zip
(buffer_posn_from_coords): Add parameters OBJECT and
POS; return void.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 755c20be494..977a3f9530b 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5685,14 +5685,17 @@ update_frame_line (f, vpos)
5685 X/Y Position -> Buffer Position 5685 X/Y Position -> Buffer Position
5686 ***********************************************************************/ 5686 ***********************************************************************/
5687 5687
5688/* Return the character position of the character at window relative 5688/* Determine what's under window-relative pixel position (*X, *Y).
5689 pixel position (*X, *Y). *X and *Y are adjusted to character 5689 Return in *OBJECT the object (string or buffer) that's there.
5690 boundaries. */ 5690 Return in *POS the position in that object. Adjust *X and *Y
5691 to character boundaries. */
5691 5692
5692int 5693void
5693buffer_posn_from_coords (w, x, y) 5694buffer_posn_from_coords (w, x, y, object, pos)
5694 struct window *w; 5695 struct window *w;
5695 int *x, *y; 5696 int *x, *y;
5697 Lisp_Object *object;
5698 struct display_pos *pos;
5696{ 5699{
5697 struct it it; 5700 struct it it;
5698 struct buffer *old_current_buffer = current_buffer; 5701 struct buffer *old_current_buffer = current_buffer;
@@ -5712,7 +5715,9 @@ buffer_posn_from_coords (w, x, y)
5712 *x = it.current_x - it.first_visible_x + left_area_width; 5715 *x = it.current_x - it.first_visible_x + left_area_width;
5713 *y = it.current_y; 5716 *y = it.current_y;
5714 current_buffer = old_current_buffer; 5717 current_buffer = old_current_buffer;
5715 return IT_CHARPOS (it); 5718
5719 *object = STRINGP (it.string) ? it.string : w->buffer;
5720 *pos = it.current;
5716} 5721}
5717 5722
5718 5723