816 views
in Platform Packages by

Hello, 

I'd like to implement the multi touch capability for the GUI.

I'd like to know if you have any example how to implement the code in the firmware side: all your examples are made for single touch)

I didn't find any documentation for CoreRoot__DriveCursorHitting() or CoreRoot__DriveCursorMovenent() or any other kind of related function.

Here below a piece of code from the standard template file:

touchcount = GetTouchPosition(&touchPos);
if (touchcount)
{
     /* 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;
        }

 

1 Answer

0 votes
by

Hello Stefano,

the functions CoreRoot__DriveCursorMovement() or CoreRoot__DriveCursorHitting() are in fact methods of the Core::Root class. These methods exists as interface to feed the GUI application with touch events generated by a single touch screen device.

The class Core::Root implements also the methods DriveMultiTouchHitting() and DriveMultiTouchMovement(). These methods are intended to feed the application with events generated by a multi-touch screen device. The usage of the methods is similar to the single-touch version with the unique exception, that you have to provide the finger-number in an additional parameter.

Thus to feed the application with multi-touch events use the corresponding functions CoreRoot__DriveMultiTouchMovement() and CoreRoot__DriveMultiTouchHitting().

Hope it helps you.

Best regards

Paul Banach

by
Dear Paul,

could you please let me know wich parameters I have to pass to the function?

I didn't find any kind of docunentation how to use these functions in firmware side.
by
Hello Stefao,

please see the red underlined links in my answer above. The functions are in fact methods of the class Core::Root. These are documented there.

Best regards

Paul Banach
by

Paul, 

I don't need the documenation of Embedded wizard function side, I need the prototype of the C funtion in order to modify the code inside the firmware.

What are the parameters of CoreRoot__DriveMultiTouchMovement() and CoreRoot__DriveMultiTouchHitting()?

Where Can I find this info ?

by

Hello Stefano,

the C functions are generated from the original Core::Root methods. There is no alternative implementation nor documentaion of the functions. To understand how generated code and native C code do interact please see the chapter Integrating with the device.

You can also search the genetated code for these functions e.g. CoreRoot__DriveMultiTouchMovement(), etc. and study its declaration.

Best regards

Paul Banach

by

Paul,

I'll try to ask you the question in a different way:

I'm writing the interface from my board to the Embedded wizard GUI.

Inside the main loop of my firmware I need to manage the touch event generated from my driver and pass it to the GUI.

main()

{

if (touch)

   CoreRoot__DriveMultiTouchMovement(?????, ????, ????, ????, ???)

}

how many parameters, what kind of parameters, what is the meaning of the parameters,  have I to pass to the function? 

 

by

Hello Stefano,

following is the declaration of the functions I found in the generated code:

XBool CoreRoot__DriveMultiTouchMovement( void* _this, XInt32 aFinger, XPoint aPos );

XBool CoreRoot__DriveMultiTouchHitting( void* _this, XBool aDown, XInt32 aFinger, 
  XPoint aPos );

Best regards

Paul Banach

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

...