aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-12-28 00:10:41 +0000
committerKim F. Storm2003-12-28 00:10:41 +0000
commit2e3f0f616bd831dbc6a09c9f753085c6caf563f8 (patch)
treeff11557b84e36ef986d55db04ad60f36395e2704 /src
parent60bf162981c3f6fada160812ed248c0f9c6ebc92 (diff)
downloademacs-2e3f0f616bd831dbc6a09c9f753085c6caf563f8.tar.gz
emacs-2e3f0f616bd831dbc6a09c9f753085c6caf563f8.zip
(Qimage): Remove extern (now in lisp.h).
(QCmap): Declare extern. (make_lispy_position): When position is inside image hot-spot, use hot-spot element as posn element.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 6148a2510b8..3ac73750afc 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -587,7 +587,7 @@ Lisp_Object Qvertical_scroll_bar;
587Lisp_Object Qmenu_bar; 587Lisp_Object Qmenu_bar;
588extern Lisp_Object Qleft_margin, Qright_margin; 588extern Lisp_Object Qleft_margin, Qright_margin;
589extern Lisp_Object Qleft_fringe, Qright_fringe; 589extern Lisp_Object Qleft_fringe, Qright_fringe;
590extern Lisp_Object Qimage; 590extern Lisp_Object QCmap;
591 591
592Lisp_Object recursive_edit_unwind (), command_loop (); 592Lisp_Object recursive_edit_unwind (), command_loop ();
593Lisp_Object Fthis_command_keys (); 593Lisp_Object Fthis_command_keys ();
@@ -5024,6 +5024,19 @@ make_lispy_position (f, x, y, time)
5024 string = marginal_area_string (w, &rx, &ry, &dx, &dy, part, &charpos); 5024 string = marginal_area_string (w, &rx, &ry, &dx, &dy, part, &charpos);
5025 if (STRINGP (string)) 5025 if (STRINGP (string))
5026 object = Fcons (string, make_number (charpos)); 5026 object = Fcons (string, make_number (charpos));
5027#ifdef HAVE_WINDOW_SYSTEM
5028 else if (IMAGEP (string))
5029 {
5030 Lisp_Object image_map, hotspot;
5031 object = string;
5032 if ((image_map = Fplist_get (XCDR (object), QCmap),
5033 !NILP (image_map))
5034 && (hotspot = find_hot_spot (image_map, dx, dy),
5035 CONSP (hotspot))
5036 && (hotspot = XCDR (hotspot), CONSP (hotspot)))
5037 posn = XCAR (hotspot);
5038 }
5039#endif
5027 } 5040 }
5028 else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE) 5041 else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE)
5029 { 5042 {
@@ -5059,8 +5072,19 @@ make_lispy_position (f, x, y, time)
5059 if (STRINGP (string)) 5072 if (STRINGP (string))
5060 object = Fcons (string, 5073 object = Fcons (string,
5061 make_number (CHARPOS (p.string_pos))); 5074 make_number (CHARPOS (p.string_pos)));
5062 else if (CONSP (string) && EQ (XCAR (string), Qimage)) 5075#ifdef HAVE_WINDOW_SYSTEM
5063 object = string; 5076 else if (IMAGEP (string))
5077 {
5078 Lisp_Object image_map, hotspot;
5079 object = string;
5080 if ((image_map = Fplist_get (XCDR (object), QCmap),
5081 !NILP (image_map))
5082 && (hotspot = find_hot_spot (image_map, dx, dy),
5083 CONSP (hotspot))
5084 && (hotspot = XCDR (hotspot), CONSP (hotspot)))
5085 posn = XCAR (hotspot);
5086 }
5087#endif
5064 } 5088 }
5065 } 5089 }
5066 5090