comparison src/keyboard.c @ 732:a8d94735277e

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Tue, 30 Jun 1992 13:54:21 +0000
parents 540b047ece4d
children e4093444f9f8
comparison
equal deleted inserted replaced
731:5c6db33a9ef6 732:a8d94735277e
308 Lisp_Object Qevent_kind; 308 Lisp_Object Qevent_kind;
309 Lisp_Object Qevent_unmodified; 309 Lisp_Object Qevent_unmodified;
310 310
311 /* Symbols to use for non-text mouse positions. */ 311 /* Symbols to use for non-text mouse positions. */
312 Lisp_Object Qmode_line; 312 Lisp_Object Qmode_line;
313 Lisp_Object Qvertical_split; 313 Lisp_Object Qvertical_line;
314 314
315 315
316 /* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt 316 /* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt
317 happens. */ 317 happens. */
318 EMACS_TIME *input_available_clear_time; 318 EMACS_TIME *input_available_clear_time;
1623 XSET (obj, Lisp_Int, XINT (obj) & (meta_key ? 0377 : 0177)); 1623 XSET (obj, Lisp_Int, XINT (obj) & (meta_key ? 0377 : 0177));
1624 } 1624 }
1625 else if (do_mouse_tracking && mouse_moved) 1625 else if (do_mouse_tracking && mouse_moved)
1626 { 1626 {
1627 SCREEN_PTR screen; 1627 SCREEN_PTR screen;
1628 Lisp_Object x, y, time; 1628 Lisp_Object x, y;
1629 unsigned long time;
1629 1630
1630 (*mouse_position_hook) (&screen, &x, &y, &time); 1631 (*mouse_position_hook) (&screen, &x, &y, &time);
1631 XSET (Vlast_event_screen, Lisp_Screen, screen); 1632 XSET (Vlast_event_screen, Lisp_Screen, screen);
1632 1633
1633 obj = make_lispy_movement (screen, x, y, time); 1634 obj = make_lispy_movement (screen, x, y, time);
1777 - XINT (XWINDOW (window)->top))); 1778 - XINT (XWINDOW (window)->top)));
1778 1779
1779 if (part == 1) 1780 if (part == 1)
1780 posn = Qmode_line; 1781 posn = Qmode_line;
1781 else if (part == 2) 1782 else if (part == 2)
1782 posn = Qvertical_split; 1783 posn = Qvertical_line;
1783 else 1784 else
1784 XSET (posn, Lisp_Int, 1785 XSET (posn, Lisp_Int,
1785 buffer_posn_from_coords (XWINDOW (window), 1786 buffer_posn_from_coords (XWINDOW (window),
1786 XINT (event->x), 1787 XINT (event->x),
1787 XINT (event->y))); 1788 XINT (event->y)));
1829 1830
1830 static Lisp_Object 1831 static Lisp_Object
1831 make_lispy_movement (screen, x, y, time) 1832 make_lispy_movement (screen, x, y, time)
1832 SCREEN_PTR screen; 1833 SCREEN_PTR screen;
1833 Lisp_Object x, y; 1834 Lisp_Object x, y;
1834 Lisp_Object time; 1835 unsigned long time;
1835 { 1836 {
1836 Lisp_Object window; 1837 Lisp_Object window;
1837 int ix, iy; 1838 int ix, iy;
1838 Lisp_Object posn; 1839 Lisp_Object posn;
1839 int part; 1840 int part;
1850 ix -= XINT (XWINDOW (window)->left); 1851 ix -= XINT (XWINDOW (window)->left);
1851 iy -= XINT (XWINDOW (window)->top); 1852 iy -= XINT (XWINDOW (window)->top);
1852 if (part == 1) 1853 if (part == 1)
1853 posn = Qmode_line; 1854 posn = Qmode_line;
1854 else if (part == 2) 1855 else if (part == 2)
1855 posn = Qvertical_split; 1856 posn = Qvertical_line;
1856 else 1857 else
1857 XSET (posn, Lisp_Int, buffer_posn_from_coords (XWINDOW (window), 1858 XSET (posn, Lisp_Int, buffer_posn_from_coords (XWINDOW (window),
1858 ix, iy)); 1859 ix, iy));
1859 } 1860 }
1860 1861
1862 XSETINT (y, iy); 1863 XSETINT (y, iy);
1863 return Fcons (Qmouse_movement, 1864 return Fcons (Qmouse_movement,
1864 Fcons (window, 1865 Fcons (window,
1865 Fcons (posn, 1866 Fcons (posn,
1866 Fcons (Fcons (x, y), 1867 Fcons (Fcons (x, y),
1867 Fcons (time, Qnil))))); 1868 Fcons (make_number (time), Qnil)))));
1868 } 1869 }
1869 1870
1870 1871
1871 1872
1872 /* Place the written representation of MODIFIERS in BUF, '\0'-terminated, 1873 /* Place the written representation of MODIFIERS in BUF, '\0'-terminated,
2636 if (XTYPE (key) == Lisp_Int && XINT (key) < 0) 2637 if (XTYPE (key) == Lisp_Int && XINT (key) < 0)
2637 return 0; 2638 return 0;
2638 2639
2639 Vquit_flag = Qnil; 2640 Vquit_flag = Qnil;
2640 2641
2642 #ifdef MULTI_SCREEN
2641 /* What buffer was this event typed/moused at? */ 2643 /* What buffer was this event typed/moused at? */
2642 if (XTYPE (key) == Lisp_Int || XTYPE (key) == Lisp_Symbol) 2644 if (XTYPE (key) == Lisp_Int || XTYPE (key) == Lisp_Symbol)
2643 buf = (XBUFFER 2645 buf = (XBUFFER
2644 (XWINDOW 2646 (XWINDOW
2645 (SCREEN_SELECTED_WINDOW 2647 (SCREEN_SELECTED_WINDOW
2672 if (INTERACTIVE) 2674 if (INTERACTIVE)
2673 echo_truncate (echo_start); 2675 echo_truncate (echo_start);
2674 2676
2675 goto restart; 2677 goto restart;
2676 } 2678 }
2679 #endif
2677 } 2680 }
2678 2681
2679 first_binding = (follow_key (key, 2682 first_binding = (follow_key (key,
2680 nmaps - first_binding, 2683 nmaps - first_binding,
2681 current + first_binding, 2684 current + first_binding,
3510 Qmouse_movement = intern ("scrollbar-click"); 3513 Qmouse_movement = intern ("scrollbar-click");
3511 staticpro (&Qmouse_movement); 3514 staticpro (&Qmouse_movement);
3512 3515
3513 Qmode_line = intern ("mode-line"); 3516 Qmode_line = intern ("mode-line");
3514 staticpro (&Qmode_line); 3517 staticpro (&Qmode_line);
3515 Qvertical_split = intern ("vertical-split"); 3518 Qvertical_line = intern ("vertical-line");
3516 staticpro (&Qvertical_split); 3519 staticpro (&Qvertical_line);
3517 3520
3518 Qevent_kind = intern ("event-type"); 3521 Qevent_kind = intern ("event-type");
3519 staticpro (&Qevent_kind); 3522 staticpro (&Qevent_kind);
3520 Qevent_unmodified = intern ("event-unmodified"); 3523 Qevent_unmodified = intern ("event-unmodified");
3521 staticpro (&Qevent_unmodified); 3524 staticpro (&Qevent_unmodified);