
(defvar sup-mouse-fast-select-window nil "\
*Non-nil for mouse hits to select new window, then execute; else just select.")

(defconst mouse-left 0)

(defconst mouse-center 1)

(defconst mouse-right 2)

(defconst mouse-2left 4)

(defconst mouse-2center 5)

(defconst mouse-2right 6)

(defconst mouse-3left 8)

(defconst mouse-3center 9)

(defconst mouse-3right 10)

(defun sup-mouse-report nil "\
This function is called directly by the mouse, it parses and
executes the mouse commands.

 L move point          *  |---- These apply for mouse click in a window.
2L delete word            |
3L copy word		  | If sup-mouse-fast-select-window is nil,
 C move point and yank *  | just selects that window.
2C yank pop		  |
 R set mark            *  |
2R delete region	  |
3R copy region		  |

on modeline		    on \"scroll bar\"	in minibuffer
 L scroll-up		    line to top		execute-extended-command
 C proportional goto-char   line to middle	mouse-help
 R scroll-down		    line to bottom	eval-expression" (interactive) (byte-code "ÕˆÖ×!Ö×!ÖØ!Ù	
\"Ú!Û 
Ü S=?…* =
Ý8S=	Þ8SY		ß8Z‰ˆ
à8Z‰ˆƒ� á!ˆ
Uƒa â ‚† Uƒm ã ‚† U…† äå	deZ\"æ S\"bˆç ˆè ˆá!‚ð	ƒÔ á!ˆâ
Uƒ¢ 
‚Ì Uƒ² 
Þé Z\\‚Ì UƒÇ äêÞ

é [$Þ\"‚Ì Í…Ì ß!ˆá!‚ðƒ�
Uƒç ë	
\"‚~Uƒù ë	
\"ˆìà!‚~Uƒë	
\"ˆŠí`îà!ˆ`\")ˆï‰‚~Uƒ+ð ˆë	
\"ˆñ ‚~UƒBð ˆë	
\"ˆòó `\"‚~Uƒ^ð ˆë	
\"ˆíó `\"ˆï‰‚~Uƒtë	
\"ˆï‰ˆï ‚~U…~ôà!‚ðƒ­Uƒ“õö!‚ª
Uƒ õ÷!‚ªU…ªøù!‚ðÍ…ðá!ˆ?†ð
UƒÉë	
\"‚ðUƒÝð ˆë	
\"ˆñ ‚ðU…ðë	
\"ˆï‰ˆï .
‡" [buttons x y window edges old-window in-minibuf-p same-window-p in-modeline-p in-scrollbar-p mouse-left mouse-right mouse-center t mouse-2left mouse-3left this-command mouse-2right mouse-3right mouse-2center sup-mouse-fast-select-window nil sup-get-tty-num 59 99 sup-pos-to-window window-edges selected-window screen-height 3 2 0 1 select-window scroll-up scroll-down / * window-width beginning-of-line what-cursor-position window-height + sup-move-point-to-x-y kill-word copy-region-as-kill forward-word yank push-mark exchange-point-and-mark kill-region mark yank-pop call-interactively eval-expression execute-extended-command describe-function sup-mouse-report] 54))

(defun sup-get-tty-num (term-char) "\
Read from terminal until TERM-CHAR is read, and return intervening number.
Upon non-numeric not matching TERM-CHAR signal an error." (byte-code "Ãr	ÄY… 	ÅX…\" ÆÇ\"	ÄZ\\‰ˆr‰ˆ‚ ˆ
	=†, ÈÉ!ˆ*‡" [num char term-char 0 48 57 * 10 error "Invalid data format in mouse command"] 5))

(defun sup-move-point-to-x-y (x y) "\
Position cursor in window coordinates.
X and Y are 0-based character positions in the window." (byte-code "Â!ˆÃ	!‡" [y x move-to-window-line move-to-column] 3))

(defun sup-pos-to-window (x y) "\
Find window corresponding to screen coordinates.
X and Y are 0-based character positions on the screen." (byte-code "Å Â	Æ =?…* Ç8W†* È8Y†* É8W†* Ê8Y…< Ë	!‰ˆÅ	!‰ˆ‚ ˆ	†C Æ *‡" [edges window nil y x window-edges selected-window 1 3 0 2 next-window] 7))
