Mercurial > hg > xemacs-beta
comparison src/event-stream.c @ 209:41ff10fd062f r20-4b3
Import from CVS: tag r20-4b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:04:58 +0200 |
parents | acd284d43ca1 |
children | 78478c60bfcd |
comparison
equal
deleted
inserted
replaced
208:f427b8ec4379 | 209:41ff10fd062f |
---|---|
2262 echo area while this function is waiting for an event. | 2262 echo area while this function is waiting for an event. |
2263 | 2263 |
2264 The event returned will be a keyboard, mouse press, or mouse release event. | 2264 The event returned will be a keyboard, mouse press, or mouse release event. |
2265 If there are non-command events available (mouse motion, sub-process output, | 2265 If there are non-command events available (mouse motion, sub-process output, |
2266 etc) then these will be executed (with `dispatch-event') and discarded. This | 2266 etc) then these will be executed (with `dispatch-event') and discarded. This |
2267 function is provided as a convenience; it is equivalent to the lisp code | 2267 function is provided as a convenience; it is rougly equivalent to the lisp code |
2268 | 2268 |
2269 (while (progn | 2269 (while (progn |
2270 (next-event event prompt) | 2270 (next-event event prompt) |
2271 (not (or (key-press-event-p event) | 2271 (not (or (key-press-event-p event) |
2272 (button-press-event-p event) | 2272 (button-press-event-p event) |
2273 (button-release-event-p event) | 2273 (button-release-event-p event) |
2274 (misc-user-event-p event)))) | 2274 (misc-user-event-p event)))) |
2275 (dispatch-event event)) | 2275 (dispatch-event event)) |
2276 | 2276 |
2277 but it also makes a provision for displaying keystrokes in the echo area. | |
2277 */ | 2278 */ |
2278 (event, prompt)) | 2279 (event, prompt)) |
2279 { | 2280 { |
2280 /* This function can GC */ | 2281 /* This function can GC */ |
2281 struct gcpro gcpro1; | 2282 struct gcpro gcpro1; |
4870 vars_of_event_stream (void) | 4871 vars_of_event_stream (void) |
4871 { | 4872 { |
4872 #ifdef HAVE_X_WINDOWS | 4873 #ifdef HAVE_X_WINDOWS |
4873 vars_of_event_Xt (); | 4874 vars_of_event_Xt (); |
4874 #endif | 4875 #endif |
4875 #if defined (DEBUG_TTY_EVENT_STREAM) || !defined (HAVE_X_WINDOWS) | 4876 #if defined(HAVE_TTY) && (defined (DEBUG_TTY_EVENT_STREAM) || !defined (HAVE_X_WINDOWS)) |
4876 vars_of_event_tty (); | 4877 vars_of_event_tty (); |
4877 #endif | 4878 #endif |
4878 | 4879 #ifdef HAVE_W32GUI |
4880 vars_of_event_w32 (); | |
4881 #endif | |
4879 | 4882 |
4880 recent_keys_ring_index = 0; | 4883 recent_keys_ring_index = 0; |
4881 recent_keys_ring_size = 100; | 4884 recent_keys_ring_size = 100; |
4882 Vrecent_keys_ring = Qnil; | 4885 Vrecent_keys_ring = Qnil; |
4883 staticpro (&Vrecent_keys_ring); | 4886 staticpro (&Vrecent_keys_ring); |
5276 | 5279 |
5277 #ifdef HAVE_X_WINDOWS | 5280 #ifdef HAVE_X_WINDOWS |
5278 if (!strcmp (display_use, "x")) | 5281 if (!strcmp (display_use, "x")) |
5279 init_event_Xt_late (); | 5282 init_event_Xt_late (); |
5280 else | 5283 else |
5284 #elif defined(HAVE_W32GUI) | |
5285 if (!strcmp (display_use, "w32")) | |
5286 init_event_w32_late (); | |
5287 else | |
5281 #endif | 5288 #endif |
5282 { | 5289 { |
5283 /* For TTY's, use the Xt event loop if we can; it allows | 5290 /* For TTY's, use the Xt event loop if we can; it allows |
5284 us to later open an X connection. */ | 5291 us to later open an X connection. */ |
5285 #if defined (HAVE_X_WINDOWS) && !defined (DEBUG_TTY_EVENT_STREAM) | 5292 #if defined (HAVE_X_WINDOWS) && !defined (DEBUG_TTY_EVENT_STREAM) |
5286 init_event_Xt_late (); | 5293 init_event_Xt_late (); |
5287 #else | 5294 #elif defined (HAVE_TTY) |
5288 init_event_tty_late (); | 5295 init_event_tty_late (); |
5296 #elif defined(HAVE_W32GUI) | |
5297 init_event_w32_late (); | |
5289 #endif | 5298 #endif |
5290 } | 5299 } |
5291 init_interrupts_late (); | 5300 init_interrupts_late (); |
5292 } | 5301 } |
5293 } | 5302 } |