Mercurial > hg > xemacs-beta
comparison src/events.c @ 272:c5d627a313b1 r21-0b34
Import from CVS: tag r21-0b34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:28:48 +0200 |
parents | b2472a1930f2 |
children | ca9a9ec9c1c1 |
comparison
equal
deleted
inserted
replaced
271:c7b7086b0a39 | 272:c5d627a313b1 |
---|---|
69 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS) | 69 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS) |
70 Lisp_Object Qdnd_drop_event_p; | 70 Lisp_Object Qdnd_drop_event_p; |
71 Lisp_Object Qdnd_drop; | 71 Lisp_Object Qdnd_drop; |
72 #endif | 72 #endif |
73 | 73 |
74 EXFUN (Fevent_x_pixel, 1); | |
75 EXFUN (Fevent_y_pixel, 1); | |
76 | |
74 /* #### Ad-hoc hack. Should be part of define_lrecord_implementation */ | 77 /* #### Ad-hoc hack. Should be part of define_lrecord_implementation */ |
75 void | 78 void |
76 clear_event_resource (void) | 79 clear_event_resource (void) |
77 { | 80 { |
78 Vevent_resource = Qnil; | 81 Vevent_resource = Qnil; |
83 deinitialize_event (Lisp_Object ev) | 86 deinitialize_event (Lisp_Object ev) |
84 { | 87 { |
85 int i; | 88 int i; |
86 struct Lisp_Event *event = XEVENT (ev); | 89 struct Lisp_Event *event = XEVENT (ev); |
87 | 90 |
88 for (i = 0; i < ((sizeof (struct Lisp_Event)) / sizeof (int)); i++) | 91 for (i = 0; i < (int) (sizeof (struct Lisp_Event) / sizeof (int)); i++) |
89 ((int *) event) [i] = 0xdeadbeef; | 92 ((int *) event) [i] = 0xdeadbeef; |
90 event->event_type = dead_event; | 93 event->event_type = dead_event; |
91 event->channel = Qnil; | 94 event->channel = Qnil; |
92 set_lheader_implementation (&(event->lheader), lrecord_event); | 95 set_lheader_implementation (&(event->lheader), lrecord_event); |
93 XSET_EVENT_NEXT (ev, Qnil); | 96 XSET_EVENT_NEXT (ev, Qnil); |
95 | 98 |
96 /* Set everything to zero or nil so that it's predictable. */ | 99 /* Set everything to zero or nil so that it's predictable. */ |
97 void | 100 void |
98 zero_event (struct Lisp_Event *e) | 101 zero_event (struct Lisp_Event *e) |
99 { | 102 { |
100 memset (e, 0, sizeof (*e)); | 103 xzero (*e); |
101 set_lheader_implementation (&(e->lheader), lrecord_event); | 104 set_lheader_implementation (&(e->lheader), lrecord_event); |
102 e->event_type = empty_event; | 105 e->event_type = empty_event; |
103 e->next = Qnil; | 106 e->next = Qnil; |
104 e->channel = Qnil; | 107 e->channel = Qnil; |
105 } | 108 } |
388 mark_event, print_event, 0, event_equal, | 391 mark_event, print_event, 0, event_equal, |
389 event_hash, struct Lisp_Event); | 392 event_hash, struct Lisp_Event); |
390 | 393 |
391 | 394 |
392 DEFUN ("make-event", Fmake_event, 0, 2, 0, /* | 395 DEFUN ("make-event", Fmake_event, 0, 2, 0, /* |
393 Create a new event of type TYPE, with properties described by PLIST. | 396 Return a new event of type TYPE, with properties described by PLIST. |
394 | 397 |
395 TYPE is a symbol, either `empty', `key-press', `button-press', | 398 TYPE is a symbol, either `empty', `key-press', `button-press', |
396 `button-release', `motion' or `dnd-drop'. If TYPE is nil, it | 399 `button-release', `motion' or `dnd-drop'. If TYPE is nil, it |
397 defaults to `empty'. | 400 defaults to `empty'. |
398 | 401 |
503 EVENT_CHANNEL (e) = Qnil; | 506 EVENT_CHANNEL (e) = Qnil; |
504 | 507 |
505 plist = Fcopy_sequence (plist); | 508 plist = Fcopy_sequence (plist); |
506 Fcanonicalize_plist (plist, Qnil); | 509 Fcanonicalize_plist (plist, Qnil); |
507 | 510 |
508 #define WRONG_EVENT_TYPE_FOR_PROPERTY(prop) \ | 511 #define WRONG_EVENT_TYPE_FOR_PROPERTY(type, prop) \ |
509 error_with_frob (type, "Invalid event type for `%s' property", \ | 512 error_with_frob (prop, "Invalid property for %s event", \ |
510 string_data (symbol_name (XSYMBOL (keyword)))) | 513 string_data (symbol_name (XSYMBOL (type)))) |
511 | 514 |
512 EXTERNAL_PROPERTY_LIST_LOOP (tail, keyword, value, plist) | 515 EXTERNAL_PROPERTY_LIST_LOOP (tail, keyword, value, plist) |
513 { | 516 { |
514 CHECK_SYMBOL (keyword); | |
515 if (EQ (keyword, Qchannel)) | 517 if (EQ (keyword, Qchannel)) |
516 { | 518 { |
517 if (e->event_type == key_press_event) | 519 if (e->event_type == key_press_event) |
518 { | 520 { |
519 while (!CONSOLEP (value)) | 521 if (!CONSOLEP (value)) |
520 value = wrong_type_argument (Qconsolep, value); | 522 value = wrong_type_argument (Qconsolep, value); |
521 } | 523 } |
522 else if (e->event_type != misc_user_event) | 524 else if (e->event_type != misc_user_event) |
523 { | 525 { |
524 while (!FRAMEP (value)) | 526 if (!FRAMEP (value)) |
525 value = wrong_type_argument (Qframep, value); | 527 value = wrong_type_argument (Qframep, value); |
526 } | 528 } |
527 EVENT_CHANNEL (e) = value; | 529 EVENT_CHANNEL (e) = value; |
528 } | 530 } |
529 else if (EQ (keyword, Qkey)) | 531 else if (EQ (keyword, Qkey)) |
530 { | 532 { |
531 if (e->event_type != key_press_event) | 533 if (e->event_type != key_press_event) |
532 WRONG_EVENT_TYPE_FOR_PROPERTY (keyword); | 534 WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword); |
533 if (!SYMBOLP (value) && !CHARP (value)) | 535 if (!SYMBOLP (value) && !CHARP (value)) |
534 signal_simple_error ("Invalid event key", value); | 536 signal_simple_error ("Invalid event key", value); |
535 e->event.key.keysym = value; | 537 e->event.key.keysym = value; |
536 } | 538 } |
537 else if (EQ (keyword, Qbutton)) | 539 else if (EQ (keyword, Qbutton)) |
538 { | 540 { |
539 CHECK_NATNUM (value); | |
540 check_int_range (XINT (value), 0, 7); | |
541 if (e->event_type != button_press_event | 541 if (e->event_type != button_press_event |
542 && e->event_type != button_release_event) | 542 && e->event_type != button_release_event) |
543 { | 543 { |
544 WRONG_EVENT_TYPE_FOR_PROPERTY (keyword); | 544 WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword); |
545 } | 545 } |
546 CHECK_NATNUM (value); | |
547 check_int_range (XINT (value), 0, 7); | |
546 e->event.button.button = XINT (value); | 548 e->event.button.button = XINT (value); |
547 } | 549 } |
548 else if (EQ (keyword, Qmodifiers)) | 550 else if (EQ (keyword, Qmodifiers)) |
549 { | 551 { |
550 Lisp_Object modtail; | 552 Lisp_Object modtail; |
552 | 554 |
553 if (e->event_type != key_press_event | 555 if (e->event_type != key_press_event |
554 && e->event_type != button_press_event | 556 && e->event_type != button_press_event |
555 && e->event_type != button_release_event | 557 && e->event_type != button_release_event |
556 && e->event_type != pointer_motion_event) | 558 && e->event_type != pointer_motion_event) |
557 WRONG_EVENT_TYPE_FOR_PROPERTY (keyword); | 559 { |
560 WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword); | |
561 } | |
558 | 562 |
559 EXTERNAL_LIST_LOOP (modtail, value) | 563 EXTERNAL_LIST_LOOP (modtail, value) |
560 { | 564 { |
561 Lisp_Object sym = XCAR (modtail); | 565 Lisp_Object sym = XCAR (modtail); |
562 if (EQ (sym, Qcontrol)) modifiers |= MOD_CONTROL; | 566 if (EQ (sym, Qcontrol)) modifiers |= MOD_CONTROL; |
577 else /* pointer_motion_event */ | 581 else /* pointer_motion_event */ |
578 e->event.motion.modifiers = modifiers; | 582 e->event.motion.modifiers = modifiers; |
579 } | 583 } |
580 else if (EQ (keyword, Qx)) | 584 else if (EQ (keyword, Qx)) |
581 { | 585 { |
582 /* Allow negative values, so we can specify toolbar | |
583 positions. */ | |
584 CHECK_INT (value); | |
585 if (e->event_type != pointer_motion_event | 586 if (e->event_type != pointer_motion_event |
586 && e->event_type != button_press_event | 587 && e->event_type != button_press_event |
587 && e->event_type != button_release_event) | 588 && e->event_type != button_release_event) |
588 { | 589 { |
589 WRONG_EVENT_TYPE_FOR_PROPERTY (keyword); | 590 WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword); |
590 } | 591 } |
592 /* Allow negative values, so we can specify toolbar | |
593 positions. */ | |
594 CHECK_INT (value); | |
591 coord_x = XINT (value); | 595 coord_x = XINT (value); |
592 } | 596 } |
593 else if (EQ (keyword, Qy)) | 597 else if (EQ (keyword, Qy)) |
594 { | 598 { |
595 /* Allow negative values; see above. */ | |
596 CHECK_INT (value); | |
597 if (e->event_type != pointer_motion_event | 599 if (e->event_type != pointer_motion_event |
598 && e->event_type != button_press_event | 600 && e->event_type != button_press_event |
599 && e->event_type != button_release_event) | 601 && e->event_type != button_release_event) |
600 { | 602 { |
601 WRONG_EVENT_TYPE_FOR_PROPERTY (keyword); | 603 WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword); |
602 } | 604 } |
605 /* Allow negative values; see above. */ | |
606 CHECK_INT (value); | |
603 coord_y = XINT (value); | 607 coord_y = XINT (value); |
604 } | 608 } |
605 else if (EQ (keyword, Qtimestamp)) | 609 else if (EQ (keyword, Qtimestamp)) |
606 { | 610 { |
607 CHECK_NATNUM (value); | 611 CHECK_NATNUM (value); |
608 e->timestamp = XINT (value); | 612 e->timestamp = XINT (value); |
609 } | 613 } |
610 else if (EQ (keyword, Qfunction)) | 614 else if (EQ (keyword, Qfunction)) |
611 { | 615 { |
612 if (e->event_type != misc_user_event) | 616 if (e->event_type != misc_user_event) |
613 WRONG_EVENT_TYPE_FOR_PROPERTY (keyword); | 617 WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword); |
614 e->event.eval.function = value; | 618 e->event.eval.function = value; |
615 } | 619 } |
616 else if (EQ (keyword, Qobject)) | 620 else if (EQ (keyword, Qobject)) |
617 { | 621 { |
618 if (e->event_type != misc_user_event) | 622 if (e->event_type != misc_user_event) |
619 WRONG_EVENT_TYPE_FOR_PROPERTY (keyword); | 623 WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword); |
620 e->event.eval.object = value; | 624 e->event.eval.object = value; |
621 } | 625 } |
622 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS) | 626 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS) |
623 else if (EQ (keyword, Qdnd_data)) | 627 else if (EQ (keyword, Qdnd_data)) |
624 { | 628 { |
625 Lisp_Object dnd_tail; | 629 if (e->event_type != dnd_drop_event) |
630 WRONG_EVENT_TYPE_FOR_PROPERTY (type, keyword); | |
631 | |
626 /* Value is either nil, or a list of (TYPE DATA). TYPE is | 632 /* Value is either nil, or a list of (TYPE DATA). TYPE is |
627 an integer. DATA is a list. */ | 633 an integer. DATA is a list. */ |
628 if (!NILP (value)) | 634 if (!NILP (value)) |
629 { | 635 { |
636 Lisp_Object dnd_tail; | |
630 CHECK_CONS (value); | 637 CHECK_CONS (value); |
631 /* To be changed to CHECK_SYMBOL. */ | 638 /* To be changed to CHECK_SYMBOL. */ |
632 CHECK_NATNUM (XCAR (value)); | 639 CHECK_NATNUM (XCAR (value)); |
633 CHECK_CONS (XCDR (value)); | 640 CHECK_CONS (XCDR (value)); |
634 if (XINT (Flength (value)) != 2) | 641 if (XINT (Flength (value)) != 2) |
635 signal_simple_error ("should be a two-element list", value); | 642 signal_simple_error ("Data should be a two-element list", value); |
636 /* Check validity of DATA. */ | 643 /* Check validity of DATA. */ |
637 EXTERNAL_LIST_LOOP (dnd_tail, XCAR (XCDR (value))) | 644 EXTERNAL_LIST_LOOP (dnd_tail, XCAR (XCDR (value))) |
638 { | 645 { |
639 /* Every element must be a string. */ | 646 /* Every element must be a string. */ |
640 CHECK_STRING (XCAR (dnd_tail)); | 647 CHECK_STRING (XCAR (dnd_tail)); |
641 } | 648 } |
642 /* And now, copy it all. */ | 649 /* And now, copy it all to avoid corruption later. */ |
643 e->event.dnd_drop.data = Fcopy_tree (value, Qnil); | 650 e->event.dnd_drop.data = Fcopy_tree (value, Qnil); |
644 } | 651 } |
645 } | 652 } |
646 #endif /* HAVE_OFFIX_DND || HAVE_MS_WINDOWS */ | 653 #endif /* HAVE_OFFIX_DND || HAVE_MS_WINDOWS */ |
647 else | 654 else |
651 /* Insert the channel, if missing. */ | 658 /* Insert the channel, if missing. */ |
652 if (NILP (EVENT_CHANNEL (e))) | 659 if (NILP (EVENT_CHANNEL (e))) |
653 { | 660 { |
654 if (e->event_type == key_press_event) | 661 if (e->event_type == key_press_event) |
655 EVENT_CHANNEL (e) = Vselected_console; | 662 EVENT_CHANNEL (e) = Vselected_console; |
656 else if (e->event_type != misc_user_event) | 663 else |
657 EVENT_CHANNEL (e) = Fselected_frame (Qnil); | 664 EVENT_CHANNEL (e) = Fselected_frame (Qnil); |
658 } | 665 } |
659 | 666 |
660 /* Fevent_properties, Fevent_x_pixel, etc. work with pixels relative | 667 /* Fevent_properties, Fevent_x_pixel, etc. work with pixels relative |
661 to the frame, so we must adjust accordingly. */ | 668 to the frame, so we must adjust accordingly. */ |
739 assert (XEVENT_TYPE (event) <= last_event_type); | 746 assert (XEVENT_TYPE (event) <= last_event_type); |
740 | 747 |
741 #if 0 | 748 #if 0 |
742 { | 749 { |
743 int i, len; | 750 int i, len; |
744 extern Lisp_Object Vlast_command_event; | |
745 extern Lisp_Object Vlast_input_event, Vunread_command_event; | |
746 extern Lisp_Object Vthis_command_keys, Vrecent_keys_ring; | |
747 | 751 |
748 if (EQ (event, Vlast_command_event) || | 752 if (EQ (event, Vlast_command_event) || |
749 EQ (event, Vlast_input_event) || | 753 EQ (event, Vlast_input_event) || |
750 EQ (event, Vunread_command_event)) | 754 EQ (event, Vunread_command_event)) |
751 abort (); | 755 abort (); |
1150 !NILP (allow_non_ascii)); | 1154 !NILP (allow_non_ascii)); |
1151 return c < 0 ? Qnil : make_char (c); | 1155 return c < 0 ? Qnil : make_char (c); |
1152 } | 1156 } |
1153 | 1157 |
1154 DEFUN ("character-to-event", Fcharacter_to_event, 1, 4, 0, /* | 1158 DEFUN ("character-to-event", Fcharacter_to_event, 1, 4, 0, /* |
1155 Converts a keystroke specifier into an event structure, replete with | 1159 Convert keystroke CH into an event structure ,replete with bucky bits. |
1156 bucky bits. The keystroke is the first argument, and the event to fill | 1160 The keystroke is the first argument, and the event to fill |
1157 in is the second. This function contains knowledge about what the codes | 1161 in is the second. This function contains knowledge about what the codes |
1158 ``mean'' -- for example, the number 9 is converted to the character ``Tab'', | 1162 ``mean'' -- for example, the number 9 is converted to the character ``Tab'', |
1159 not the distinct character ``Control-I''. | 1163 not the distinct character ``Control-I''. |
1160 | 1164 |
1161 Note that CH (the keystroke specifier) can be an integer, a character, | 1165 Note that CH (the keystroke specifier) can be an integer, a character, |
1745 Lisp_Object *obj1, Lisp_Object *obj2) | 1749 Lisp_Object *obj1, Lisp_Object *obj2) |
1746 { | 1750 { |
1747 int pix_x = 0; | 1751 int pix_x = 0; |
1748 int pix_y = 0; | 1752 int pix_y = 0; |
1749 int result; | 1753 int result; |
1750 Lisp_Object frame = Qnil; | 1754 Lisp_Object frame; |
1751 | 1755 |
1752 int ret_x, ret_y, ret_obj_x, ret_obj_y; | 1756 int ret_x, ret_y, ret_obj_x, ret_obj_y; |
1753 struct window *ret_w; | 1757 struct window *ret_w; |
1754 Bufpos ret_bufp, ret_closest; | 1758 Bufpos ret_bufp, ret_closest; |
1755 Charcount ret_modeline_closest; | 1759 Charcount ret_modeline_closest; |
2067 | 2071 |
2068 int result = event_pixel_translation (event, 0, 0, 0, 0, 0, 0, 0, 0, &button, 0); | 2072 int result = event_pixel_translation (event, 0, 0, 0, 0, 0, 0, 0, 0, &button, 0); |
2069 | 2073 |
2070 return result == OVER_TOOLBAR && TOOLBAR_BUTTONP (button) ? button : Qnil; | 2074 return result == OVER_TOOLBAR && TOOLBAR_BUTTONP (button) ? button : Qnil; |
2071 #else | 2075 #else |
2072 return Qnil; | 2076 return Qnil; |
2073 #endif | 2077 #endif |
2074 } | 2078 } |
2075 | 2079 |
2076 DEFUN ("event-process", Fevent_process, 1, 1, 0, /* | 2080 DEFUN ("event-process", Fevent_process, 1, 1, 0, /* |
2077 Return the process of the given process-output event. | 2081 Return the process of the given process-output event. |
2086 Return the callback function of EVENT. | 2090 Return the callback function of EVENT. |
2087 EVENT should be a timeout, misc-user, or eval event. | 2091 EVENT should be a timeout, misc-user, or eval event. |
2088 */ | 2092 */ |
2089 (event)) | 2093 (event)) |
2090 { | 2094 { |
2095 again: | |
2091 CHECK_LIVE_EVENT (event); | 2096 CHECK_LIVE_EVENT (event); |
2092 switch (XEVENT (event)->event_type) | 2097 switch (XEVENT (event)->event_type) |
2093 { | 2098 { |
2094 case timeout_event: | 2099 case timeout_event: |
2095 return XEVENT (event)->event.timeout.function; | 2100 return XEVENT (event)->event.timeout.function; |
2096 case misc_user_event: | 2101 case misc_user_event: |
2097 case eval_event: | 2102 case eval_event: |
2098 return XEVENT (event)->event.eval.function; | 2103 return XEVENT (event)->event.eval.function; |
2099 default: | 2104 default: |
2100 return wrong_type_argument (intern ("timeout-or-eval-event-p"), event); | 2105 event = wrong_type_argument (intern ("timeout-or-eval-event-p"), event); |
2106 goto again; | |
2101 } | 2107 } |
2102 } | 2108 } |
2103 | 2109 |
2104 DEFUN ("event-object", Fevent_object, 1, 1, 0, /* | 2110 DEFUN ("event-object", Fevent_object, 1, 1, 0, /* |
2105 Return the callback function argument of EVENT. | 2111 Return the callback function argument of EVENT. |
2156 | 2162 |
2157 CHECK_LIVE_EVENT (event); | 2163 CHECK_LIVE_EVENT (event); |
2158 e = XEVENT (event); | 2164 e = XEVENT (event); |
2159 GCPRO1 (props); | 2165 GCPRO1 (props); |
2160 | 2166 |
2161 props = Fcons (Qtimestamp, Fcons (Fevent_timestamp (event), props)); | 2167 props = cons3 (Qtimestamp, Fevent_timestamp (event), props); |
2162 | 2168 |
2163 switch (e->event_type) | 2169 switch (e->event_type) |
2164 { | 2170 { |
2165 case process_event: | 2171 case process_event: |
2166 props = Fcons (Qprocess, Fcons (e->event.process.process, props)); | 2172 props = cons3 (Qprocess, e->event.process.process, props); |
2167 break; | 2173 break; |
2168 | 2174 |
2169 case timeout_event: | 2175 case timeout_event: |
2170 props = Fcons (Qobject, Fcons (Fevent_object (event), props)); | 2176 props = cons3 (Qobject, Fevent_object (event), props); |
2171 props = Fcons (Qfunction, Fcons (Fevent_function (event), props)); | 2177 props = cons3 (Qfunction, Fevent_function (event), props); |
2172 props = Fcons (Qid, Fcons (make_int (e->event.timeout.id_number), | 2178 props = cons3 (Qid, make_int (e->event.timeout.id_number), props); |
2173 props)); | |
2174 break; | 2179 break; |
2175 | 2180 |
2176 case key_press_event: | 2181 case key_press_event: |
2177 props = Fcons (Qmodifiers, Fcons (Fevent_modifiers (event), props)); | 2182 props = cons3 (Qmodifiers, Fevent_modifiers (event), props); |
2178 props = Fcons (Qkey, Fcons (Fevent_key (event), props)); | 2183 props = cons3 (Qkey, Fevent_key (event), props); |
2179 break; | 2184 break; |
2180 | 2185 |
2181 case button_press_event: | 2186 case button_press_event: |
2182 case button_release_event: | 2187 case button_release_event: |
2183 props = Fcons (Qy, Fcons (Fevent_y_pixel (event), props)); | 2188 props = cons3 (Qy, Fevent_y_pixel (event), props); |
2184 props = Fcons (Qx, Fcons (Fevent_x_pixel (event), props)); | 2189 props = cons3 (Qx, Fevent_x_pixel (event), props); |
2185 props = Fcons (Qmodifiers, Fcons (Fevent_modifiers (event), props)); | 2190 props = cons3 (Qmodifiers, Fevent_modifiers (event), props); |
2186 props = Fcons (Qbutton, Fcons (Fevent_button (event), props)); | 2191 props = cons3 (Qbutton, Fevent_button (event), props); |
2187 break; | 2192 break; |
2188 | 2193 |
2189 case pointer_motion_event: | 2194 case pointer_motion_event: |
2190 props = Fcons (Qmodifiers, Fcons (Fevent_modifiers (event), props)); | 2195 props = cons3 (Qmodifiers, Fevent_modifiers (event), props); |
2191 props = Fcons (Qy, Fcons (Fevent_y_pixel (event), props)); | 2196 props = cons3 (Qy, Fevent_y_pixel (event), props); |
2192 props = Fcons (Qx, Fcons (Fevent_x_pixel (event), props)); | 2197 props = cons3 (Qx, Fevent_x_pixel (event), props); |
2193 break; | 2198 break; |
2194 | 2199 |
2195 case misc_user_event: | 2200 case misc_user_event: |
2196 case eval_event: | 2201 case eval_event: |
2197 props = Fcons (Qobject, Fcons (Fevent_object (event), props)); | 2202 props = cons3 (Qobject, Fevent_object (event), props); |
2198 props = Fcons (Qfunction, Fcons (Fevent_function (event), props)); | 2203 props = cons3 (Qfunction, Fevent_function (event), props); |
2199 break; | 2204 break; |
2200 | 2205 |
2201 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS) | 2206 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS) |
2202 case dnd_drop_event: | 2207 case dnd_drop_event: |
2203 props = Fcons (Qy, Fcons (Fevent_y_pixel (event), props)); | 2208 props = cons3 (Qy, Fevent_y_pixel (event), props); |
2204 props = Fcons (Qx, Fcons (Fevent_x_pixel (event), props)); | 2209 props = cons3 (Qx, Fevent_x_pixel (event), props); |
2205 props = Fcons (Qmodifiers, Fcons (Fevent_modifiers (event), props)); | 2210 props = cons3 (Qmodifiers, Fevent_modifiers (event), props); |
2206 props = Fcons (Qbutton, Fcons (Fevent_button (event), props)); | 2211 props = cons3 (Qbutton, Fevent_button (event), props); |
2207 props = Fcons (Qdnd_data, Fcons (Fevent_drag_and_drop_data (event), props)); | 2212 props = cons3 (Qdnd_data, Fevent_drag_and_drop_data (event), props); |
2208 break; | 2213 break; |
2209 #endif | 2214 #endif |
2210 | 2215 |
2211 case magic_eval_event: | 2216 case magic_eval_event: |
2212 case magic_event: | 2217 case magic_event: |
2219 default: | 2224 default: |
2220 abort (); | 2225 abort (); |
2221 break; /* not reached; warning suppression */ | 2226 break; /* not reached; warning suppression */ |
2222 } | 2227 } |
2223 | 2228 |
2224 props = Fcons (Qchannel, Fcons (Fevent_channel (event), props)); | 2229 props = cons3 (Qchannel, Fevent_channel (event), props); |
2225 UNGCPRO; | 2230 UNGCPRO; |
2226 | 2231 |
2227 return props; | 2232 return props; |
2228 } | 2233 } |
2229 | 2234 |