comparison lisp/emacs-lisp/levents.el @ 2066:9b4cb6b6d474

entered into RCS
author Richard M. Stallman <rms@gnu.org>
date Mon, 08 Mar 1993 07:44:39 +0000
parents 265b81ff7eee
children 4f9d60f7de9d
comparison
equal deleted inserted replaced
2065:32afcdd08efe 2066:9b4cb6b6d474
228 (posn-window (event-end event))) 228 (posn-window (event-end event)))
229 229
230 (defun event-x (event) 230 (defun event-x (event)
231 "Returns the X position in characters of the given mouse-related event." 231 "Returns the X position in characters of the given mouse-related event."
232 (/ (car (posn-col-row (event-end event))) 232 (/ (car (posn-col-row (event-end event)))
233 (character-width (window-frame (event-window event))))) 233 (frame-char-width (window-frame (event-window event)))))
234 234
235 (defun event-x-pixel (event) 235 (defun event-x-pixel (event)
236 "Returns the X position in pixels of the given mouse-related event." 236 "Returns the X position in pixels of the given mouse-related event."
237 (car (posn-col-row (event-end event)))) 237 (car (posn-col-row (event-end event))))
238 238
239 (defun event-y (event) 239 (defun event-y (event)
240 "Returns the Y position in characters of the given mouse-related event." 240 "Returns the Y position in characters of the given mouse-related event."
241 (/ (cdr (posn-col-row (event-end event))) 241 (/ (cdr (posn-col-row (event-end event)))
242 (character-width (window-frame (event-window event))))) 242 (frame-char-height (window-frame (event-window event)))))
243 243
244 (defun event-y-pixel (event) 244 (defun event-y-pixel (event)
245 "Returns the Y position in pixels of the given mouse-related event." 245 "Returns the Y position in pixels of the given mouse-related event."
246 (cdr (posn-col-row (event-end event)))) 246 (cdr (posn-col-row (event-end event))))
247 247