Mercurial > emacs
comparison src/macterm.c @ 51464:73188b413b0f
(XTread_socket): Map mouse wheel events to Emacs
WHEEL_EVENT events.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Wed, 04 Jun 2003 22:03:44 +0000 |
parents | f8e097cae353 |
children | 5bc2bb8c1fef |
comparison
equal
deleted
inserted
replaced
51463:26fea2099cbc | 51464:73188b413b0f |
---|---|
7680 typeSInt32, NULL, sizeof (SInt32), | 7680 typeSInt32, NULL, sizeof (SInt32), |
7681 NULL, &delta); | 7681 NULL, &delta); |
7682 GetEventParameter(eventRef, kEventParamMouseLocation, | 7682 GetEventParameter(eventRef, kEventParamMouseLocation, |
7683 typeQDPoint, NULL, sizeof (Point), | 7683 typeQDPoint, NULL, sizeof (Point), |
7684 NULL, &point); | 7684 NULL, &point); |
7685 bufp->kind = MOUSE_WHEEL_EVENT; | 7685 bufp->kind = WHEEL_EVENT; |
7686 bufp->code = delta; | 7686 bufp->code = 0; |
7687 bufp->modifiers = mac_event_to_emacs_modifiers(eventRef); | 7687 bufp->modifiers = (mac_event_to_emacs_modifiers(eventRef) |
7688 | ((delta < 0) ? down_modifier | |
7689 : up_modifier)); | |
7688 SetPort (GetWindowPort (window_ptr)); | 7690 SetPort (GetWindowPort (window_ptr)); |
7689 GlobalToLocal (&point); | 7691 GlobalToLocal (&point); |
7690 XSETINT (bufp->x, point.h); | 7692 XSETINT (bufp->x, point.h); |
7691 XSETINT (bufp->y, point.v); | 7693 XSETINT (bufp->y, point.v); |
7692 XSETFRAME (bufp->frame_or_window, mwp->mFP); | 7694 XSETFRAME (bufp->frame_or_window, mwp->mFP); |