Enabling Multi-Touch in the Emulator Tutorial

This topic describes how to configure the Symbian emulator to enable a multi-touch environment.

Variant: ScreenPlay. Target audience: Application developers.

This topic builds on Multi-Touch Support in the Emulator Overview.

Configuring the emulator

Make sure that two or more mice are plugged in and detected on the Windows PC on which the emulator will run. The number of detected mice can be from two up to the maximum number defined in the HAL HALData::EPointerMaxPointers attribute.

  1. Add the following lines to the \epoc32\data\epoc.ini file. These lines enable ScreenPlay and multi-touch.

    SYMBIAN_BASE_USE_GCE ON
    EnableMultiTouch ON
  2. Specify the MultiTouchProximityStep and MultiTouchPressureStep values in the \epoc32\data\epoc.ini file to define the proximity and pressure steps.

    MultiTouchProximityStep 10
    MultiTouchPressureStep 200
    

    If the above two options are not defined in the epoc.ini file, the default proximity and pressure steps are taken from the following HAL attributes.

    HALData::EPointer3DProximityStep
    HALData::EPointer3DPressureStep

Result: Launch the emulator to verify that the mice are detected and displayed inside the application window area. When you move a mouse or scroll the mouse wheel, its X, Y and Z values are reflected in the status bar.

Enabling and disabling multi-touch

Multi-touch is only required by UI applications. Therefore, multi-touch is enabled inside the orange rectangular area shown on the following diagram. Inside the area two Windows pointers are displayed. The one numbered zero is the system pointer and the other is used only for multi-touch purposes. The first mouse to report events to the emulator is automatically taken as the primary mouse, which owns the Windows system pointer.

Figure 1. Multi-touch area

System pointer. Once the system pointer moves outside multi-touch area, multi-touch is temporarily disabled and standard emulator pointer behavior is resumed. This means that only one Windows system pointer is displayed and it is controlled by both mice.

Non-system pointer. If the non-system pointer moves out of the multi-touch area, the pointer just disappears from the screen. Disabling multi-touch is then not necessary because the system pointer behaves normally inside the multi-touch area. Moving the non-system pointer back into the area makes it reappear on the screen.