Mercurial > hg > xemacs-beta
comparison src/events.c @ 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:35 +0200 |
parents | 376386a54a3c |
children | 859a2309aef8 |
comparison
equal
deleted
inserted
replaced
1:c0c6a60d29db | 2:ac2d302a0011 |
---|---|
414 Allow the given event structure to be reused. | 414 Allow the given event structure to be reused. |
415 You MUST NOT use this event object after calling this function with it. | 415 You MUST NOT use this event object after calling this function with it. |
416 You will lose. It is not necessary to call this function, as event | 416 You will lose. It is not necessary to call this function, as event |
417 objects are garbage-collected like all other objects; however, it may | 417 objects are garbage-collected like all other objects; however, it may |
418 be more efficient to explicitly deallocate events when you are sure | 418 be more efficient to explicitly deallocate events when you are sure |
419 that that is safe. | 419 that it is safe to do so. |
420 */ ) | 420 */ ) |
421 (event) | 421 (event) |
422 Lisp_Object event; | 422 Lisp_Object event; |
423 { | 423 { |
424 CHECK_EVENT (event); | 424 CHECK_EVENT (event); |
711 else if (c == 127) | 711 else if (c == 127) |
712 k = QKdelete; | 712 k = QKdelete; |
713 else if (c == ' ') | 713 else if (c == ' ') |
714 k = QKspace; | 714 k = QKspace; |
715 | 715 |
716 event->event_type = key_press_event; | 716 event->event_type = key_press_event; |
717 event->timestamp = 0; /* #### */ | 717 event->timestamp = 0; /* #### */ |
718 event->channel = make_console (con); | 718 event->channel = make_console (con); |
719 event->event.key.keysym = (!NILP (k) ? k : make_char (c)); | 719 event->event.key.keysym = (!NILP (k) ? k : make_char (c)); |
720 event->event.key.modifiers = m; | 720 event->event.key.modifiers = m; |
721 } | 721 } |
722 | 722 |
723 | 723 |
724 /* This variable controls what character name -> character code mapping | 724 /* This variable controls what character name -> character code mapping |
725 we are using. Window-system-specific code sets this to some symbol, | 725 we are using. Window-system-specific code sets this to some symbol, |
822 return (c < 0 ? Qnil : make_char (c)); | 822 return (c < 0 ? Qnil : make_char (c)); |
823 } | 823 } |
824 | 824 |
825 DEFUN ("character-to-event", Fcharacter_to_event, Scharacter_to_event, | 825 DEFUN ("character-to-event", Fcharacter_to_event, Scharacter_to_event, |
826 1, 4, 0 /* | 826 1, 4, 0 /* |
827 Converts a keystroke specifier intoto an event structure, replete with | 827 Converts a keystroke specifier into an event structure, replete with |
828 bucky bits. The keystroke is the first argument, and the event to fill | 828 bucky bits. The keystroke is the first argument, and the event to fill |
829 in is the second. This function contains knowledge about what the codes | 829 in is the second. This function contains knowledge about what the codes |
830 ``mean'' -- for example, the number 9 is converted to the character ``Tab'', | 830 ``mean'' -- for example, the number 9 is converted to the character ``Tab'', |
831 not the distinct character ``Control-I''. | 831 not the distinct character ``Control-I''. |
832 | 832 |
833 Note that CH (the keystroke specifier) can be an integer, a character, | 833 Note that CH (the keystroke specifier) can be an integer, a character, |
834 a symbol such as 'clear, or a list such as '(control backspace). | 834 a symbol such as 'clear, or a list such as '(control backspace). |
835 | 835 |
836 If the optional second argument is an event, it is modified; otherwise, a | 836 If the optional second argument is an event, it is modified; |
837 new event object is created. | 837 otherwise, a new event object is created. |
838 | 838 |
839 Optional third arg CONSOLE is the console to store in the event, and defaults | 839 Optional third arg CONSOLE is the console to store in the event, and |
840 to the selected console. | 840 defaults to the selected console. |
841 | 841 |
842 If CH is an integer or character, the high bit may be interpreted as the | 842 If CH is an integer or character, the high bit may be interpreted as the |
843 meta key. (This is done for backward compatibility in lots of places.) | 843 meta key. (This is done for backward compatibility in lots of places.) |
844 If USE-CONSOLE-META-FLAG is nil, this will always be the case. If | 844 If USE-CONSOLE-META-FLAG is nil, this will always be the case. If |
845 USE-CONSOLE-META-FLAG is non-nil, the `meta' flag for CONSOLE affects | 845 USE-CONSOLE-META-FLAG is non-nil, the `meta' flag for CONSOLE affects |
846 whether the high bit is interpreted as a meta key. (See `set-input-mode'.) | 846 whether the high bit is interpreted as a meta key. (See `set-input-mode'.) |
847 If you don't want this silly meta interpretation done, you should pass | 847 If you don't want this silly meta interpretation done, you should pass |
848 in a list containing the character. | 848 in a list containing the character. |
849 | 849 |
850 Beware that character-to-event and event-to-character are not strictly | 850 Beware that character-to-event and event-to-character are not strictly |
851 inverse functions, since events contain much more information than the | 851 inverse functions, since events contain much more information than the |
852 ASCII character set can encode. | 852 ASCII character set can encode. |
853 */ ) | 853 */ ) |
854 (ch, event, console, use_console_meta_flag) | 854 (ch, event, console, use_console_meta_flag) |
855 Lisp_Object ch, event, console, use_console_meta_flag; | 855 Lisp_Object ch, event, console, use_console_meta_flag; |
856 { | 856 { |
857 struct console *con = decode_console (console); | 857 struct console *con = decode_console (console); |