;;; compiled by rms@mole.gnu.ai.mit.edu on Sat May 22 16:25:32 1993
;;; from file /home/fsf/rms/e19/lisp/levents.el
;;; emacs version 19.6.12.
;;; bytecomp version FSF 2.08
;;; optimization is on.

(byte-code "ÀÁMˆÂÃMˆÄÅMˆÆÈÉ#ˆÆÊÉ#ˆÆËÉ#ˆÉÌMˆÍÎÏÐ#ˆÍÑÏÒ#ˆÍÓÏÔ#‡" [next-command-event #[(event) "ÀÁ!‡" [error "You must rewrite to use `read-command-event' instead of `next-command-event'"] 2] next-event #[(event) "ÀÁ!‡" [error "You must rewrite to use `read-event' instead of `next-event'"] 2] dispatch-event #[(event) "ÀÁ!‡" [error "`dispatch-event' not supported"] 2] define-key global-map [menu] execute-eval-event [timeout] [eval] #[(event) "A@Á8!‡" [event 2] 3 nil "e"] put eval event-symbol-elements (eval) menu (eval) timeout (eval)] 4)
(defalias 'eventp #[(obj) "À	!†  	9ƒ 	ÂN†  	:…  	@9…  	@ÂN‡" [integerp obj event-symbol-elements] 2 "\
True if the argument is an event object."])
(put (quote eventp) (quote byte-optimizer) (quote byte-compile-inline-expand))
(defun allocate-event nil "\
Returns an empty event structure.
In this emulation, it returns nil." nil)
(defalias 'button-press-event-p #[(obj) ":… @9… Á@ÂN>‡" [obj down event-symbol-elements] 3 "\
True if the argument is a mouse-button-press event object."])
(defalias 'button-release-event-p #[(obj) ":… @9… Á@ÂN>† Ã@ÂN>‡" [obj click event-symbol-elements drag] 3 "\
True if the argument is a mouse-button-release event object."])
(defun character-to-event (ch &optional event) "\
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." ch)
(defun copy-event (event1 &optional event2) "\
Make a copy of the given event object.
In this emulation, `copy-event' just returns its argument." event1)
(defun deallocate-event (event) "\
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'." nil)
(defalias 'enqueue-eval-event: #[(function object) "À	ÂEC\"‰‡" [nconc unread-command-events eval function object] 5 "\
Add an eval event to the back of the queue.
It will be the next event read after all pending events."])
(defalias 'eval-event-p #[(obj) "À	!Â=‡" [car-safe obj eval] 2 "\
True if the argument is an eval or menu event object."])
(defalias 'event-button #[(event) "@ÁN@Ã\nÄ\"A)‡" [event event-symbol-elements sym assq ((mouse-1 . 1) (mouse-2 . 2) (mouse-3 . 3) (mouse-4 . 4) (mouse-5 . 5))] 3 "\
Return the button-number of the given mouse-button-press event."])
(defalias 'event-function #[(event) "A@‡" [event] 1 "\
Return the callback function of the given timeout, menu, or eval event."])
(defalias 'event-key #[(event) "9ƒ\n ÁN@‡ÂÃÄÅ\"S\"ÇÈWƒ$ ÉÊ\"‚& !)‡" [event event-symbol-elements logand lsh 1 18 base downcase 32 logior 64] 5 "\
Returns the KeySym of the given key-press event.
The value is an ASCII printing character (not upper case) or a symbol."])
(defalias 'event-object #[(event) "À	8‡" [2 event] 2 "\
Returns the function argument of the given timeout, menu, or eval event."])
(defalias 'event-point #[(event) "‰GS8)‰A@)‡" [event position] 3 "\
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-process #[(event) "A@‡" [event] 1 "\
Returns the process of the given process-output event."])
(defalias 'event-timestamp #[(event) "<… ‰GS8)Â	8)‡" [event position 3] 3 "\
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-to-character #[(event &optional lenient) "9ƒ 	… ÂÃ\"A‡Ä!… ‡" [event lenient assq ((backspace . 8) (delete . 127) (tab . 9) (return . 10) (enter . 10)) integerp] 3 "\
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-window #[(event) "‰GS8)‰@)‡" [event position] 3 "\
Returns the window of the given mouse-related event object."])
(defalias 'event-x #[(event) "À	‰GS	8)Ã\n8)@ÄÅÆ	!!!\"‡" [/ event position 2 frame-char-width window-frame event-window] 7 "\
Returns the X position in characters of the given mouse-related event."])
(defalias 'event-x-pixel #[(event) "‰GS8)Â	8)@‡" [event position 2] 3 "\
Returns the X position in pixels of the given mouse-related event."])
(defalias 'event-y #[(event) "À	‰GS	8)Ã\n8)AÄÅÆ	!!!\"‡" [/ event position 2 frame-char-height window-frame event-window] 7 "\
Returns the Y position in characters of the given mouse-related event."])
(defalias 'event-y-pixel #[(event) "‰GS8)Â	8)A‡" [event position 2] 3 "\
Returns the Y position in pixels of the given mouse-related event."])
(defalias 'key-press-event-p #[(obj) "À	!† 	9… 	ÂN‡" [integerp obj event-symbol-elements] 2 "\
True if the argument is a keyboard event object."])
(defalias 'menu-event-p #[(obj) "À	!Â=‡" [car-safe obj menu] 2 "\
True if the argument is a menu event object."])
(defalias 'motion-event-p #[(obj) "À	!Â=‡" [car-safe obj mouse-movement] 2 "\
True if the argument is a mouse-motion event object."])
(defalias 'read-command-event #[nil "ÀÂ Ã	!„D Ä	!„D Å	!„D Æ	!„D Ç	!‰É=ƒ3 	A@Ê	8!ˆ‚@ Ë=ƒ@ Ì	A@!ˆ)‚ 	)‡" [nil event read-event key-press-event-p button-press-event-p button-release-event-p menu-event-p car-safe type eval 2 switch-frame select-frame] 4 "\
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 'process-event-p #[(obj) "À	!Â=‡" [car-safe obj process] 2 "\
True if the argument is a process-output event object.
GNU Emacs 19 does not currently generate process-output events."])
(defalias 'timeout-event-p #[(obj) "À	!Â=‡" [car-safe obj timeout] 2 "\
True if the argument is a timeout event object.
GNU Emacs 19 does not currently generate timeout events."])
