Function: frame-edges
frame-edges is a byte-compiled function defined in frame.el.gz.
Signature
(frame-edges &optional FRAME TYPE)
Documentation
Return coordinates of FRAME's edges.
FRAME must be a live frame and defaults to the selected one. The
list returned has the form (LEFT TOP RIGHT BOTTOM) where all
values are in pixels relative to the origin - the position (0, 0)
- of FRAME's display. For terminal frames all values are
relative to LEFT and TOP which are both zero.
Optional argument TYPE specifies the type of the edges. TYPE
outer-edges means to return the outer edges of FRAME. TYPE
native-edges (or nil) means to return the native edges of
FRAME. TYPE inner-edges means to return the inner edges of
FRAME.
Probably introduced at or before Emacs version 25.1.
Source Code
;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun frame-edges (&optional frame type)
"Return coordinates of FRAME's edges.
FRAME must be a live frame and defaults to the selected one. The
list returned has the form (LEFT TOP RIGHT BOTTOM) where all
values are in pixels relative to the origin - the position (0, 0)
- of FRAME's display. For terminal frames all values are
relative to LEFT and TOP which are both zero.
Optional argument TYPE specifies the type of the edges. TYPE
`outer-edges' means to return the outer edges of FRAME. TYPE
`native-edges' (or nil) means to return the native edges of
FRAME. TYPE `inner-edges' means to return the inner edges of
FRAME."
(let* ((frame (window-normalize-frame frame))
(frame-type (framep-on-display frame)))
(cond
((eq frame-type 'x)
(x-frame-edges frame type))
((eq frame-type 'w32)
(w32-frame-edges frame type))
((eq frame-type 'ns)
(ns-frame-edges frame type))
((eq frame-type 'pgtk)
(pgtk-frame-edges frame type))
((eq frame-type 'haiku)
(haiku-frame-edges frame type))
((eq frame-type 'android)
(android-frame-edges frame type))
(t
(tty-frame-edges frame type)))))