Murl::ITouchScreen Interface Referenceabstract

The touch screen device interface. More...

#include "murl_i_touch_screen.h"

Inherited by Murl::Input::TouchScreenDevice.

Public Types

enum  EventAction {
  EVENT_ACTION_NONE , EVENT_ACTION_TOUCH , EVENT_ACTION_RELEASE , EVENT_ACTION_MOVE ,
  EVENT_ACTION_CANCEL , NUM_EVENT_ACTIONS
}
 Definition of event actions. More...
 

Public Member Functions

virtual void PostEvent (EventAction action, Real posX, Real posY)=0
 Post the current touch state. More...
 

Detailed Description

The touch screen device interface.

Used by the platform to post events to the device.

Member Enumeration Documentation

◆ EventAction

Definition of event actions.

Enumerator
EVENT_ACTION_NONE 

No action.

EVENT_ACTION_TOUCH 

The touch is pressed, positions are evaluated.

EVENT_ACTION_RELEASE 

The touch is released, positions are evaluated.

EVENT_ACTION_MOVE 

The touch positions are evaluated only.

EVENT_ACTION_CANCEL 

Touch action is cancelled, e.g.

incoming phone call or too much touches.

Member Function Documentation

◆ PostEvent()

virtual void Murl::ITouchScreen::PostEvent ( EventAction  action,
Real  posX,
Real  posY 
)
pure virtual

Post the current touch state.

Touch positions are clipped by the touch device and should be reported as is, e.g. if the touch is out of the display surface the platform should report the calculated values < -1.0 or > 1.0.

Parameters
actionThe event action, see enum EventAction.
posXThe touch x-position on the display surface in range [-1.0 left .. 1.0 right].
posYThe touch y-position on the display surface in range [-1.0 bottom .. 1.0 top].

The documentation for this interface was generated from the following file:
  • murl_i_touch_screen.h


Copyright © 2011-2024 Spraylight GmbH.