Mercurial > hg > xemacs-beta
comparison src/event-stream.c @ 263:727739f917cb r20-5b30
Import from CVS: tag r20-5b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:24:41 +0200 |
parents | 11cf20601dec |
children | 8efd647ea9ca |
comparison
equal
deleted
inserted
replaced
262:9d8607af9e13 | 263:727739f917cb |
---|---|
526 if (sigint_happened) | 526 if (sigint_happened) |
527 { | 527 { |
528 int ch = CONSOLE_QUIT_CHAR (con); | 528 int ch = CONSOLE_QUIT_CHAR (con); |
529 sigint_happened = 0; | 529 sigint_happened = 0; |
530 Vquit_flag = Qnil; | 530 Vquit_flag = Qnil; |
531 character_to_event (ch, event, con, 1); | 531 character_to_event (ch, event, con, 1, 1); |
532 event->channel = make_console (con); | 532 event->channel = make_console (con); |
533 return 1; | 533 return 1; |
534 } | 534 } |
535 return 0; | 535 return 0; |
536 } | 536 } |
642 event_stream->unselect_process_cb (proc); | 642 event_stream->unselect_process_cb (proc); |
643 set_process_selected_p (proc, 0); | 643 set_process_selected_p (proc, 0); |
644 } | 644 } |
645 } | 645 } |
646 | 646 |
647 USID | |
648 event_stream_create_stream_pair (void* inhandle, void* outhandle, | |
649 Lisp_Object* instream, Lisp_Object* outstream, int flags) | |
650 { | |
651 check_event_stream_ok (EVENT_STREAM_PROCESS); | |
652 return event_stream->create_stream_pair_cb | |
653 (inhandle, outhandle, instream, outstream, flags); | |
654 } | |
655 | |
656 USID | |
657 event_stream_delete_stream_pair (Lisp_Object instream, Lisp_Object outstream) | |
658 { | |
659 check_event_stream_ok (EVENT_STREAM_PROCESS); | |
660 return event_stream->delete_stream_pair_cb (instream, outstream); | |
661 } | |
662 | |
647 void | 663 void |
648 event_stream_quit_p (void) | 664 event_stream_quit_p (void) |
649 { | 665 { |
650 if (event_stream) | 666 if (event_stream) |
651 event_stream->quit_p_cb (); | 667 event_stream->quit_p_cb (); |
787 /* This used to call Fcharacter_to_event() directly into EVENT, | 803 /* This used to call Fcharacter_to_event() directly into EVENT, |
788 but that can eradicate timestamps and other such stuff. | 804 but that can eradicate timestamps and other such stuff. |
789 This way is safer. */ | 805 This way is safer. */ |
790 zero_event (&ev2); | 806 zero_event (&ev2); |
791 character_to_event (XCHAR (traduit), &ev2, | 807 character_to_event (XCHAR (traduit), &ev2, |
792 XCONSOLE (EVENT_CHANNEL (XEVENT (event))), 1); | 808 XCONSOLE (EVENT_CHANNEL (XEVENT (event))), 1, 1); |
793 XEVENT (event)->event.key.keysym = ev2.event.key.keysym; | 809 XEVENT (event)->event.key.keysym = ev2.event.key.keysym; |
794 XEVENT (event)->event.key.modifiers = ev2.event.key.modifiers; | 810 XEVENT (event)->event.key.modifiers = ev2.event.key.modifiers; |
795 did_translate = 1; | 811 did_translate = 1; |
796 } | 812 } |
797 } | 813 } |
4168 struct Lisp_Event *e = XEVENT (quit_event); | 4184 struct Lisp_Event *e = XEVENT (quit_event); |
4169 /* if quit happened during menu acceleration, pretend we read it */ | 4185 /* if quit happened during menu acceleration, pretend we read it */ |
4170 struct console *con = XCONSOLE (Fselected_console ()); | 4186 struct console *con = XCONSOLE (Fselected_console ()); |
4171 int ch = CONSOLE_QUIT_CHAR (con); | 4187 int ch = CONSOLE_QUIT_CHAR (con); |
4172 | 4188 |
4173 character_to_event (ch, e, con, 1); | 4189 character_to_event (ch, e, con, 1, 1); |
4174 e->channel = make_console (con); | 4190 e->channel = make_console (con); |
4175 | 4191 |
4176 enqueue_command_event (quit_event); | 4192 enqueue_command_event (quit_event); |
4177 Vquit_flag = Qnil; | 4193 Vquit_flag = Qnil; |
4178 } | 4194 } |
4814 O_WRONLY | O_TRUNC | O_CREAT | OPEN_BINARY, | 4830 O_WRONLY | O_TRUNC | O_CREAT | OPEN_BINARY, |
4815 CREAT_MODE); | 4831 CREAT_MODE); |
4816 if (fd < 0) | 4832 if (fd < 0) |
4817 error ("Unable to create dribble file"); | 4833 error ("Unable to create dribble file"); |
4818 Vdribble_file = make_filedesc_output_stream (fd, 0, 0, LSTR_CLOSING); | 4834 Vdribble_file = make_filedesc_output_stream (fd, 0, 0, LSTR_CLOSING); |
4819 #ifdef FILE_CODING | 4835 #ifdef MULE |
4820 Vdribble_file = | 4836 Vdribble_file = |
4821 make_encoding_output_stream (XLSTREAM (Vdribble_file), | 4837 make_encoding_output_stream (XLSTREAM (Vdribble_file), |
4822 Fget_coding_system (Qescape_quoted)); | 4838 Fget_coding_system (Qescape_quoted)); |
4823 #endif | 4839 #endif |
4824 } | 4840 } |
5308 init_event_stream (void) | 5324 init_event_stream (void) |
5309 { | 5325 { |
5310 if (initialized) | 5326 if (initialized) |
5311 { | 5327 { |
5312 #ifdef HAVE_UNIXOID_EVENT_LOOP | 5328 #ifdef HAVE_UNIXOID_EVENT_LOOP |
5313 init_event_unixoid (); | 5329 if (strcmp (display_use, "mswindows") != 0) |
5330 init_event_unixoid (); | |
5314 #endif | 5331 #endif |
5315 | |
5316 #ifdef HAVE_X_WINDOWS | 5332 #ifdef HAVE_X_WINDOWS |
5317 if (!strcmp (display_use, "x")) | 5333 if (!strcmp (display_use, "x")) |
5318 init_event_Xt_late (); | 5334 init_event_Xt_late (); |
5319 else | 5335 else |
5320 #elif defined(HAVE_MS_WINDOWS) | 5336 #endif |
5337 #ifdef HAVE_MS_WINDOWS | |
5321 if (!strcmp (display_use, "mswindows")) | 5338 if (!strcmp (display_use, "mswindows")) |
5322 init_event_mswindows_late (); | 5339 init_event_mswindows_late (); |
5323 else | 5340 else |
5324 #endif | 5341 #endif |
5325 { | 5342 { |
5327 us to later open an X connection. */ | 5344 us to later open an X connection. */ |
5328 #if defined (HAVE_X_WINDOWS) && !defined (DEBUG_TTY_EVENT_STREAM) | 5345 #if defined (HAVE_X_WINDOWS) && !defined (DEBUG_TTY_EVENT_STREAM) |
5329 init_event_Xt_late (); | 5346 init_event_Xt_late (); |
5330 #elif defined (HAVE_TTY) | 5347 #elif defined (HAVE_TTY) |
5331 init_event_tty_late (); | 5348 init_event_tty_late (); |
5332 #elif defined(HAVE_MS_WINDOWS) | |
5333 init_event_mswindows_late (); | |
5334 #endif | 5349 #endif |
5335 } | 5350 } |
5336 init_interrupts_late (); | 5351 init_interrupts_late (); |
5337 } | 5352 } |
5338 } | 5353 } |