Gecko:Notes for mouse driver developers on Widnows: Difference between revisions

Jump to navigation Jump to search
Line 5: Line 5:
Gecko supports both '''<code>WM_MOUSEWHEEL</code>''' and '''<code>WM_MOUSEHWHEEL</code>''' messages, so, all mouse drivers and utilities should post (or send) them to Gecko's window.
Gecko supports both '''<code>WM_MOUSEWHEEL</code>''' and '''<code>WM_MOUSEHWHEEL</code>''' messages, so, all mouse drivers and utilities should post (or send) them to Gecko's window.


Be aware, Gecko 1.9.3 and later (Firefox 3.7 and later) is going to support <code>WM_VSCROLL</code> and <code>WM_HSCROLL</code> messages too, however, do '''not''' post/send these messages for the wheel action.  Gecko handles these messages in different path with <code>WM_MOUSEWHEEL</code> and <code>WM_MOUSEHWHEEL</code> because Gecko thinks that the messages are used only for scrolling.  To put it concretely, <code>WM_MOUSEWHEEL</code> and <code>WM_MOUSEHWHEEL</code> messages cause [https://developer.mozilla.org/en/Gecko-Specific_DOM_Events#DOMMouseScroll <code>DOMMouseScroll</code> event] on the web pages, so, web application developers can handle the wheel actions and they can prevent scrolling.  However, <code>WM_VSCROLL</code> and <code>WM_HSCROLL</code> don't cause the DOM event, it only scrolls a scrollable area.
Be aware, Gecko 1.9.3 and later (Firefox 3.7 and later) is going to support <code>WM_VSCROLL</code> and <code>WM_HSCROLL</code> messages too, however, do '''not''' post/send these messages for the wheel action.  Gecko handles these messages in different path with <code>WM_MOUSEWHEEL</code> and <code>WM_MOUSEHWHEEL</code> because Gecko thinks that the messages are used only for scrolling.  To put it concretely, <code>WM_MOUSEWHEEL</code> and <code>WM_MOUSEHWHEEL</code> messages cause [https://developer.mozilla.org/en/Gecko-Specific_DOM_Events#DOMMouseScroll <code>DOMMouseScroll</code> event] on the web pages, so, web application developers can handle the wheel actions and they can prevent scrolling.  However, <code>WM_VSCROLL</code> and <code>WM_HSCROLL</code> don't cause the DOM event, it only scrolls a scrollable area. So, the scrolling by these messages are same as the scrolling by scrollbar operation. I.e., web developers cannot know whether the scrolling is caused by scrollbar operation or mouse wheel action.


= Post/Send the messages to focused Gecko's window =
= Post/Send the messages to focused Gecko's window =
87

edits

Navigation menu