Mercurial > hg > xemacs-beta
diff man/lispref/commands.texi @ 207:e45d5e7c476e r20-4b2
Import from CVS: tag r20-4b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:03:52 +0200 |
parents | 169c0442b401 |
children | 78f53ef88e17 |
line wrap: on
line diff
--- a/man/lispref/commands.texi Mon Aug 13 10:02:48 2007 +0200 +++ b/man/lispref/commands.texi Mon Aug 13 10:03:52 2007 +0200 @@ -822,6 +822,12 @@ or released, button events specify the modifier keys that were held down at the time and the position of the pointer at the time. +@item dnd-drop event + Some dragged data was released. The event provides the button that was used +to drag the data, the modifier keys that were hold down, the position where +the drop took place, and a lisp object containing the type and the data +dropped (Note: until now only the OffiX protocol supports dnd-drop). + @item motion event The pointer was moved. Along with the position of the pointer, these events also specify the modifier keys that were held down at the time. @@ -897,6 +903,21 @@ The position of the pointer (in pixels) at the time of the event. @end table +@item dnd-drop event +@table @asis +@item channel +@item timestamp +@item button + What button was used to drag. Buttons are numbered starting at 1. +@item modifiers + Which modifier keys were pressed to do the drag. +@item x +@itemx y + The position of the pointer (in pixels) at the time of the event. +@item data + A lisp object containing the dropped type and data. +@end table + @item pointer-motion event @table @asis @item channel @@ -968,6 +989,8 @@ A mouse button was pressed. @item button-release A mouse button was released. +@item dnd-drop +A drop occured. @item motion The mouse moved. @item misc-user @@ -1007,6 +1030,10 @@ This is true if @var{object} is a mouse button-release event. @end defun +@defun dnd-drop-event-p object +This is true if @var{object} is a mouse dnd-drop event. +@end defun + @defun motion-event-p object This is true if @var{object} is a mouse motion event. @end defun @@ -1039,10 +1066,10 @@ @node Accessing Mouse Event Positions @subsection Accessing the Position of a Mouse Event -Unlike other events, mouse events (i.e. motion, button-press, and -button-release events) occur in a particular location on the screen. -Many primitives are provided for determining exactly where the event -occurred and what is under that location. +Unlike other events, mouse events (i.e. motion, button-press, +button-release, and dnd-drop events) occur in a particular location +on the screen. Many primitives are provided for determining exactly +where the event occurred and what is under that location. @menu * Frame-Level Event Position Info:: @@ -1061,8 +1088,8 @@ @defun event-frame event This function returns the ``channel'' or frame that the given mouse -motion, button press, or button release event occurred in. This will be -@code{nil} for non-mouse events. +motion, button press, button release, or dnd drop event occurred in. +This will be @code{nil} for non-mouse events. @end defun @defun event-x-pixel event @@ -1084,14 +1111,14 @@ a mouse event occurred. @defun event-window event -Given a mouse motion, button press, or button release event, compute and +Given a mouse motion, button press, button release, or dnd drop event, compute and return the window on which that event occurred. This may be @code{nil} if the event occurred in the border or over a toolbar. The modeline is considered to be within the window it describes. @end defun @defun event-buffer event -Given a mouse motion, button press, or button release event, compute and +Given a mouse motion, button press, button release, or dnd drop event, compute and return the buffer of the window on which that event occurred. This may be @code{nil} if the event occurred in the border or over a toolbar. The modeline is considered to be within the window it describes. This is @@ -1103,7 +1130,7 @@ This function returns the X position in pixels of the given mouse event. The value returned is relative to the window the event occurred in. This will signal an error if the event is not a mouse-motion, button-press, -or button-release event. +button-release, or dnd-drop event. @end defun @defun event-window-y-pixel event @@ -1120,33 +1147,33 @@ modeline) that a mouse event occurred over or near. @defun event-over-text-area-p event -Given a mouse-motion, button-press, or button-release event, this +Given a mouse-motion, button-press, button-release, or dnd-drop event, this function returns @code{t} if the event is over the text area of a window. Otherwise, @code{nil} is returned. The modeline is not considered to be part of the text area. @end defun @defun event-over-modeline-p event -Given a mouse-motion, button-press, or button-release event, this +Given a mouse-motion, button-press, button-release, or dnd-drop event, this function returns @code{t} if the event is over the modeline of a window. Otherwise, @code{nil} is returned. @end defun @defun event-x event This function returns the X position of the given mouse-motion, -button-press, or button-release event in characters. This is relative +button-press, button-release, or dnd-drop event in characters. This is relative to the window the event occurred over. @end defun @defun event-y event This function returns the Y position of the given mouse-motion, -button-press, or button-release event in characters. This is relative +button-press, button-release, or dnd-drop event in characters. This is relative to the window the event occurred over. @end defun @defun event-point event This function returns the character position of the given mouse-motion, -button-press, or button-release event. If the event did not occur over +button-press, button-release, or dnd-drop event. If the event did not occur over a window, or did not occur over text, then this returns @code{nil}. Otherwise, it returns an index into the buffer visible in the event's window. @@ -1154,7 +1181,7 @@ @defun event-closest-point event This function returns the character position of the given mouse-motion, -button-press, or button-release event. If the event did not occur over +button-press, button-release, or dnd-drop event. If the event did not occur over a window or over text, it returns the closest point to the location of the event. If the Y pixel position overlaps a window and the X pixel position is to the left of that window, the closest point is the @@ -1172,25 +1199,25 @@ a mouse event occurred over. @defun event-over-glyph-p event -Given a mouse-motion, button-press, or button-release event, this +Given a mouse-motion, button-press, button-release, or dnd-drop event, this function returns @code{t} if the event is over a glyph. Otherwise, @code{nil} is returned. @end defun @defun event-glyph-extent event -If the given mouse-motion, button-press, or button-release event happened +If the given mouse-motion, button-press, button-release, or dnd-drop event happened on top of a glyph, this returns its extent; else @code{nil} is returned. @end defun @defun event-glyph-x-pixel event -Given a mouse-motion, button-press, or button-release event over a +Given a mouse-motion, button-press, button-release, or dnd-drop event over a glyph, this function returns the X position of the pointer relative to the upper left of the glyph. If the event is not over a glyph, it returns @code{nil}. @end defun @defun event-glyph-y-pixel event -Given a mouse-motion, button-press, or button-release event over a +Given a mouse-motion, button-press, button-release, or dnd-drop event over a glyph, this function returns the Y position of the pointer relative to the upper left of the glyph. If the event is not over a glyph, it returns @code{nil}. @@ -1200,13 +1227,13 @@ @subsubsection Event Toolbar Position Info @defun event-over-toolbar-p event -Given a mouse-motion, button-press, or button-release event, this +Given a mouse-motion, button-press, button-release, or dnd-drop event, this function returns @code{t} if the event is over a toolbar. Otherwise, @code{nil} is returned. @end defun @defun event-toolbar-button event -If the given mouse-motion, button-press, or button-release event +If the given mouse-motion, button-press, button-release, or dnd-drop event happened on top of a toolbar button, this function returns the button. Otherwise, @code{nil} is returned. @end defun @@ -1215,7 +1242,7 @@ @subsubsection Other Event Position Info @defun event-over-border-p event -Given a mouse-motion, button-press, or button-release event, this +Given a mouse-motion, button-press, button-release, or dnd-drop event, this function returns @code{t} if the event is over an internal toolbar. Otherwise, @code{nil} is returned. @end defun @@ -1268,6 +1295,11 @@ This function returns the process of the given process event. @end defun +@defun event-drag-and-drop-data event +This function returns a list containing the type of the drop as first element +and the data of the drop as second element. +@end defun + @node Working With Events @subsection Working With Events