diff options
| author | Jason Rumney | 2007-09-04 21:42:39 +0000 |
|---|---|---|
| committer | Jason Rumney | 2007-09-04 21:42:39 +0000 |
| commit | 13899bc14ce76042d4956a7661955338717d6813 (patch) | |
| tree | 3abaf69a310e00b9d7d53c12056b60d0779a8231 | |
| parent | fd142562c86351997dd876026b7c68e1df349b15 (diff) | |
| download | emacs-13899bc14ce76042d4956a7661955338717d6813.tar.gz emacs-13899bc14ce76042d4956a7661955338717d6813.zip | |
(discard_mouse_events): Discard it.
(make_lispy_event): Translate it to a lisp event.
(lispy_wheel_names): Add wheel-left and right events.
(syms_of_keyboard): Enlarge wheel_syms.
| -rw-r--r-- | src/keyboard.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 635db1eb597..581975afc58 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -4026,6 +4026,7 @@ discard_mouse_events () | |||
| 4026 | 4026 | ||
| 4027 | if (sp->kind == MOUSE_CLICK_EVENT | 4027 | if (sp->kind == MOUSE_CLICK_EVENT |
| 4028 | || sp->kind == WHEEL_EVENT | 4028 | || sp->kind == WHEEL_EVENT |
| 4029 | || sp->kind == HORIZ_WHEEL_EVENT | ||
| 4029 | #ifdef WINDOWSNT | 4030 | #ifdef WINDOWSNT |
| 4030 | || sp->kind == W32_SCROLL_BAR_CLICK_EVENT | 4031 | || sp->kind == W32_SCROLL_BAR_CLICK_EVENT |
| 4031 | #endif | 4032 | #endif |
| @@ -5204,7 +5205,7 @@ Lisp_Object Vlispy_mouse_stem; | |||
| 5204 | 5205 | ||
| 5205 | static char *lispy_wheel_names[] = | 5206 | static char *lispy_wheel_names[] = |
| 5206 | { | 5207 | { |
| 5207 | "wheel-up", "wheel-down" | 5208 | "wheel-up", "wheel-down", "wheel-left", "wheel-right" |
| 5208 | }; | 5209 | }; |
| 5209 | 5210 | ||
| 5210 | /* drag-n-drop events are generated when a set of selected files are | 5211 | /* drag-n-drop events are generated when a set of selected files are |
| @@ -5841,6 +5842,7 @@ make_lispy_event (event) | |||
| 5841 | } | 5842 | } |
| 5842 | 5843 | ||
| 5843 | case WHEEL_EVENT: | 5844 | case WHEEL_EVENT: |
| 5845 | case HORIZ_WHEEL_EVENT: | ||
| 5844 | { | 5846 | { |
| 5845 | Lisp_Object position; | 5847 | Lisp_Object position; |
| 5846 | Lisp_Object head; | 5848 | Lisp_Object head; |
| @@ -5925,6 +5927,9 @@ make_lispy_event (event) | |||
| 5925 | the up_modifier set. */ | 5927 | the up_modifier set. */ |
| 5926 | abort (); | 5928 | abort (); |
| 5927 | 5929 | ||
| 5930 | if (event->kind == HORIZ_WHEEL_EVENT) | ||
| 5931 | symbol_num += 2; | ||
| 5932 | |||
| 5928 | /* Get the symbol we should use for the wheel event. */ | 5933 | /* Get the symbol we should use for the wheel event. */ |
| 5929 | head = modify_event_symbol (symbol_num, | 5934 | head = modify_event_symbol (symbol_num, |
| 5930 | event->modifiers, | 5935 | event->modifiers, |
| @@ -11800,7 +11805,7 @@ syms_of_keyboard () | |||
| 11800 | staticpro (&button_down_location); | 11805 | staticpro (&button_down_location); |
| 11801 | mouse_syms = Fmake_vector (make_number (1), Qnil); | 11806 | mouse_syms = Fmake_vector (make_number (1), Qnil); |
| 11802 | staticpro (&mouse_syms); | 11807 | staticpro (&mouse_syms); |
| 11803 | wheel_syms = Fmake_vector (make_number (2), Qnil); | 11808 | wheel_syms = Fmake_vector (make_number (4), Qnil); |
| 11804 | staticpro (&wheel_syms); | 11809 | staticpro (&wheel_syms); |
| 11805 | 11810 | ||
| 11806 | { | 11811 | { |