853 views
in GUI Development by
Modern UI applications are processing multi-touch events in order to support multi-touch gestures like 'pinch to zoom'. Please let me know how multi-touch events are handled within Embedded Wizard.

1 Answer

0 votes
by

Since version V6.40 of Embedded Wizard, the development of multi-touch GUI applications is supported. The Mosaic 2.0 framework was enhanced in order to support multi-touch events:

  • The class Core::Root provides two additional methods DriveMultiTouchHitting() and DriveMultiTouchMovement(). These methods are intended to feed the GUI application with touch events received from the underlying target system. You will never need to invoke theses methods directly from your GUI application. Usually the method will be invoked in response to touch events received in the main() message loop from the target specific touch screen driver. For more details see the document 'Mosaic 2.0 User Manual'.
  • The class Core::SimpleTouchHandler has been extended by the property EnableMultiTouch and the variable Finger. The property EnableMultiTouch determines how the touch handler should behave when the user interacts with it by using more then one finger. If this property is false and the handler is actually involved in a user touch interaction then the handler will ignore all additional touch events. Such events can be thus handled by other handlers lying e.g. behind this handler. If this property is true, the handler will receive all affected touch events. In order to distinguish the multiple taps and touches the variable Finger can be evaluated.
    The variable Finger stores the number of the finger associated with the current touch event. This can be useful if the handler is intended to handle multi-touch events. The fingers are numbered with values lying in the range 0 .. 9. For more details see the document 'Mosaic 2.0 User Manual'.

Please note, that the processing of multi-touch events is platform dependent and cannot be tested within the Prototyper.

by

Hello, 

Could you help me to modify the touch handler in order to manage the multitouch?

 

if (EwBspGetTouchPosition(&touchPos))

{

/* begin of touch cycle */
            if ( touched == 0 )
                CoreRoot__DriveCursorHitting( rootObject, 1, 0, touchPos );

            /* movement during touch cycle */
            else if ( touched == 1 )
                CoreRoot__DriveCursorMovement( rootObject, touchPos );

            touched = 1;
            events  = 1;
        }
        /* end of touch cycle */
        else if ( touched == 1 )
        {
            CoreRoot__DriveCursorHitting( rootObject, 0, 0, touchPos );
            touched = 0;
            events  = 1;
        }

 

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...