Vuo
2.0.1
type
VuoInteraction.h
Go to the documentation of this file.
1
10
#pragma once
11
12
#include "
VuoReal.h
"
13
#include "
VuoText.h
"
14
#include "
VuoPoint2d.h
"
15
#include "
VuoUuid.h
"
16
#include "
VuoInteractionType.h
"
17
#include "
VuoBoolean.h
"
18
20
typedef
const
struct
VuoList_VuoInteraction_struct
{
void
*l; } *
VuoList_VuoInteraction
;
21
#define VuoList_VuoInteraction_TYPE_DEFINED
22
37
typedef
struct
38
{
39
VuoUuid
uuid;
// Globally unique identifier.
40
VuoPoint2d position;
// The x,y coordinates of this input relative to a window.
41
bool
isPressed;
// Set true when this input device is in a "down" state - ex, mouse is depressed, or leap motion finger is past the z input wall.
42
VuoInteractionType
type;
// What kind of interaction is this.
43
VuoPoint2d origin;
// The position at the time of the last onPressed event.
44
double
timestamp;
// The timestamp that the last onPressed event was fired.
45
VuoInteger
clickCount;
// The number of successive clicks with double-click timing.
46
}
VuoInteraction
;
47
48
VuoInteraction
VuoInteraction_makeFromJson
(
struct
json_object
* js);
49
struct
json_object
*
VuoInteraction_getJson
(
const
VuoInteraction
value);
50
char
*
VuoInteraction_getSummary
(
const
VuoInteraction
value);
51
52
bool
VuoInteraction_update
(
const
VuoPoint2d position,
const
VuoBoolean
isPressed,
VuoInteraction
*interaction)
VuoWarnUnusedResult
;
53
57
static
inline
VuoInteraction
VuoInteraction_make
()
__attribute__
((const));
58
static inline
VuoInteraction
VuoInteraction_make
()
59
{
60
VuoInteraction
i;
61
62
i.uuid =
VuoUuid_make
();
63
i.position =
VuoPoint2d_make
(0,0);
64
i.isPressed =
false
;
65
i.type = VuoInteractionType_None;
66
i.origin =
VuoPoint2d_make
(0,0);
67
i.timestamp = -1;
68
i.clickCount = 0;
69
70
return
i;
71
}
72
73
#define VuoInteraction_SUPPORTS_COMPARISON
74
75
bool
VuoInteraction_areEqual
(
const
VuoInteraction
a,
const
VuoInteraction
b);
76
bool
VuoInteraction_isLessThan
(
const
VuoInteraction
a,
const
VuoInteraction
b);
77
79
82
VuoInteraction
VuoInteraction_makeFromString
(
const
char
*str);
83
char
*
VuoInteraction_getString
(
const
VuoInteraction
value);
84
void
VuoInteraction_retain
(
VuoInteraction
value);
85
void
VuoInteraction_release
(
VuoInteraction
value);
87
Generated on Sat Mar 14 2020 13:04:38 for Vuo by
1.8.17