Bachelor Thesis - Computer Graphics Group
Bachelor Thesis - Computer Graphics Group
Bachelor Thesis - Computer Graphics Group
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 4<br />
Gesture capture library<br />
As mentioned in the Challenges section of the Introduction, the first and fundamental<br />
problem that we have to solve is how to detect gestures in any Windows<br />
application. The reason for the decision to separate the gesture detection code<br />
into a separate library was not only to comply with the modularity goal. It<br />
also proved to be an inevitable consequence of the final mouse input capturing<br />
solution.<br />
4.1 Mouse input detection & filtering<br />
According to the gesture definition, a gesture consists of elementary mouse<br />
input events. Therefore:<br />
• we need to detect or be notified of the basic mouse input events: key<br />
press/release, mouse cursor movement, and wheel scrolling<br />
• we must be able to prevent the affected program from receiving these<br />
events while the gesture is being performed. Otherwise, two actions will<br />
be performed. The application’s default response to mouse dragging as<br />
well as a possible command associated with the gesture<br />
The traditional mouse input mechanism in form of Qt events or direct handling<br />
of Windows messages cannot be used. The reason is simple; mouse messages<br />
are only sent to the window hovered by the mouse cursor. Something more<br />
sophisticated has to be used.<br />
While investigating the possibilities, several approaches have been considered,<br />
ranging from the simplest ones to the most advanced. The following ideas<br />
seem plausible:<br />
20