Vuo  2.3.2
Macros | Functions
VuoInteraction.c File Reference

Description

VuoInteraction implementation.

Definition in file VuoInteraction.c.

Go to the source code of this file.

Macros

#define MAX_CLICK_DELTA   .2
 The amount of time a press can be held before it's no longer considered a click. More...
 
#define MIN_DRAG_DISTANCE   .08
 The minimum distance a position can wander while pressed before being considered a drag. More...
 

Functions

VuoInteraction VuoInteraction_makeFromJson (json_object *js)
 Decodes the JSON object js to create a new value. More...
 
json_objectVuoInteraction_getJson (const VuoInteraction value)
 Encodes value as a JSON object. More...
 
char * VuoInteraction_getSummary (const VuoInteraction value)
 Returns a compact string representation of value (comma-separated components). More...
 
bool VuoInteraction_areEqual (const VuoInteraction value1, const VuoInteraction value2)
 Returns true if both interactions are identical (value-wise). More...
 
bool VuoInteraction_isLessThan (const VuoInteraction a, const VuoInteraction b)
 Returns true if a < b. More...
 
static bool VuoInteraction_isDrag (const VuoInteraction previous, const bool isPressed, const VuoPoint2d position)
 Test if a current interaction is a drag based on previous interaction. More...
 
VuoReal VuoMouseUtility_getDoubleClickInterval ()
 
bool VuoInteraction_update (const VuoPoint2d position, const VuoBoolean isPressed, VuoInteraction *interaction)
 Update an interaction with new input position and isPressed values. More...
 

Macro Definition Documentation

◆ MAX_CLICK_DELTA

#define MAX_CLICK_DELTA   .2

The amount of time a press can be held before it's no longer considered a click.

Definition at line 147 of file VuoInteraction.c.

◆ MIN_DRAG_DISTANCE

#define MIN_DRAG_DISTANCE   .08

The minimum distance a position can wander while pressed before being considered a drag.

Definition at line 149 of file VuoInteraction.c.

Function Documentation

◆ VuoInteraction_isDrag()

static bool VuoInteraction_isDrag ( const VuoInteraction  previous,
const bool  isPressed,
const VuoPoint2d  position 
)
static

Test if a current interaction is a drag based on previous interaction.

Changed in Vuo 2.0.0:
New.

Definition at line 156 of file VuoInteraction.c.

◆ VuoMouseUtility_getDoubleClickInterval()

VuoReal VuoMouseUtility_getDoubleClickInterval ( )
Changed in Vuo 2.0.0:
New.

Definition at line 178 of file VuoInteraction.c.