Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Using TouchControlOverlay

jnicholl edited this page Nov 7, 2011 · 4 revisions

The code to interface with TouchControlOverlay is fairly minimal.

  1. Create your callback functions. See the API Reference for the function signatures.

  2. Call tco_initialize to create a context handle to use the library. You will need to pass in your current screen context and the struct of callback function pointers created in Step 1 to handle different inputs.

  3. Load the controls by calling tco_loadcontrols and providing the XML file with the control information. If you have uploaded it as an asset in your application, it will be found at the relative path app/native/controls.xml.

  4. Optionally, call tco_showlabels to show the labels on top of the main window.

  5. In your input handling code, call tco_touch when you receive a touch event that you may want the library to handle. It will call the callback functions at this time. You may also wish to call tco_swipedown when a swipe down event occurs, if you wish to show the configuration window.

  6. Call tco_shutdown when your application is shutting down.

Back to home

Clone this wiki locally