view man/lispref/mouse.texi @ 5327:d1b17a33450b

Move the heavy lifting from cl-seq.el to C. src/ChangeLog addition: 2010-12-30 Aidan Kehoe <kehoea@parhasard.net> Move the heavy lifting from cl-seq.el to C, finally making those functions first-class XEmacs citizens, with circularity checking, built-in support for tests other than #'eql, and as much compatibility with current Common Lisp as Paul Dietz' tests require. * fns.c (check_eq_nokey, check_eq_key, check_eql_nokey) (check_eql_key, check_equal_nokey, check_equal_key) (check_equalp_nokey, check_equalp_key, check_string_match_nokey) (check_string_match_key, check_other_nokey, check_other_key) (check_if_nokey, check_if_key, check_match_eq_key) (check_match_eql_key, check_match_equal_key) (check_match_equalp_key, check_match_other_key): New. These are basically to provide function pointers to be used by Lisp functions that take TEST, TEST-NOT and KEY arguments. (get_check_match_function_1, get_check_test_function) (get_check_match_function): These functions work out which of the previous list of functions to use, given the keywords supplied by the user. (count_with_tail): New. This is the bones of #'count. (list_count_from_end, string_count_from_end): Utility functions for #'count. (Fcount): New, moved from cl-seq.el. (list_position_cons_before): New. The implementation of #'member*, and important in implementing various other functions. (FmemberX, Fadjoin, FassocX, FrassocX, Fposition, Ffind) (FdeleteX, FremoveX, Fdelete_duplicates, Fremove_duplicates) (Fnsubstitute, Fsubstitute, Fsublis, Fnsublis, Fsubst, Fnsubst) (Ftree_equal, Fmismatch, Fsearch, Fintersection, Fnintersection) (Fsubsetp, Fset_difference, Fnset_difference, Fnunion, Funion) (Fset_exclusive_or, Fnset_exclusive_or): New, moved here from cl-seq.el. (position): New. The implementation of #'find and #'position. (list_delete_duplicates_from_end, subst, sublis, nsublis) (tree_equal, mismatch_from_end, mismatch_list_list) (mismatch_list_string, mismatch_list_array) (mismatch_string_array, mismatch_string_string) (mismatch_array_array, get_mismatch_func): Helper C functions for the Lisp-visible functions. (venn, nvenn): New. The implementation of the main Lisp functions that treat lists as sets. lisp/ChangeLog addition: 2010-12-30 Aidan Kehoe <kehoea@parhasard.net> * cl-seq.el: Move the heavy lifting from this file to C. Dump the cl-parsing-keywords macro, but don't use defun* for the functions we define that do take keywords, dynamic scope lossage makes that not practical. * subr.el (sort, fillarray): Move these aliases here. (map-plist): #'nsublis is now built-in, but at this point #'eql isn't necessarily available as a test; use #'eq. * obsolete.el (cl-delete-duplicates): Make this available for old compiler macros and old code. (memql): Document that this is equivalent to #'member*, and worse. * cl.el (adjoin, subst): Removed. These are in C.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 30 Dec 2010 01:59:52 +0000
parents 576fb035e263
children
line wrap: on
line source

@c -*-texinfo-*-
@c This is part of the XEmacs Lisp Reference Manual.
@c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
@c See the file lispref.texi for copying conditions.
@setfilename ../../info/mouse.info
@node Mouse
@chapter The Mouse
@cindex mouse

* Mouse Position::		Asking where the mouse is, or moving it.

@ignore  @c Not in XEmacs.
@node Mouse Tracking
@section Mouse Tracking
@cindex mouse tracking
@cindex tracking the mouse

(deleted)
@end ignore

@ignore
@c These are not implemented yet.

These functions change the screen appearance instantaneously.  The
effect is transient, only until the next ordinary XEmacs redisplay.  That
is ok for mouse tracking, since it doesn't make sense for mouse tracking
to change the text, and the body of @code{track-mouse} normally reads
the events itself and does not do redisplay.

@defun x-contour-region window start end
This function draws lines to make a box around the text from @var{start}
to @var{end}, in window @var{window}.
@end defun

@defun x-uncontour-region window start end
This function erases the lines that would make a box around the text
from @var{start} to @var{end}, in window @var{window}.  Use it to remove
a contour that you previously made by calling @code{x-contour-region}.
@end defun

@defun x-draw-rectangle frame left top right bottom
This function draws a hollow rectangle on frame @var{frame} with the
specified edge coordinates, all measured in pixels from the inside top
left corner.  It uses the cursor color, the one used for indicating the
location of point.
@end defun

@defun x-erase-rectangle frame left top right bottom
This function erases a hollow rectangle on frame @var{frame} with the
specified edge coordinates, all measured in pixels from the inside top
left corner.  Erasure means redrawing the text and background that
normally belong in the specified rectangle.
@end defun
@end ignore

@node Mouse Position
@section Mouse Position
@cindex mouse position
@cindex position of mouse

The functions @code{mouse-position}, @code{mouse-pixel-position},
@code{set-mouse-position} and @code{set-mouse-pixel-position} give
access to the current position of the mouse.

@defun mouse-position &optional device
This function returns a list (@var{window} @var{x} . @var{y}) giving the
current mouse window and position.  The position is given in character
cells, where @samp{(0, 0)} is the upper-left corner.

@var{device} specifies the device on which to read the mouse position,
and defaults to the selected device.  If the device is a mouseless
terminal or XEmacs hasn't been programmed to read its mouse position, it
returns the device's selected window for @var{window} and @code{nil} for
@var{x} and @var{y}.
@end defun

@defun mouse-pixel-position &optional device
This function returns a list (@var{window} @var{x} . @var{y}) giving the
current mouse window and position.  The position is given in pixel
units, where @samp{(0, 0)} is the upper-left corner.

@var{device} specifies the device on which to read the mouse position,
and defaults to the selected device.  If the device is a mouseless
terminal or XEmacs hasn't been programmed to read its mouse position, it
returns the device's selected window for @var{window} and @code{nil} for
@var{x} and @var{y}.
@end defun

@defun set-mouse-position window x y
This function @dfn{warps the mouse} to the center of character position
@var{x}, @var{y} in frame @var{window}.  The arguments @var{x} and
@var{y} are integers, giving the position in characters relative to
the top left corner of @var{window}.

@cindex warping the mouse
@cindex mouse warping
Warping the mouse means changing the screen position of the mouse as if
the user had moved the physical mouse---thus simulating the effect of
actual mouse motion.
@end defun

@defun set-mouse-pixel-position window x y
This function @dfn{warps the mouse} to pixel position @var{x}, @var{y}
in frame @var{window}.  The arguments @var{x} and @var{y} are integers,
giving the position in pixels relative to the top left corner of
@var{window}.
@end defun