Mercurial > hg > xemacs-beta
comparison src/event-Xt.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | fdefd0186b75 |
children | 026c5bf9c134 |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
1 /* The event_stream interface for X11 with Xt, and/or tty frames. | 1 /* The event_stream interface for X11 with Xt, and/or tty frames. |
2 Copyright (C) 1991-5, 1997 Free Software Foundation, Inc. | 2 Copyright (C) 1991-5, 1997 Free Software Foundation, Inc. |
3 Copyright (C) 1995 Sun Microsystems, Inc. | 3 Copyright (C) 1995 Sun Microsystems, Inc. |
4 Copyright (C) 1996 Ben Wing. | 4 Copyright (C) 1996, 2001 Ben Wing. |
5 | 5 |
6 This file is part of XEmacs. | 6 This file is part of XEmacs. |
7 | 7 |
8 XEmacs is free software; you can redistribute it and/or modify it | 8 XEmacs is free software; you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License as published by the | 9 under the terms of the GNU General Public License as published by the |
28 #include "console-x.h" | 28 #include "console-x.h" |
29 #include "../lwlib/lwlib.h" | 29 #include "../lwlib/lwlib.h" |
30 #include "EmacsFrame.h" | 30 #include "EmacsFrame.h" |
31 | 31 |
32 #include "blocktype.h" | 32 #include "blocktype.h" |
33 #include "buffer.h" | 33 #include "charset.h" |
34 #include "console.h" | 34 #include "console.h" |
35 #include "console-tty.h" | 35 #include "console-tty.h" |
36 #include "events.h" | 36 #include "events.h" |
37 #include "frame.h" | 37 #include "frame.h" |
38 #include "objects-x.h" | 38 #include "objects-x.h" |
1052 Lstream *istr; | 1052 Lstream *istr; |
1053 struct gcpro gcpro1, gcpro2; | 1053 struct gcpro gcpro1, gcpro2; |
1054 | 1054 |
1055 fb_instream = make_fixed_buffer_input_stream (bufptr, len); | 1055 fb_instream = make_fixed_buffer_input_stream (bufptr, len); |
1056 | 1056 |
1057 /* #### Use Fget_coding_system (Vcomposed_input_coding_system) */ | 1057 /* #### Use get_coding_system_for_text_file (Vcomposed_input_coding_system, 0) */ |
1058 instream = | 1058 instream = |
1059 make_decoding_input_stream (XLSTREAM (fb_instream), | 1059 make_coding_input_stream |
1060 Fget_coding_system (Qundecided)); | 1060 (XLSTREAM (fb_instream), Qundecided, CODING_DECODE); |
1061 | 1061 |
1062 istr = XLSTREAM (instream); | 1062 istr = XLSTREAM (instream); |
1063 | 1063 |
1064 GCPRO2 (instream, fb_instream); | 1064 GCPRO2 (instream, fb_instream); |
1065 while ((ch = Lstream_get_emchar (istr)) != EOF) | 1065 while ((ch = Lstream_get_emchar (istr)) != EOF) |
2414 if (CONSOLEP (console)) | 2414 if (CONSOLEP (console)) |
2415 { | 2415 { |
2416 assert (tty_events_occurred > 0); | 2416 assert (tty_events_occurred > 0); |
2417 tty_events_occurred--; | 2417 tty_events_occurred--; |
2418 filedesc_with_input[i] = Qnil; | 2418 filedesc_with_input[i] = Qnil; |
2419 if (read_event_from_tty_or_stream_desc | 2419 if (read_event_from_tty_or_stream_desc (emacs_event, |
2420 (emacs_event, XCONSOLE (console), i)) | 2420 XCONSOLE (console))) |
2421 return 1; | 2421 return 1; |
2422 } | 2422 } |
2423 } | 2423 } |
2424 | 2424 |
2425 return 0; | 2425 return 0; |
2443 w = XtWindowToWidget (display, window); | 2443 w = XtWindowToWidget (display, window); |
2444 if (w) | 2444 if (w) |
2445 stderr_out (" %s", w->core.widget_class->core_class.class_name); | 2445 stderr_out (" %s", w->core.widget_class->core_class.class_name); |
2446 f = x_any_window_to_frame (get_device_from_display (display), window); | 2446 f = x_any_window_to_frame (get_device_from_display (display), window); |
2447 if (f) | 2447 if (f) |
2448 { | 2448 stderr_out_lisp (" \"%s\"", 1, f->name); |
2449 char *buf = alloca_array (char, XSTRING_LENGTH (f->name) + 4); | |
2450 sprintf (buf, " \"%s\"", XSTRING_DATA (f->name)); | |
2451 write_string_to_stdio_stream (stderr, 0, (Intbyte *) buf, 0, | |
2452 strlen (buf), Qterminal, 1); | |
2453 } | |
2454 stderr_out ("\n"); | 2449 stderr_out ("\n"); |
2455 } | 2450 } |
2456 | 2451 |
2457 static const char * | 2452 static const char * |
2458 XEvent_mode_to_string (int mode) | 2453 XEvent_mode_to_string (int mode) |
2886 | 2881 |
2887 if (!poll_fds_for_input (temp_mask)) | 2882 if (!poll_fds_for_input (temp_mask)) |
2888 return; | 2883 return; |
2889 | 2884 |
2890 event = Fmake_event (Qnil, Qnil); | 2885 event = Fmake_event (Qnil, Qnil); |
2891 if (!read_event_from_tty_or_stream_desc (XEVENT (event), con, infd)) | 2886 if (!read_event_from_tty_or_stream_desc (XEVENT (event), con)) |
2892 /* EOF, or something ... */ | 2887 /* EOF, or something ... */ |
2893 return; | 2888 return; |
2894 /* #### bogus. quit-char should be allowed to be any sort | 2889 /* #### bogus. quit-char should be allowed to be any sort |
2895 of event. */ | 2890 of event. */ |
2896 the_char = event_to_character (XEVENT (event), 1, 0, 0); | 2891 the_char = event_to_character (XEVENT (event), 1, 0, 0); |
3368 pending_timeouts = 0; | 3363 pending_timeouts = 0; |
3369 completed_timeouts = 0; | 3364 completed_timeouts = 0; |
3370 | 3365 |
3371 event_stream = Xt_event_stream; | 3366 event_stream = Xt_event_stream; |
3372 | 3367 |
3373 #if defined(HAVE_XIM) || defined(USE_XFONTSET) | |
3374 Initialize_Locale(); | |
3375 #endif /* HAVE_XIM || USE_XFONTSET */ | |
3376 | |
3377 XtToolkitInitialize (); | 3368 XtToolkitInitialize (); |
3378 Xt_app_con = XtCreateApplicationContext (); | 3369 Xt_app_con = XtCreateApplicationContext (); |
3379 XtAppSetFallbackResources (Xt_app_con, (String *) x_fallback_resources); | 3370 XtAppSetFallbackResources (Xt_app_con, (String *) x_fallback_resources); |
3380 | 3371 |
3381 /* In select-x.c */ | 3372 /* In select-x.c */ |