Vuo  2.0.0
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.
47 
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));
59 {
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 
77 
79 
83 char * VuoInteraction_getString(const VuoInteraction value);
87