;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:39:16 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/emacs-lisp/levents.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`levents.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(defalias 'next-command-event #[(event) "\300\301!\207" [error "You must rewrite to use `read-command-event' instead of `next-command-event'"] 2])
(defalias 'next-event #[(event) "\300\301!\207" [error "You must rewrite to use `read-event' instead of `next-event'"] 2])
(defalias 'dispatch-event #[(event) "\300\301!\207" [error "`dispatch-event' not supported"] 2])
(byte-code "\301\302\303#\210\301\304\303#\210\301\305\303#\207" [global-map define-key [menu] execute-eval-event [timeout] [eval]] 4)
(defalias 'execute-eval-event #[(event) "A@\3018!\207" [event 2] 3 nil "e"])
(byte-code "\300\301\302\303#\210\300\304\302\305#\210\300\306\302\307#\207" [put eval event-symbol-elements (eval) menu (eval) timeout (eval)] 4)
#@70 Returns an empty event structure.
In this emulation, it returns nil.
(defalias 'allocate-event #[nil "\300\207" [nil] 1 (#$ . 1358)])
#@60 True if the argument is a mouse-button-press event object.
(defalias 'button-press-event-p #[(obj) ":\205 @9\205 \301@\302N>\207" [obj down event-symbol-elements] 3 (#$ . 1498)])
#@62 True if the argument is a mouse-button-release event object.
(defalias 'button-release-event-p #[(obj) ":\205 @9\205 \301@\302N>\206 \303@\302N>\207" [obj click event-symbol-elements drag] 3 (#$ . 1688)])
#@71 True if the argument is a mouse-button press or release event object.
(defalias 'button-event-p #[(obj) ":\205# @9\205# \301@\302N>\206# \303@\302N>\206# \304@\302N>\207" [obj click event-symbol-elements down drag] 3 (#$ . 1906)])
#@71 True if the argument is a mouse-button press or release event object.
(defalias 'mouse-event-p #[(obj) ":\205* @9\205* @\301=\206* \302@\303N>\206* \304@\303N>\206* \305@\303N>\207" [obj mouse-movement click event-symbol-elements down drag] 3 (#$ . 2148)])
#@497 Converts a numeric ASCII value to an event structure, replete with
bucky bits.  The character is the first argument, and the event to fill
in is the second.  This function contains knowledge about what the codes
mean -- for example, the number 9 is converted to the character Tab,
not the distinct character Control-I.

Beware that character-to-event and event-to-character are not strictly 
inverse functions, since events contain much more information than the 
ASCII character set can encode.
(defalias 'character-to-event #[(ch &optional event) "\207" [ch] 1 (#$ . 2418)])
#@99 Make a copy of the given event object.
In this emulation, `copy-event' just returns its argument.
(defalias 'copy-event #[(event1 &optional event2) "\207" [event1] 1 (#$ . 3002)])
#@472 Allow the given event structure to be reused.
In actual Lucid Emacs, you MUST NOT use this event object after
calling this function with it.  You will lose.  It is not necessary to
call this function, as event objects are garbage- collected like all
other objects; however, it may be more efficient to explicitly
deallocate events when you are sure that that is safe.

This emulation does not actually deallocate or reuse events
except via garbage collection and `cons'.
(defalias 'deallocate-event #[(event) "\300\207" [nil] 1 (#$ . 3190)])
#@102 Add an eval event to the back of the queue.
It will be the next event read after all pending events.
(defalias 'enqueue-eval-event: #[#'object "\303	\nEC\244\211\207" [unread-command-events function object eval] 4 (#$ . 3739)])
#@55 True if the argument is an eval or menu event object.
(defalias 'eval-event-p #[(obj) "\242\301=\207" [obj eval] 2 (#$ . 3975)])
#@65 Return the button-number of the given mouse-button-press event.
(defalias 'event-button #[(event) "@\302N@\211\303\236A)\207" [event sym event-symbol-elements ((mouse-1 . 1) (mouse-2 . 2) (mouse-3 . 3) (mouse-4 . 4) (mouse-5 . 5))] 3 (#$ . 4111)])
#@73 Return the callback function of the given timeout, menu, or eval event.
(defalias 'event-function #[(event) "A@\207" [event] 1 (#$ . 4367)])
#@121 Returns the KeySym of the given key-press event.
The value is an ASCII printing character (not upper case) or a symbol.
(defalias 'event-key #[(event) "9\203\n \302N@\207\303\304\305\306\"S\"\211\307W\203  \310	\311\"\202! 	\227)\207" [event base event-symbol-elements logand lsh 1 18 32 logior 64] 6 (#$ . 4516)])
#@74 Returns the function argument of the given timeout, menu, or eval event.
(defalias 'event-object #[(event) "\3018\207" [event 2] 2 (#$ . 4841)])
#@238 Returns the character position of the given mouse-related event.
If the event did not occur over a window, or did
not occur over text, then this returns nil.  Otherwise, it returns an index
into the buffer visible in the event's window.
(defalias 'event-point #[(event) "\3028:\203 \302\202 \3038)\303	8:\203  \303	8@\202# \303	8)\207" [event position 2 1] 2 (#$ . 4994)])
(defalias 'event-closest-point-1 #[(window &optional line) "\304!\305!\203 \306\202 \307Z\n\206 	\212\310!b\210\311!U\203+ \n\204+ \312u\210`+\207" [window total line distance window-height window-minibuffer-p 0 1 window-start vertical-motion -1] 3])
#@167 Return the nearest position to where EVENT ended its motion.
This is computed for the window where EVENT's motion started,
or for window WINDOW if that is specified.
(defalias 'event-closest-point #[(event &optional start-window) "\204 	\306	8)\307\n8)	\310	8:\203 \310\202 \306	8)\307\n8)=\203[ \311	!\312=\203K \313\314	\310	8:\203C \310\202D \306	8)!A\"\207\311	!\315=\203W \313!\207\311	!\207	\310	8:\203h \310\202i \306	8)\307\n8)\316\317!A@\320!\203\210 \317!A@\202\243 	\310	8:\203\225 \310\202\226 \306	8)\310\n8)A\321!\245\211Y\203\260 \313!\202\263 \322!+\207" [start-window event position end-w end-w-top w-top 1 0 2 event-point vertical-line event-closest-point-1 posn-col-row mode-line nil window-edges windowp frame-char-height window-start] 6 (#$ . 5642)])
#@56 Returns the process of the given process-output event.
(defalias 'event-process #[(event) "A@\207" [event] 1 (#$ . 6448)])
#@164 Returns the timestamp of the given event object.
In Lucid Emacs, this works for any kind of event.
In this emulation, it returns nil for non-mouse-related events.
(defalias 'event-timestamp #[(event) "<\205 \3028:\203 \302\202 \3038)\304	8)\207" [event position 2 1 3] 2 (#$ . 6579)])
#@535 Returns the closest ASCII approximation to the given event object.
If the event isn't a keypress, this returns nil.
If the second argument is non-nil, then this is lenient in its 
translation; it will ignore modifier keys other than control and meta,
and will ignore the shift modifier on those characters which have no 
shifted ASCII equivalent (Control-Shift-A for example, will be mapped to 
the same ASCII code as Control-A.)  If the second arg is nil, then nil 
will be returned for events which have no direct ASCII equivalent.
(defalias 'event-to-character #[(event &optional lenient) "9\203 	\205 \302\236A\207\250\205 \207" [event lenient ((backspace . 8) (delete . 127) (tab . 9) (return . 10) (enter . 10))] 2 (#$ . 6880)])
#@61 Returns the window of the given mouse-related event object.
(defalias 'event-window #[(event) "\3028:\203 \302\202 \3038)\304	8)\207" [event position 2 1 0] 2 (#$ . 7628)])
#@72 Returns the X position in characters of the given mouse-related event.
(defalias 'event-x #[(event) "\301\3028:\203 \302\202 \3038)!@\304\305\306!!!\245\207" [event posn-col-row 2 1 frame-char-width window-frame event-window] 5 (#$ . 7814)])
#@68 Returns the X position in pixels of the given mouse-related event.
(defalias 'event-x-pixel #[(event) "\301\3028:\203 \302\202 \3038)!@\207" [event posn-col-row 2 1] 3 (#$ . 8069)])
#@72 Returns the Y position in characters of the given mouse-related event.
(defalias 'event-y #[(event) "\301\3028:\203 \302\202 \3038)!A\304\305\306!!!\245\207" [event posn-col-row 2 1 frame-char-height window-frame event-window] 5 (#$ . 8263)])
#@68 Returns the Y position in pixels of the given mouse-related event.
(defalias 'event-y-pixel #[(event) "\301\3028:\203 \302\202 \3038)!A\207" [event posn-col-row 2 1] 3 (#$ . 8519)])
#@50 True if the argument is a keyboard event object.
(defalias 'key-press-event-p #[(obj) "\250\206 9\205 \301N\207" [obj event-symbol-elements] 2 (#$ . 8713)])
#@46 True if the argument is a menu event object.
(defalias 'menu-event-p #[(obj) "\242\301=\207" [obj menu] 2 (#$ . 8881)])
#@54 True if the argument is a mouse-motion event object.
(defalias 'motion-event-p #[(obj) "\242\301=\207" [obj mouse-movement] 2 (#$ . 9008)])
#@225 Return the next keyboard or mouse event; execute other events.
This is similar to the function `next-command-event' of Lucid Emacs,
but different in that it returns the event rather than filling in
an existing event object.
(defalias 'read-command-event #[nil "\302\303 \304!\204A \305!\204A \306!\204A \307!\204A \242\211\310=\2031 A@\3118!\210\202= 	\312=\203= \313A@!\210)\202 )\207" [event type nil read-event key-press-event-p button-press-event-p button-release-event-p menu-event-p eval 2 switch-frame select-frame] 4 (#$ . 9156)])
#@120 True if the argument is a process-output event object.
GNU Emacs 19 does not currently generate process-output events.
(defalias 'process-event-p #[(obj) "\242\301=\207" [obj process] 2 (#$ . 9715)])
(provide 'levents)
