# HG changeset patch # User Jason Rumney # Date 1054764352 0 # Node ID cd259af6d62261ef4dcad5538e65a7a1db22b910 # Parent 73188b413b0fb3bc3c609648f0e0215da8374e41 (Qmouse_wheel, mouse_wheel_syms, lispy_mouse_wheel_names): Remove. (syms_of_keyboard): Remove Qmouse_wheel and mouse_wheel_syms. Always define drag_and_drop_syms. diff -r 73188b413b0f -r cd259af6d622 src/keyboard.c --- a/src/keyboard.c Wed Jun 04 22:03:44 2003 +0000 +++ b/src/keyboard.c Wed Jun 04 22:05:52 2003 +0000 @@ -547,9 +547,6 @@ /* Symbols to denote kinds of events. */ Lisp_Object Qfunction_key; Lisp_Object Qmouse_click; -#if defined(MAC_OSX) -Lisp_Object Qmouse_wheel; -#endif #ifdef WINDOWSNT Lisp_Object Qlanguage_change; #endif @@ -4438,9 +4435,6 @@ static Lisp_Object func_key_syms; static Lisp_Object mouse_syms; static Lisp_Object wheel_syms; -#if defined(MAC_OSX) -static Lisp_Object mouse_wheel_syms; -#endif static Lisp_Object drag_n_drop_syms; /* This is a list of keysym codes for special "accent" characters. @@ -4899,21 +4893,6 @@ "wheel-up", "wheel-down" }; -#if defined(MAC_OSX) -/* mouse-wheel events are generated by the wheel on devices such as - the MS Intellimouse. The wheel sits in between the left and right - mouse buttons, and is typically used to scroll or zoom the window - underneath the pointer. mouse-wheel events specify the object on - which they operate, and a delta corresponding to the amount and - direction that the wheel is rotated. Clicking the mouse-wheel - generates a mouse-2 event. */ -static char *lispy_mouse_wheel_names[] = -{ - "mouse-wheel" -}; - -#endif /* MAC_OSX */ - /* drag-n-drop events are generated when a set of selected files are dragged from another application and dropped onto an Emacs window. */ static char *lispy_drag_n_drop_names[] = @@ -5707,80 +5686,6 @@ } } #endif /* WINDOWSNT */ -#if defined(MAC_OSX) - case MOUSE_WHEEL_EVENT: - { - enum window_part part; - FRAME_PTR f = XFRAME (event->frame_or_window); - Lisp_Object window; - Lisp_Object posn; - Lisp_Object head, position; - int row, column; - - /* Ignore mouse events that were made on frame that - have been deleted. */ - if (! FRAME_LIVE_P (f)) - return Qnil; - pixel_to_glyph_coords (f, XINT (event->x), XINT (event->y), - &column, &row, NULL, 1); - window = window_from_coordinates (f, XINT (event->x), - XINT (event->y), - &part, 0, 0, 0); - - if (!WINDOWP (window)) - { - window = event->frame_or_window; - posn = Qnil; - } - else - { - int pixcolumn, pixrow; - column -= WINDOW_LEFT_EDGE_COL (XWINDOW (window)); - row -= WINDOW_TOP_EDGE_LINE (XWINDOW (window)); - glyph_to_pixel_coords (XWINDOW(window), column, row, - &pixcolumn, &pixrow); - XSETINT (event->x, pixcolumn); - XSETINT (event->y, pixrow); - - if (part == ON_MODE_LINE) - posn = Qmode_line; - else if (part == ON_VERTICAL_BORDER) - posn = Qvertical_line; - else if (part == ON_HEADER_LINE) - posn = Qheader_line; - else - { - Lisp_Object object; - struct display_pos p; - buffer_posn_from_coords (XWINDOW (window), &column, &row, - &object, &p); - posn = make_number (CHARPOS (p.pos)); - } - } - - { - Lisp_Object head, position; - - position - = Fcons (window, - Fcons (posn, - Fcons (Fcons (event->x, event->y), - Fcons (make_number (event->timestamp), - Qnil)))); - - head = modify_event_symbol (0, event->modifiers, - Qmouse_wheel, Qnil, - lispy_mouse_wheel_names, - &mouse_wheel_syms, 1); - return Fcons (head, - Fcons (position, - /* Insert 1 here so event-click-count works. */ - Fcons (make_number (1), - Fcons (make_number (event->code), - Qnil)))); - } - } -#endif /* MAC_OSX */ case DRAG_N_DROP_EVENT: { @@ -10868,10 +10773,6 @@ staticpro (&Qfunction_key); Qmouse_click = intern ("mouse-click"); staticpro (&Qmouse_click); -#if defined(MAC_OSX) - Qmouse_wheel = intern ("mouse-wheel"); - staticpro (&Qmouse_wheel); -#endif #ifdef WINDOWSNT Qlanguage_change = intern ("language-change"); staticpro (&Qlanguage_change); @@ -11022,12 +10923,8 @@ func_key_syms = Qnil; staticpro (&func_key_syms); -#if defined(MAC_OSX) - mouse_wheel_syms = Qnil; - staticpro (&mouse_wheel_syms); drag_n_drop_syms = Qnil; staticpro (&drag_n_drop_syms); -#endif unread_switch_frame = Qnil; staticpro (&unread_switch_frame);