Function: hmouse-x-coord

hmouse-x-coord is a byte-compiled function defined in hui-window.el.

Signature

(hmouse-x-coord ARGS)

Documentation

Return x coordinate in characters from window system dependent ARGS or nil.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-window.el
(defun hmouse-x-coord (args)
  "Return x coordinate in characters from window system dependent ARGS or nil."
  (let ((x (if (markerp args)
	       (save-excursion
		 (hypb:goto-marker args)
		 (current-column))
	     (funcall (cdr (assoc (hyperb:window-system)
				  '(("emacs" . (lambda (args)
						 (when (eventp args) (setq args (event-start args)))
						 (cond
						  ((posnp args)
						   (let ((w-or-f (posn-window args)))
						     (when (framep w-or-f)
						       (setq w-or-f (frame-selected-window w-or-f)))
						     (+ (condition-case ()
							    (car (posn-col-row args))
							  (error 0))
							(nth 0 (window-edges w-or-f)))))
						  (t (car args)))))
				    ("next"   .  (lambda (args) (nth 1 args))))))
		      args))))
    (when (integerp x)
      x)))