Function: semantic-displayer-point-position

semantic-displayer-point-position is a byte-compiled function defined in complete.el.gz.

Signature

(semantic-displayer-point-position)

Documentation

Return the location of POINT as positioned on the selected frame.

Return a cons cell (X . Y).

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/complete.el.gz
;;; Compatibility
;;

(defun semantic-displayer-point-position ()
  "Return the location of POINT as positioned on the selected frame.
Return a cons cell (X . Y)."
  (let* ((frame (selected-frame))
	 (toolbarleft
	  (if (eq (cdr (assoc 'tool-bar-position default-frame-alist)) 'left)
	      (tool-bar-pixel-width)
	    0))
	 (left (+ (or (car-safe (cdr-safe (frame-parameter frame 'left)))
		      (frame-parameter frame 'left))
		  toolbarleft))
	 (top (or (car-safe (cdr-safe (frame-parameter frame 'top)))
		  (frame-parameter frame 'top)))
	 (point-pix-pos (posn-x-y (posn-at-point)))
	 (edges (window-inside-pixel-edges (selected-window))))
    (cons (+ (car point-pix-pos) (car edges) left)
          (+ (cdr point-pix-pos) (cadr edges) top))))