Function: gomoku-click
gomoku-click is an interactive and byte-compiled function defined in
gomoku.el.gz.
Signature
(gomoku-click CLICK)
Documentation
Position at the square where you click.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/gomoku.el.gz
;; For small square dimensions this is approximate, since though measured in
;; pixels, event's (X . Y) is a character's top-left corner.
(defun gomoku-click (click)
"Position at the square where you click."
(interactive "e" gomoku-mode)
(and (windowp (posn-window (setq click (event-end click))))
(numberp (posn-point click))
(select-window (posn-window click))
(setq click (posn-col-row click))
(gomoku-goto-xy
(min (max (/ (+ (- (car click)
gomoku-x-offset
1)
(window-hscroll)
gomoku-square-width
(% gomoku-square-width 2)
(/ gomoku-square-width 2))
gomoku-square-width)
1)
gomoku-board-width)
(min (max (/ (+ (- (cdr click)
gomoku-y-offset
1)
(count-lines (point-min) (window-start))
gomoku-square-height
(% gomoku-square-height 2)
(/ gomoku-square-height 2))
gomoku-square-height)
1)
gomoku-board-height))))