[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c |
Date: |
Wed, 04 Jun 2003 18:05:53 -0400 |
Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.749 emacs/src/keyboard.c:1.750
*** emacs/src/keyboard.c:1.749 Sun Jun 1 17:48:53 2003
--- emacs/src/keyboard.c Wed Jun 4 18:05:52 2003
***************
*** 547,555 ****
/* 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
--- 547,552 ----
***************
*** 4438,4446 ****
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.
--- 4435,4440 ----
***************
*** 4899,4919 ****
"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[] =
--- 4893,4898 ----
***************
*** 5707,5786 ****
}
}
#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:
{
--- 5686,5691 ----
***************
*** 10868,10877 ****
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);
--- 10773,10778 ----
***************
*** 11022,11033 ****
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);
--- 10923,10930 ----