summaryrefslogtreecommitdiff
path: root/src/keyboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.h')
-rw-r--r--src/keyboard.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/keyboard.h b/src/keyboard.h
index bcdeaf62165..52780516340 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -21,6 +21,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */
#include "termhooks.h"
+#ifdef HAVE_X11
+# include "xterm.h" /* for struct selection_input_event */
+#endif
+
INLINE_HEADER_BEGIN
/* Most code should use this macro to access Lisp fields in struct kboard. */
@@ -217,6 +221,15 @@ kset_window_system (struct kboard *kb, Lisp_Object val)
kb->Vwindow_system_ = val;
}
+union buffered_input_event
+{
+ ENUM_BF (event_kind) kind : EVENT_KIND_WIDTH;
+ struct input_event ie;
+#ifdef HAVE_X11
+ struct selection_input_event sie;
+#endif
+};
+
/* Temporarily used before a frame has been opened. */
extern KBOARD *initial_kboard;
@@ -438,9 +451,20 @@ extern void clear_waiting_for_input (void);
extern void swallow_events (bool);
extern bool lucid_event_type_list_p (Lisp_Object);
extern void kbd_buffer_store_event (struct input_event *);
-extern void kbd_buffer_store_event_hold (struct input_event *,
- struct input_event *);
-extern void kbd_buffer_unget_event (struct input_event *);
+extern void kbd_buffer_store_buffered_event (union buffered_input_event *,
+ struct input_event *);
+INLINE void
+kbd_buffer_store_event_hold (struct input_event *event,
+ struct input_event *hold_quit)
+{
+ union buffered_input_event *ev = (union buffered_input_event *) event;
+ verify (sizeof *event == sizeof *ev && alignof (*event) == alignof (*ev));
+ return kbd_buffer_store_buffered_event ((union buffered_input_event *) event,
+ hold_quit);
+}
+#ifdef HAVE_X11
+extern void kbd_buffer_unget_event (struct selection_input_event *);
+#endif
extern void poll_for_input_1 (void);
extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object,
Lisp_Object);