Mercurial > hg > xemacs-beta
comparison lisp/viper/viper-mous.el @ 175:2d532a89d707 r20-3b14
Import from CVS: tag r20-3b14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:50:14 +0200 |
parents | 0132846995bd |
children | bfd6434d15b3 |
comparison
equal
deleted
inserted
replaced
174:bb3568571b84 | 175:2d532a89d707 |
---|---|
45 ;; end pacifier | 45 ;; end pacifier |
46 | 46 |
47 (require 'viper-util) | 47 (require 'viper-util) |
48 | 48 |
49 | 49 |
50 (defgroup viper-mouse nil | |
51 "Support for Viper special mouse-bound commands" | |
52 :prefix "vip-" | |
53 :group 'viper) | |
54 | |
50 | 55 |
51 ;;; Variables | 56 ;;; Variables |
52 | 57 |
53 ;; Variable used for catching the switch-frame event. | 58 ;; Variable used for catching the switch-frame event. |
54 ;; If non-nil, indicates that previous-frame should be the selected | 59 ;; If non-nil, indicates that previous-frame should be the selected |
56 (defvar vip-frame-of-focus nil) | 61 (defvar vip-frame-of-focus nil) |
57 | 62 |
58 ;; Frame that was selected before the switch-frame event. | 63 ;; Frame that was selected before the switch-frame event. |
59 (defconst vip-current-frame-saved (selected-frame)) | 64 (defconst vip-current-frame-saved (selected-frame)) |
60 | 65 |
61 (defvar vip-surrounding-word-function 'vip-surrounding-word | 66 (defcustom vip-surrounding-word-function 'vip-surrounding-word |
62 "*Function that determines what constitutes a word for clicking events. | 67 "*Function that determines what constitutes a word for clicking events. |
63 Takes two parameters: a COUNT, indicating how many words to return, | 68 Takes two parameters: a COUNT, indicating how many words to return, |
64 and CLICK-COUNT, telling whether this is the first click, a double-click, | 69 and CLICK-COUNT, telling whether this is the first click, a double-click, |
65 or a tripple-click.") | 70 or a tripple-click." |
71 :type 'boolean | |
72 :group 'viper-mouse) | |
66 | 73 |
67 ;; time interval in millisecond within which successive clicks are | 74 ;; time interval in millisecond within which successive clicks are |
68 ;; considered related | 75 ;; considered related |
69 (defconst vip-multiclick-timeout (if (vip-window-display-p) | 76 (defcustom vip-multiclick-timeout (if (vip-window-display-p) |
70 (if vip-xemacs-p | 77 (if vip-xemacs-p |
71 mouse-track-multi-click-time | 78 mouse-track-multi-click-time |
72 double-click-time) | 79 double-click-time) |
73 500) | 80 500) |
74 "*Time interval in millisecond within which successive clicks are | 81 "*Time interval in millisecond within which successive mouse clicks are |
75 considered related.") | 82 considered related." |
83 :type 'integer | |
84 :group 'viper-mouse) | |
76 | 85 |
77 ;; current event click count; XEmacs only | 86 ;; current event click count; XEmacs only |
78 (defvar vip-current-click-count 0) | 87 (defvar vip-current-click-count 0) |
79 ;; time stamp of the last click event; XEmacs only | 88 ;; time stamp of the last click event; XEmacs only |
80 (defvar vip-last-click-event-timestamp 0) | 89 (defvar vip-last-click-event-timestamp 0) |
430 (defsubst vip-remember-current-frame (frame) | 439 (defsubst vip-remember-current-frame (frame) |
431 (setq last-command 'handle-switch-frame | 440 (setq last-command 'handle-switch-frame |
432 vip-current-frame-saved (selected-frame))) | 441 vip-current-frame-saved (selected-frame))) |
433 | 442 |
434 | 443 |
444 ;;; Local Variables: | |
445 ;;; eval: (put 'vip-deflocalvar 'lisp-indent-hook 'defun) | |
446 ;;; End: | |
447 | |
435 | 448 |
436 ;;; viper-mous.el ends here | 449 ;;; viper-mous.el ends here |