]> git.eshelyaron.com Git - emacs.git/commitdiff
(Qmouse_wheel, mouse_wheel_syms, lispy_mouse_wheel_names): Remove.
authorJason Rumney <jasonr@gnu.org>
Wed, 4 Jun 2003 22:05:52 +0000 (22:05 +0000)
committerJason Rumney <jasonr@gnu.org>
Wed, 4 Jun 2003 22:05:52 +0000 (22:05 +0000)
(syms_of_keyboard): Remove Qmouse_wheel and mouse_wheel_syms.
Always define drag_and_drop_syms.

src/keyboard.c

index a09db16bc6d16da0fc4959381a4e20ffdbb122d6..f73c1b6cc0305d7f18ac7538120151c8b790fa15 100644 (file)
@@ -547,9 +547,6 @@ Lisp_Object Qhelp_echo;
 /* 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 accent_key_syms;
 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 @@ static char *lispy_wheel_names[] =
   "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 @@ make_lispy_event (event)
        }
       }
 #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 @@ syms_of_keyboard ()
   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 @@ syms_of_keyboard ()
   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);