Mercurial > emacs
comparison src/keyboard.c @ 53330:2dfa97148836
(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.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sun, 28 Dec 2003 00:10:41 +0000 |
parents | ee96f9f80b61 |
children | 09ea561dfa8c 12bc18575b80 |
comparison
equal
deleted
inserted
replaced
53329:9c540a878edf | 53330:2dfa97148836 |
---|---|
585 Lisp_Object Qvertical_line; | 585 Lisp_Object Qvertical_line; |
586 Lisp_Object Qvertical_scroll_bar; | 586 Lisp_Object Qvertical_scroll_bar; |
587 Lisp_Object Qmenu_bar; | 587 Lisp_Object Qmenu_bar; |
588 extern Lisp_Object Qleft_margin, Qright_margin; | 588 extern Lisp_Object Qleft_margin, Qright_margin; |
589 extern Lisp_Object Qleft_fringe, Qright_fringe; | 589 extern Lisp_Object Qleft_fringe, Qright_fringe; |
590 extern Lisp_Object Qimage; | 590 extern Lisp_Object QCmap; |
591 | 591 |
592 Lisp_Object recursive_edit_unwind (), command_loop (); | 592 Lisp_Object recursive_edit_unwind (), command_loop (); |
593 Lisp_Object Fthis_command_keys (); | 593 Lisp_Object Fthis_command_keys (); |
594 Lisp_Object Qextended_command_history; | 594 Lisp_Object Qextended_command_history; |
595 EMACS_TIME timer_check (); | 595 EMACS_TIME timer_check (); |
5022 posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; | 5022 posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; |
5023 rx = wx, ry = wy; | 5023 rx = wx, ry = wy; |
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 { |
5030 posn = (part == ON_LEFT_FRINGE) ? Qleft_fringe : Qright_fringe; | 5043 posn = (part == ON_LEFT_FRINGE) ? Qleft_fringe : Qright_fringe; |
5031 rx = 0; | 5044 rx = 0; |
5057 { | 5070 { |
5058 posn = make_number (textpos); | 5071 posn = make_number (textpos); |
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 |
5067 extra_info = Fcons (object, | 5091 extra_info = Fcons (object, |
5068 Fcons (make_number (textpos), | 5092 Fcons (make_number (textpos), |