Vuo
2.4.4
Loading...
Searching...
No Matches
type
VuoInteraction.h
Go to the documentation of this file.
1
10
#ifndef VuoInteraction_h
11
#define VuoInteraction_h
12
13
#ifdef __cplusplus
14
extern
"C"
{
15
#endif
16
17
#include "
VuoReal.h
"
18
#include "
VuoText.h
"
19
#include "
VuoPoint2d.h
"
20
#include "
VuoUuid.h
"
21
#include "
VuoInteractionType.h
"
22
#include "
VuoBoolean.h
"
23
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
#define VuoInteraction_SUPPORTS_COMPARISON
49
#include "
VuoList_VuoInteraction.h
"
50
51
VuoInteraction
VuoInteraction_makeFromJson
(
struct
json_object * js);
52
struct
json_object *
VuoInteraction_getJson
(
const
VuoInteraction
value);
53
char
*
VuoInteraction_getSummary
(
const
VuoInteraction
value);
54
55
bool
VuoInteraction_update
(
const
VuoPoint2d position,
const
VuoBoolean
isPressed,
VuoInteraction
*interaction)
VuoWarnUnusedResult
;
56
60
static
inline
VuoInteraction
VuoInteraction_make
(
void
) __attribute__((
const
));
61
static
inline
VuoInteraction
VuoInteraction_make
(
void
)
62
{
63
VuoInteraction
i;
64
65
i.uuid =
VuoUuid_make
();
66
i.position =
VuoPoint2d_make
(0,0);
67
i.isPressed =
false
;
68
i.type = VuoInteractionType_None;
69
i.origin =
VuoPoint2d_make
(0,0);
70
i.timestamp = -1;
71
i.clickCount = 0;
72
73
return
i;
74
}
75
76
bool
VuoInteraction_areEqual
(
const
VuoInteraction
a,
const
VuoInteraction
b);
77
bool
VuoInteraction_isLessThan
(
const
VuoInteraction
a,
const
VuoInteraction
b);
78
80
83
char
*
VuoInteraction_getString
(
const
VuoInteraction
value);
84
void
VuoInteraction_retain
(
VuoInteraction
value);
85
void
VuoInteraction_release
(
VuoInteraction
value);
87
92
#ifdef __cplusplus
93
}
94
#endif
95
96
#endif
Generated on Thu Nov 9 2023 16:59:30 for Vuo by
1.9.8