Mercurial > hg > xemacs-beta
comparison src/events.h @ 272:c5d627a313b1 r21-0b34
Import from CVS: tag r21-0b34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:28:48 +0200 |
parents | 727739f917cb |
children | c42ec1d1cded |
comparison
equal
deleted
inserted
replaced
271:c7b7086b0a39 | 272:c5d627a313b1 |
---|---|
114 unselect_device_cb (those that use select() and file descriptors and | 114 unselect_device_cb (those that use select() and file descriptors and |
115 have a separate input fd per device). | 115 have a separate input fd per device). |
116 | 116 |
117 create_stream_pair_cb These callbacks are called by process code to | 117 create_stream_pair_cb These callbacks are called by process code to |
118 delete_stream_pair_cb create and delete a pait of input and output lstreams | 118 delete_stream_pair_cb create and delete a pait of input and output lstreams |
119 which are used for subprocess I/O. | 119 which are used for subprocess I/O. |
120 | 120 |
121 quitp_cb A handler function called from the `QUIT' macro which | 121 quitp_cb A handler function called from the `QUIT' macro which |
122 should check whether the quit character has been | 122 should check whether the quit character has been |
123 typed. On systems with SIGIO, this will not be called | 123 typed. On systems with SIGIO, this will not be called |
124 unless the `sigio_happened' flag is true (it is set | 124 unless the `sigio_happened' flag is true (it is set |
313 | 313 |
314 There are two special USID values. One, USID_ERROR, indicates that the stream | 314 There are two special USID values. One, USID_ERROR, indicates that the stream |
315 pair cannot be created. The second, USID_DONTHASH, indicates that streams are | 315 pair cannot be created. The second, USID_DONTHASH, indicates that streams are |
316 created, but the event stream does not wish to be able to find the process | 316 created, but the event stream does not wish to be able to find the process |
317 by its USID. Specifically, if an event stream implementation never calss | 317 by its USID. Specifically, if an event stream implementation never calss |
318 get_process_from_usid, this value should always be returned, to prevent | 318 get_process_from_usid, this value should always be returned, to prevent |
319 accumulating useless information on USID to process relationship. | 319 accumulating useless information on USID to process relationship. |
320 */ | 320 */ |
321 | 321 |
322 /* typedef unsigned int USID; in lisp.h */ | 322 /* typedef unsigned int USID; in lisp.h */ |
323 #define USID_ERROR ((USID)-1) | 323 #define USID_ERROR ((USID)-1) |
324 #define USID_DONTHASH ((USID)0) | 324 #define USID_DONTHASH ((USID)0) |
325 | 325 |
326 | 326 |
327 struct Lisp_Event; | 327 struct Lisp_Event; |
328 struct Lisp_Process; | 328 struct Lisp_Process; |
329 | 329 |
491 #define EVENT_CHAIN_LOOP(event, chain) \ | 491 #define EVENT_CHAIN_LOOP(event, chain) \ |
492 for (event = chain; !NILP (event); event = XEVENT_NEXT (event)) | 492 for (event = chain; !NILP (event); event = XEVENT_NEXT (event)) |
493 | 493 |
494 #define EVENT_LIVE_P(a) (EVENT_TYPE (a) != dead_event) | 494 #define EVENT_LIVE_P(a) (EVENT_TYPE (a) != dead_event) |
495 | 495 |
496 #define CHECK_LIVE_EVENT(x) \ | 496 #define CHECK_LIVE_EVENT(x) do { \ |
497 do { CHECK_EVENT (x); \ | 497 CHECK_EVENT (x); \ |
498 if (! EVENTP (x) \ | 498 if (! EVENT_LIVE_P (XEVENT (x))) \ |
499 || ! EVENT_LIVE_P (XEVENT (x))) \ | 499 dead_wrong_type_argument (Qevent_live_p, (x)); \ |
500 dead_wrong_type_argument (Qevent_live_p, (x)); } while (0) | 500 } while (0) |
501 #define CONCHECK_LIVE_EVENT(x) \ | 501 #define CONCHECK_LIVE_EVENT(x) do { \ |
502 do { CONCHECK_EVENT (x); \ | 502 CONCHECK_EVENT (x); \ |
503 if (! EVENTP (x) \ | 503 if (! EVENT_LIVE_P (XEVENT (x))) \ |
504 || ! EVENT_LIVE_P (XEVENT (x))) \ | 504 x = wrong_type_argument (Qevent_live_p, (x)); \ |
505 x = wrong_type_argument (Qevent_live_p, (x)); } while (0) | 505 } while (0) |
506 | 506 |
507 | 507 |
508 extern Lisp_Object Qevent_live_p; | 508 EXFUN (Fcharacter_to_event, 4); |
509 EXFUN (Fdeallocate_event, 1); | |
510 EXFUN (Fevent_glyph_extent, 1); | |
511 EXFUN (Fevent_modeline_position, 1); | |
512 EXFUN (Fevent_over_modeline_p, 1); | |
513 EXFUN (Fevent_over_toolbar_p, 1); | |
514 EXFUN (Fevent_point, 1); | |
515 EXFUN (Fevent_window, 1); | |
516 EXFUN (Fmake_event, 2); | |
517 | |
518 extern Lisp_Object QKbackspace, QKdelete, QKescape, QKlinefeed, QKreturn; | |
519 extern Lisp_Object QKspace, QKtab, Qmouse_event_p, Vcharacter_set_property; | |
509 | 520 |
510 /* Note: under X Windows, MOD_ALT is generated by the Alt key if there are | 521 /* Note: under X Windows, MOD_ALT is generated by the Alt key if there are |
511 both Alt and Meta keys. If there are no Meta keys, then Alt generates | 522 both Alt and Meta keys. If there are no Meta keys, then Alt generates |
512 MOD_META instead. | 523 MOD_META instead. |
513 */ | 524 */ |
544 (keyboard press, menu, scrollbar, mouse button) */ | 555 (keyboard press, menu, scrollbar, mouse button) */ |
545 int command_event_p (Lisp_Object event); | 556 int command_event_p (Lisp_Object event); |
546 | 557 |
547 struct console *event_console_or_selected (Lisp_Object event); | 558 struct console *event_console_or_selected (Lisp_Object event); |
548 | 559 |
549 int event_stream_event_pending_p (int user); | |
550 void event_stream_next_event (struct Lisp_Event *event); | 560 void event_stream_next_event (struct Lisp_Event *event); |
551 void event_stream_handle_magic_event (struct Lisp_Event *event); | 561 void event_stream_handle_magic_event (struct Lisp_Event *event); |
552 void event_stream_select_console (struct console *c); | 562 void event_stream_select_console (struct console *c); |
553 void event_stream_unselect_console (struct console *c); | 563 void event_stream_unselect_console (struct console *c); |
554 void event_stream_select_process (struct Lisp_Process *proc); | 564 void event_stream_select_process (struct Lisp_Process *proc); |
622 | 632 |
623 #endif /* HAVE_UNIXOID_EVENT_LOOP */ | 633 #endif /* HAVE_UNIXOID_EVENT_LOOP */ |
624 | 634 |
625 extern int emacs_is_blocking; | 635 extern int emacs_is_blocking; |
626 | 636 |
627 extern Lisp_Object Vcontrolling_terminal; | |
628 | |
629 extern volatile int sigint_happened; | 637 extern volatile int sigint_happened; |
630 | 638 |
631 /* Define this if you want the tty event stream to be used when the | 639 /* Define this if you want the tty event stream to be used when the |
632 first console is tty, even if HAVE_X_WINDOWS is defined */ | 640 first console is tty, even if HAVE_X_WINDOWS is defined */ |
633 /* #define DEBUG_TTY_EVENT_STREAM */ | 641 /* #define DEBUG_TTY_EVENT_STREAM */ |