gramods
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
gramods::gmTouch::TouchState::EventAdaptor Struct Reference

Base type for event adaptors providing means to input events from different platforms and window libraries. More...

#include <TouchState.hh>

Inheritance diagram for gramods::gmTouch::TouchState::EventAdaptor:
Inheritance graph
[legend]

Public Member Functions

virtual void init (int, int)
 Called by the owner (TouchState) when eventsInit is called.
 
virtual void done ()
 Called by the owner (TouchState) when eventsDone is called.
 

Protected Member Functions

void addTouchState (TouchPointId id, float x, float y)
 Adds a touch point sample.
 
void removeTouchState (TouchPointId id, float x, float y)
 Removes the touch point with the specified id.
 
void addMouseState (float x, float y, bool mouse_down)
 Add the specified mouse state.
 
void addMouseWheel (float s)
 Sets the wheel value, positive up and negative down.
 

Detailed Description

Base type for event adaptors providing means to input events from different platforms and window libraries.

Get the platform/library dependent adaptor by calling getEventAdaptor.

Member Function Documentation

◆ addMouseState()

void gramods::gmTouch::TouchState::EventAdaptor::addMouseState ( float  x,
float  y,
bool  mouse_down 
)
protected

Add the specified mouse state.

This will also add and remove simulated touch states.

◆ addMouseWheel()

void gramods::gmTouch::TouchState::EventAdaptor::addMouseWheel ( float  s)
protected

Sets the wheel value, positive up and negative down.

◆ addTouchState()

void gramods::gmTouch::TouchState::EventAdaptor::addTouchState ( TouchPointId  id,
float  x,
float  y 
)
protected

Adds a touch point sample.

Parameters
idThe id of the touch point
xposition in (sub) pixels from left edge.
yposition in (sub) pixels from top edge.

◆ done()

void gramods::gmTouch::TouchState::EventAdaptor::done ( )
virtual

Called by the owner (TouchState) when eventsDone is called.

Reimplemented in gramods::gmTouch::SDLEventAdaptor.

◆ init()

void gramods::gmTouch::TouchState::EventAdaptor::init ( int  ,
int   
)
virtual

Called by the owner (TouchState) when eventsInit is called.

Reimplemented in gramods::gmTouch::SDLEventAdaptor.

◆ removeTouchState()

void gramods::gmTouch::TouchState::EventAdaptor::removeTouchState ( TouchPointId  id,
float  x,
float  y 
)
protected

Removes the touch point with the specified id.


The documentation for this struct was generated from the following files: