aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-03-21 13:49:39 +0000
committerKim F. Storm2003-03-21 13:49:39 +0000
commit169f857ada132cc7caa98eecb9c266d55090c5ba (patch)
treea439e01e121fbe7f90480773c5e5423955160d94 /src
parent641bdbf3685a69e511d5dffdd72a46e5f83b4380 (diff)
downloademacs-169f857ada132cc7caa98eecb9c266d55090c5ba.tar.gz
emacs-169f857ada132cc7caa98eecb9c266d55090c5ba.zip
(make_lispy_event): Use enum window_part.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 11e3980324f..5a1fc4fa424 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5084,7 +5084,7 @@ make_lispy_event (event)
5084 /* Build the position as appropriate for this mouse click. */ 5084 /* Build the position as appropriate for this mouse click. */
5085 if (event->kind == MOUSE_CLICK_EVENT) 5085 if (event->kind == MOUSE_CLICK_EVENT)
5086 { 5086 {
5087 int part; 5087 enum window_part part;
5088 struct frame *f = XFRAME (event->frame_or_window); 5088 struct frame *f = XFRAME (event->frame_or_window);
5089 Lisp_Object posn; 5089 Lisp_Object posn;
5090 Lisp_Object string_info = Qnil; 5090 Lisp_Object string_info = Qnil;
@@ -5183,26 +5183,26 @@ make_lispy_event (event)
5183 XSETINT (event->x, wx); 5183 XSETINT (event->x, wx);
5184 XSETINT (event->y, wy); 5184 XSETINT (event->y, wy);
5185 5185
5186 if (part == 1 || part == 3) 5186 if (part == ON_MODE_LINE || part == ON_HEADER_LINE)
5187 { 5187 {
5188 /* Mode line or header line. Look for a string under 5188 /* Mode line or header line. Look for a string under
5189 the mouse that may have a `local-map' property. */ 5189 the mouse that may have a `local-map' property. */
5190 Lisp_Object string; 5190 Lisp_Object string;
5191 int charpos; 5191 int charpos;
5192 5192
5193 posn = part == 1 ? Qmode_line : Qheader_line; 5193 posn = part == ON_MODE_LINE ? Qmode_line : Qheader_line;
5194 string = mode_line_string (w, wx, wy, part == 1, &charpos); 5194 string = mode_line_string (w, wx, wy, part, &charpos);
5195 if (STRINGP (string)) 5195 if (STRINGP (string))
5196 string_info = Fcons (string, make_number (charpos)); 5196 string_info = Fcons (string, make_number (charpos));
5197 } 5197 }
5198 else if (part == 2) 5198 else if (part == ON_VERTICAL_BORDER)
5199 posn = Qvertical_line; 5199 posn = Qvertical_line;
5200 else if (part == 6 || part == 7) 5200 else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
5201 { 5201 {
5202 int charpos; 5202 int charpos;
5203 Lisp_Object object = marginal_area_string (w, wx, wy, part, 5203 Lisp_Object object = marginal_area_string (w, wx, wy, part,
5204 &charpos); 5204 &charpos);
5205 posn = (part == 6) ? Qleft_margin : Qright_margin; 5205 posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin;
5206 if (STRINGP (object)) 5206 if (STRINGP (object))
5207 string_info = Fcons (object, make_number (charpos)); 5207 string_info = Fcons (object, make_number (charpos));
5208 } 5208 }
@@ -5494,7 +5494,7 @@ make_lispy_event (event)
5494#if defined(WINDOWSNT) || defined(MAC_OSX) 5494#if defined(WINDOWSNT) || defined(MAC_OSX)
5495 case MOUSE_WHEEL_EVENT: 5495 case MOUSE_WHEEL_EVENT:
5496 { 5496 {
5497 int part; 5497 enum window_part part;
5498 FRAME_PTR f = XFRAME (event->frame_or_window); 5498 FRAME_PTR f = XFRAME (event->frame_or_window);
5499 Lisp_Object window; 5499 Lisp_Object window;
5500 Lisp_Object posn; 5500 Lisp_Object posn;
@@ -5525,11 +5525,11 @@ make_lispy_event (event)
5525 XSETINT (event->x, pixcolumn); 5525 XSETINT (event->x, pixcolumn);
5526 XSETINT (event->y, pixrow); 5526 XSETINT (event->y, pixrow);
5527 5527
5528 if (part == 1) 5528 if (part == ON_MODE_LINE)
5529 posn = Qmode_line; 5529 posn = Qmode_line;
5530 else if (part == 2) 5530 else if (part == ON_VERTICAL_BORDER)
5531 posn = Qvertical_line; 5531 posn = Qvertical_line;
5532 else if (part == 3) 5532 else if (part == ON_HEADER_LINE)
5533 posn = Qheader_line; 5533 posn = Qheader_line;
5534 else 5534 else
5535 { 5535 {
@@ -5567,7 +5567,7 @@ make_lispy_event (event)
5567 5567
5568 case DRAG_N_DROP_EVENT: 5568 case DRAG_N_DROP_EVENT:
5569 { 5569 {
5570 int part; 5570 enum window_part part;
5571 FRAME_PTR f; 5571 FRAME_PTR f;
5572 Lisp_Object window; 5572 Lisp_Object window;
5573 Lisp_Object posn; 5573 Lisp_Object posn;
@@ -5610,11 +5610,11 @@ make_lispy_event (event)
5610 XSETINT (event->x, wx); 5610 XSETINT (event->x, wx);
5611 XSETINT (event->y, wy); 5611 XSETINT (event->y, wy);
5612 5612
5613 if (part == 1) 5613 if (part == ON_MODE_LINE)
5614 posn = Qmode_line; 5614 posn = Qmode_line;
5615 else if (part == 2) 5615 else if (part == ON_VERTICAL_BORDER)
5616 posn = Qvertical_line; 5616 posn = Qvertical_line;
5617 else if (part == 3) 5617 else if (part == ON_HEADER_LINE)
5618 posn = Qheader_line; 5618 posn = Qheader_line;
5619 else 5619 else
5620 { 5620 {
@@ -5710,7 +5710,7 @@ make_lispy_movement (frame, bar_window, part, x, y, time)
5710 /* Or is it an ordinary mouse movement? */ 5710 /* Or is it an ordinary mouse movement? */
5711 else 5711 else
5712 { 5712 {
5713 int area; 5713 enum window_part area;
5714 Lisp_Object window; 5714 Lisp_Object window;
5715 Lisp_Object posn; 5715 Lisp_Object posn;
5716 5716
@@ -5731,11 +5731,11 @@ make_lispy_movement (frame, bar_window, part, x, y, time)
5731 XSETINT (x, wx); 5731 XSETINT (x, wx);
5732 XSETINT (y, wy); 5732 XSETINT (y, wy);
5733 5733
5734 if (area == 1) 5734 if (area == ON_MODE_LINE)
5735 posn = Qmode_line; 5735 posn = Qmode_line;
5736 else if (area == 2) 5736 else if (area == ON_VERTICAL_BORDER)
5737 posn = Qvertical_line; 5737 posn = Qvertical_line;
5738 else if (area == 3) 5738 else if (area == ON_HEADER_LINE)
5739 posn = Qheader_line; 5739 posn = Qheader_line;
5740 else 5740 else
5741 { 5741 {