comparison src/events.h @ 404:2f8bb876ab1d r21-2-32

Import from CVS: tag r21-2-32
author cvs
date Mon, 13 Aug 2007 11:16:07 +0200
parents 74fd4e045ea6
children 697ef44129c6
comparison
equal deleted inserted replaced
403:9f011ab08d48 404:2f8bb876ab1d
327 void (*select_console_cb) (struct console *); 327 void (*select_console_cb) (struct console *);
328 void (*unselect_console_cb) (struct console *); 328 void (*unselect_console_cb) (struct console *);
329 void (*select_process_cb) (Lisp_Process *); 329 void (*select_process_cb) (Lisp_Process *);
330 void (*unselect_process_cb) (Lisp_Process *); 330 void (*unselect_process_cb) (Lisp_Process *);
331 void (*quit_p_cb) (void); 331 void (*quit_p_cb) (void);
332 void (*force_event_pending) (struct frame* f);
332 USID (*create_stream_pair_cb) (void* /* inhandle*/, void* /*outhandle*/ , 333 USID (*create_stream_pair_cb) (void* /* inhandle*/, void* /*outhandle*/ ,
333 Lisp_Object* /* instream */, 334 Lisp_Object* /* instream */,
334 Lisp_Object* /* outstream */, 335 Lisp_Object* /* outstream */,
335 int /* flags */); 336 int /* flags */);
336 USID (*delete_stream_pair_cb) (Lisp_Object /* instream */, 337 USID (*delete_stream_pair_cb) (Lisp_Object /* instream */,
364 365
365 366
366 struct key_data 367 struct key_data
367 { 368 {
368 Lisp_Object keysym; 369 Lisp_Object keysym;
369 unsigned char modifiers; 370 int modifiers;
370 }; 371 };
371 372
372 struct button_data 373 struct button_data
373 { 374 {
374 int button; 375 int button;
375 unsigned char modifiers; 376 int modifiers;
376 int x, y; 377 int x, y;
377 }; 378 };
378 379
379 struct motion_data 380 struct motion_data
380 { 381 {
381 int x, y; 382 int x, y;
382 unsigned char modifiers; 383 int modifiers;
383 }; 384 };
384 385
385 struct process_data 386 struct process_data
386 { 387 {
387 Lisp_Object process; 388 Lisp_Object process;
404 struct misc_user_data 405 struct misc_user_data
405 { 406 {
406 Lisp_Object function; 407 Lisp_Object function;
407 Lisp_Object object; 408 Lisp_Object object;
408 int button; 409 int button;
409 unsigned char modifiers; 410 int modifiers;
410 int x, y; 411 int x, y;
411 }; 412 };
412 413
413 struct magic_eval_data 414 struct magic_eval_data
414 { 415 {
530 531
531 extern Lisp_Object QKbackspace, QKdelete, QKescape, QKlinefeed, QKreturn; 532 extern Lisp_Object QKbackspace, QKdelete, QKescape, QKlinefeed, QKreturn;
532 extern Lisp_Object QKspace, QKtab, Qmouse_event_p, Vcharacter_set_property; 533 extern Lisp_Object QKspace, QKtab, Qmouse_event_p, Vcharacter_set_property;
533 extern Lisp_Object Qcancel_mode_internal; 534 extern Lisp_Object Qcancel_mode_internal;
534 535
535 /* Note: under X Windows, MOD_ALT is generated by the Alt key if there are 536 /* Note: under X Windows, XEMACS_MOD_ALT is generated by the Alt key if there are
536 both Alt and Meta keys. If there are no Meta keys, then Alt generates 537 both Alt and Meta keys. If there are no Meta keys, then Alt generates
537 MOD_META instead. 538 XEMACS_MOD_META instead.
538 */ 539 */
539 540
540 #ifdef emacs 541 #ifdef emacs
541 /* Maybe this should be trickier */ 542 /* Maybe this should be trickier */
542 #define KEYSYM(x) (intern (x)) 543 #define KEYSYM(x) (intern (x))
659 first console is tty, even if HAVE_X_WINDOWS is defined */ 660 first console is tty, even if HAVE_X_WINDOWS is defined */
660 /* #define DEBUG_TTY_EVENT_STREAM */ 661 /* #define DEBUG_TTY_EVENT_STREAM */
661 662
662 #endif /* emacs */ 663 #endif /* emacs */
663 664
665 /* #### a hack, until accelerator shit is cleaned up */
666
667 /* This structure is what we use to encapsulate the state of a command sequence
668 being composed; key events are executed by adding themselves to the command
669 builder; if the command builder is then complete (does not still represent
670 a prefix key sequence) it executes the corresponding command.
671 */
672 struct command_builder
673 {
674 struct lcrecord_header header;
675 Lisp_Object console; /* back pointer to the console this command
676 builder is for */
677 /* Qnil, or a Lisp_Event representing the first event read
678 * after the last command completed. Threaded. */
679 /* #### NYI */
680 Lisp_Object prefix_events;
681 /* Qnil, or a Lisp_Event representing event in the current
682 * keymap-lookup sequence. Subsequent events are threaded via
683 * the event's next slot */
684 Lisp_Object current_events;
685 /* Last elt of above */
686 Lisp_Object most_current_event;
687 /* Last elt before function map code took over. What this means is:
688 All prefixes up to (but not including) this event have non-nil
689 bindings, but the prefix including this event has a nil binding.
690 Any events in the chain after this one were read solely because
691 we're part of a possible function key. If we end up with
692 something that's not part of a possible function key, we have to
693 unread all of those events. */
694 Lisp_Object last_non_munged_event;
695 /* One set of values for function-key-map, one for key-translation-map */
696 struct munging_key_translation
697 {
698 /* First event that can begin a possible function key sequence
699 (to be translated according to function-key-map). Normally
700 this is the first event in the chain. However, once we've
701 translated a sequence through function-key-map, this will point
702 to the first event after the translated sequence: we don't ever
703 want to translate any events twice through function-key-map, or
704 things could get really screwed up (e.g. if the user created a
705 translation loop). If this is nil, then the next-read event is
706 the first that can begin a function key sequence. */
707 Lisp_Object first_mungeable_event;
708 } munge_me[2];
709
710 Bufbyte *echo_buf;
711 Bytecount echo_buf_length; /* size of echo_buf */
712 Bytecount echo_buf_index; /* index into echo_buf
713 * -1 before doing echoing for new cmd */
714 /* Self-insert-command is magic in that it doesn't always push an undo-
715 boundary: up to 20 consecutive self-inserts can happen before an undo-
716 boundary is pushed. This variable is that counter.
717 */
718 int self_insert_countdown;
719 };
720
664 #endif /* INCLUDED_events_h_ */ 721 #endif /* INCLUDED_events_h_ */