Mercurial > emacs
comparison src/w32fns.c @ 21874:c0871d40073e
(msh_mousewheel): New variable.
(w32_msg_pump): Register that Emacs accepts mousewheel events.
(w32_wnd_proc): Check for mousewheel events.
author | Geoff Voelker <voelker@cs.washington.edu> |
---|---|
date | Thu, 30 Apr 1998 17:19:55 +0000 |
parents | 711a61942023 |
children | bc4455bca454 |
comparison
equal
deleted
inserted
replaced
21873:3ab8be88f2ef | 21874:c0871d40073e |
---|---|
173 static int button_state = 0; | 173 static int button_state = 0; |
174 static W32Msg saved_mouse_button_msg; | 174 static W32Msg saved_mouse_button_msg; |
175 static unsigned mouse_button_timer; /* non-zero when timer is active */ | 175 static unsigned mouse_button_timer; /* non-zero when timer is active */ |
176 static W32Msg saved_mouse_move_msg; | 176 static W32Msg saved_mouse_move_msg; |
177 static unsigned mouse_move_timer; | 177 static unsigned mouse_move_timer; |
178 | |
179 /* W95 mousewheel handler */ | |
180 unsigned int msh_mousewheel = 0; | |
178 | 181 |
179 #define MOUSE_BUTTON_ID 1 | 182 #define MOUSE_BUTTON_ID 1 |
180 #define MOUSE_MOVE_ID 2 | 183 #define MOUSE_MOVE_ID 2 |
181 | 184 |
182 /* The below are defined in frame.c. */ | 185 /* The below are defined in frame.c. */ |
3121 | 3124 |
3122 static void | 3125 static void |
3123 w32_msg_pump (deferred_msg * msg_buf) | 3126 w32_msg_pump (deferred_msg * msg_buf) |
3124 { | 3127 { |
3125 MSG msg; | 3128 MSG msg; |
3129 | |
3130 msh_mousewheel = RegisterWindowMessage (MSH_MOUSEWHEEL); | |
3126 | 3131 |
3127 while (GetMessage (&msg, NULL, 0, 0)) | 3132 while (GetMessage (&msg, NULL, 0, 0)) |
3128 { | 3133 { |
3129 if (msg.hwnd == NULL) | 3134 if (msg.hwnd == NULL) |
3130 { | 3135 { |
3906 | 3911 |
3907 return retval; | 3912 return retval; |
3908 } | 3913 } |
3909 | 3914 |
3910 default: | 3915 default: |
3916 /* Check for messages registered at runtime. */ | |
3917 if (msg == msh_mousewheel) | |
3918 { | |
3919 wmsg.dwModifiers = w32_get_modifiers (); | |
3920 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); | |
3921 return 0; | |
3922 } | |
3923 | |
3911 dflt: | 3924 dflt: |
3912 return DefWindowProc (hwnd, msg, wParam, lParam); | 3925 return DefWindowProc (hwnd, msg, wParam, lParam); |
3913 } | 3926 } |
3914 | 3927 |
3915 | 3928 |