comparison src/events.c @ 462:0784d089fdc9 r21-2-46

Import from CVS: tag r21-2-46
author cvs
date Mon, 13 Aug 2007 11:44:37 +0200
parents 576fb035e263
children 7039e6323819
comparison
equal deleted inserted replaced
461:120ed4009e51 462:0784d089fdc9
28 #include "buffer.h" 28 #include "buffer.h"
29 #include "console.h" 29 #include "console.h"
30 #include "console-tty.h" /* for stuff in character_to_event */ 30 #include "console-tty.h" /* for stuff in character_to_event */
31 #include "device.h" 31 #include "device.h"
32 #include "console-x.h" /* for x_event_name prototype */ 32 #include "console-x.h" /* for x_event_name prototype */
33 #include "console-gtk.h" /* for gtk_event_name prototype */
33 #include "extents.h" /* Just for the EXTENTP abort check... */ 34 #include "extents.h" /* Just for the EXTENTP abort check... */
34 #include "events.h" 35 #include "events.h"
35 #include "frame.h" 36 #include "frame.h"
36 #include "glyphs.h" 37 #include "glyphs.h"
37 #include "keymap.h" /* for key_desc_list_to_event() */ 38 #include "keymap.h" /* for key_desc_list_to_event() */
266 267
267 case magic_event: 268 case magic_event:
268 { 269 {
269 struct console *con = XCONSOLE (CDFW_CONSOLE (e1->channel)); 270 struct console *con = XCONSOLE (CDFW_CONSOLE (e1->channel));
270 271
272 #ifdef HAVE_GTK
273 if (CONSOLE_GTK_P (con))
274 return (!memcmp (&e1->event.magic.underlying_gdk_event,
275 &e2->event.magic.underlying_gdk_event,
276 sizeof (GdkEvent)));
277 #endif
271 #ifdef HAVE_X_WINDOWS 278 #ifdef HAVE_X_WINDOWS
272 if (CONSOLE_X_P (con)) 279 if (CONSOLE_X_P (con))
273 return (e1->event.magic.underlying_x_event.xany.serial == 280 return (e1->event.magic.underlying_x_event.xany.serial ==
274 e2->event.magic.underlying_x_event.xany.serial); 281 e2->event.magic.underlying_x_event.xany.serial);
275 #endif 282 #endif
336 internal_hash (e->event.magic_eval.object, depth + 1)); 343 internal_hash (e->event.magic_eval.object, depth + 1));
337 344
338 case magic_event: 345 case magic_event:
339 { 346 {
340 struct console *con = XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e))); 347 struct console *con = XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e)));
348 #ifdef HAVE_GTK
349 if (CONSOLE_GTK_P (con))
350 return HASH2 (hash, e->event.magic.underlying_gdk_event.type);
351 #endif
341 #ifdef HAVE_X_WINDOWS 352 #ifdef HAVE_X_WINDOWS
342 if (CONSOLE_X_P (con)) 353 if (CONSOLE_X_P (con))
343 return HASH2 (hash, e->event.magic.underlying_x_event.xany.serial); 354 return HASH2 (hash, e->event.magic.underlying_x_event.xany.serial);
344 #endif 355 #endif
345 #ifdef HAVE_TTY 356 #ifdef HAVE_TTY
1267 } 1278 }
1268 case magic_event: 1279 case magic_event:
1269 { 1280 {
1270 const char *name = NULL; 1281 const char *name = NULL;
1271 1282
1283 #ifdef HAVE_GTK
1284 {
1285 Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (event));
1286 if (CONSOLE_GTK_P (XCONSOLE (console)))
1287 name = gtk_event_name (event->event.magic.underlying_gdk_event.type);
1288 }
1289 #endif
1272 #ifdef HAVE_X_WINDOWS 1290 #ifdef HAVE_X_WINDOWS
1273 { 1291 {
1274 Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (event)); 1292 Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (event));
1275 if (CONSOLE_X_P (XCONSOLE (console))) 1293 if (CONSOLE_X_P (XCONSOLE (console)))
1276 name = x_event_name (event->event.magic.underlying_x_event.type); 1294 name = x_event_name (event->event.magic.underlying_x_event.type);