summaryrefslogtreecommitdiff
path: root/src/keyboard.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-07-05 04:26:30 +0000
committerJim Blandy <jimb@redhat.com>1993-07-05 04:26:30 +0000
commit764e58d057f13d565b4a6ce79314b885423a7cdc (patch)
tree238bc5779bec537edc2648a0b6f2e0f0a55f8edf /src/keyboard.h
parentd9e733fd4fca9337bde391f0e20799ab43c1932c (diff)
downloademacs-764e58d057f13d565b4a6ce79314b885423a7cdc.tar.gz
* keyboard.h (EVENT_CLICK_COUNT, POSN_SCROLLBAR_PART): New
accessors.
Diffstat (limited to 'src/keyboard.h')
-rw-r--r--src/keyboard.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/keyboard.h b/src/keyboard.h
index fb9f8b64de6..9095f244571 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -62,12 +62,16 @@ extern Lisp_Object internal_last_event_frame;
#define EVENT_START(event) (XCONS (XCONS (event)->cdr)->car)
#define EVENT_END(event) (XCONS (XCONS (XCONS (event)->cdr)->cdr)->car)
+/* Extract the click count from a multi-click event. */
+#define EVENT_CLICK_COUNT(event) (Fnth ((event), make_number (2)))
+
/* Extract the fields of a position. */
#define POSN_WINDOW(posn) (XCONS (posn)->car)
#define POSN_BUFFER_POSN(posn) (XCONS (XCONS (posn)->cdr)->car)
#define POSN_WINDOW_POSN(posn) (XCONS (XCONS (XCONS (posn)->cdr)->cdr)->car)
#define POSN_TIMESTAMP(posn) \
(XCONS (XCONS (XCONS (XCONS (posn)->cdr)->cdr)->cdr)->car)
+#define POSN_SCROLLBAR_PART(posn) (Fnth ((posn), make_number (4)))
/* Some of the event heads. */
extern Lisp_Object Qswitch_frame;