Multi-touch mouse gestures on EeePC - opengl

I have an EeePC 900 running Ubuntu Intrepid Ibex. The touchpad has some simple multi-touch gestures built in - scrolling by dragging with two fingers instead of one for example.
How would I detect multi-touch events in an OpenGL/C application?
Is the touchpad on the EeePC 900 capable of handling rotational and scaling gestures?
The MPX example returns with Only found one master pointer. and the suggested xinput --create-master "ImPS/2 Logitech Wheel Mouse" isn't recognised by xinput. So is the multi-touch scrolling behaviour built-in at a lower level?

(On my Eee 1000)
xev reveals that the two-finger scroll gesture is being turned into clicks of buttons 4 and 5. The three-finger tap is just turned into button 3. I don't think the pad supports any other operations. So it looks like the pad hardware is just generating clicks as though it is a wheel mouse.

I don't own an EeePC, however you may want to check out the MPX API for accessing multiple pointers in X. If you're looking for general multitouch frameworks, there are a few on Google Code.

Related

Are VCL ListViews ListBox DBGrids full touch aware?

Since we have tablets with Windows 10 I have decided to use again Delphi XE7 and VCL to develop for this multitouch devices.
I have found ListView, ListBox and DBGrid seem not have a standard behavior with pan and scroll (just PanUp & PanDown, ScrollUp ScrollDown). DBGrid does not support touching panning. ListBox, seem doesn't control inertial panning like TListview... and ListView react erratically, sometimes "loose" pannings moving scrollbar but not items list.
Have someone tested this controls on Windows 8.1 or Windows 10 using a multitouch tablet ?. Just load components with, let me say 100 items and try to have a simple vertical smooth scroll / pan using fingers.
All together is kind frustrating, and I cannot focus in develop application which is my task.
Question is: Which is the right component or way to use panning (at least vertical panning / Scrolling) with touch screens and working smooth and without problems ? I thought this components should react to standard actions (like PanUp or PanDown) without need to implement the Gesture Manager and control one by one each touch on screen. I would like to receive your kind feedback. Thank You
Conclusion: Many thanks to all who have helped with their comments. My own conclusion is Delphi is not ready to be used as a RAD for touching screens. The touching implementation is poor and need too much work for very standard using. Should not be necessary invent the wheel again for a very common and standard controls. Actually there are more mobile device users, than desktop users. Perhaps Embarcadero should decide to pay attention to this matter, and give well finished tools wich meet the OS touch and feel controls.
Let me add the same in FM using TGrid works fine.

qt mouse events equal to touch screen events?

I am developing a tiny app that will run on beagleboard with 7" inch touch screen, but I haven't got it so far and I am working as developing standard desktop app. Are mouse events equal to touch screen events? I am working on QTableView and I've disable mouse drag multiple selection via:
void CTableView::mouseMoveEvent(QMouseEvent* event)
{
if(this->state()!=DragSelectingState)
QTableView::mouseMoveEvent(event);
}
Will this code also work on touch screen if user will try to select multiple cells with fingers?
Normally this strongly depends on you touch-driver. Mostly the touch events will be interpreted as left mouse clicks. And depending on your touch-driver somethimes you have to ensure that the touchdriver is calibrated in the right way ( for instance if the touch driver needs to know the origin of a touch event to get the right coordinates ).
For multitouch-device-handling I strogly recommend to use the QML-stuff for your user interface with a MultiPointTouchArea: http://qt-project.org/doc/qt-5/qml-qtquick-multipointtoucharea.html#details . You can easily connect the QML-stuff to your c++-logic as well.

Two finger moving smooth and kinetic scrolling with trackpad or touchpad?

I am working on a Qt application which resembles hex editor for Mac.
(picture from Google)
It has a very large portion of data to scroll vertically(upward and downward) because it shows all large files data in hex format.
In my application, I'd like to add two finger smooth scrolling in both direction: up and down like that in Macbook Air two finger scrolling.
It work properly with mouse wheel but not with trackpad two finger move scrolling.
If someone has a solution, please help me out. Thanks in advance.
The scroller allows for gestures like click and drag to do kinetic scrolling.
http://qt-project.org/doc/qt-5/qscroller.html#details
Note on this page:
QScroller::TouchGesture 0
The gesture recognizer will only trigger on touch events. Specifically it will react on single touch points when using a touch screen and dual touch points when using a touchpad.
So then the example they give would turn into this for you:
QWidget *w = ...;
QScroller::grabGesture(w, QScroller::TouchGesture);
There is more on doing new things with touch screens and touch pads by handling the QTouchEvent:
http://qt-project.org/doc/qt-5/qtouchevent.html#details
Hope that helps.

C++ DirectInput Mouse Scroll Wheel with a Laptop Touchpad

When using DirectInput, it is my understanding that the mouse wheel delta should be stored in DIMOUSESTATE objects lZ variable. However, when I am scrolling with my laptop touchpad instead of an actual mouse with a wheel, it seems like the scroll is not being recognized since 1Z remains zero always. Is there a better solution than using WM_MOUSEWHEEL if that will even work? Since I am currently using DirectInput for the rest of the input I would like to stay consistent and use that but how can I get the scroll information from the touchpad?
Thanks!

Windows 7, cannot receive multitouch events on two different controls

I have Win 7 OS on my machine and have Multi-touch capable monitor which supports up to 2 simultaneous touches.
I have created MFC Dialog application with two sliders and am trying to move them simultaneously with two fingers, but can only move one slider. If I touch the dialog box with two fingers then it receives two touches but two different sliders don't receive simultaneous touches.
On MS Paint I can draw using two fingers.
I also tried to search for multitouch application involving more than one controls but could not find any, and I am starting to wonder if its possible at all on Windows 7
Thanks.
You need not only your OS to support multi-touch, but your controls too. Have you done the Hands on Labs for MFC and Multitouch? http://channel9.msdn.com/learn/courses/Windows7/Multitouch has several Native and MFC examples.
If you don't have a real need in your app for two sliders moving at once, but were just trying it out, try something a little different, like zooming by pinching or panning by dragging two fingers, rotating etc. If you want multiple independent touches (ie not interpreted as a pinch zoom) the source code for games is your best examples.
if using WPF is feasible, the "Surface Toolkit for Windows Touch" provides a full suite of touch optimized controls that can be used simultaneously.
you could perhaps host the WPF controls inside your MFC UI but be aware that all of the WPF controls would need to be in a single hwnd - Win7 has an OS limitation that multitouch can only be done with one hwnd at a time.