Function: pdf-view-add-hotspot-function

pdf-view-add-hotspot-function is a natively compiled function defined in pdf-view.el.

Signature

(pdf-view-add-hotspot-function FN &optional LAYER)

Documentation

Register FN as a hotspot function in the current buffer, using LAYER.

FN will be called in the PDF buffer with the page-number and the image size (WIDTH . HEIGHT) as arguments. It should return a list of hotspots applicable to the the :map image-property.

LAYER determines the order: Functions in a higher LAYER will supersede hotspots in lower ones.

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-view.el
;; * ================================================================== *
;; * Hotspot handling
;; * ================================================================== *

(defun pdf-view-add-hotspot-function (fn &optional layer)
  "Register FN as a hotspot function in the current buffer, using LAYER.

FN will be called in the PDF buffer with the page-number and the
image size \(WIDTH . HEIGHT\) as arguments.  It should return a
list of hotspots applicable to the the :map image-property.

LAYER determines the order: Functions in a higher LAYER will
supersede hotspots in lower ones."
  (push (cons (or layer 0) fn)
        pdf-view--hotspot-functions))