Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
eeabfe76
Commit
eeabfe76
authored
Aug 09, 2000
by
Eli Zaretskii
Browse files
(kbd_buffer_events_waiting): New function.
parent
41e757a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
src/keyboard.c
src/keyboard.c
+25
-0
No files found.
src/keyboard.c
View file @
eeabfe76
...
...
@@ -3251,6 +3251,31 @@ discard_mouse_events ()
}
}
}
/* Return non-zero if there are any events waiting in the event buffer
whose .kind is not no_event. If DISCARD is non-zero, discard all
no_event placeholders up to the first real event. If there are no
real events waiting and DISCARD is non-zero, this function makes
the event buffer empty as side effect. */
int
kbd_buffer_events_waiting (discard)
int discard;
{
struct input_event *sp;
for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++)
{
if (sp == kbd_buffer + KBD_BUFFER_SIZE)
sp = kbd_buffer;
if (sp->kind != no_event)
return 1;
if (discard)
kbd_fetch_ptr = sp;
}
if (discard)
kbd_fetch_ptr = sp;
return 0;
}
/* Read one event from the event buffer, waiting if necessary.
The value is a Lisp object representing the event.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment