Vuo
2.4.4
Loading...
Searching...
No Matches
node
vuo.ui
VuoDragEvent.c
Go to the documentation of this file.
1
10
#include "
VuoDragEvent.h
"
11
13
#ifdef VUO_COMPILER
14
VuoModuleMetadata
({
15
"title"
:
"Drag Event"
,
16
"description"
:
"Information about an in-progress or completed file drag."
,
17
"keywords"
: [ ],
18
"version"
:
"1.0.0"
,
19
"dependencies"
: [
20
"VuoPoint2d"
,
21
"VuoUrl"
,
22
"VuoList_VuoUrl"
23
]
24
});
25
#endif
27
38
VuoDragEvent
VuoDragEvent_makeFromJson
(json_object * js)
39
{
40
return
(
VuoDragEvent
){
41
VuoJson_getObjectValue
(VuoPoint2d, js,
"position"
, (VuoPoint2d){0,0}),
42
VuoJson_getObjectValue
(
VuoList_VuoUrl
, js,
"urls"
, NULL),
43
};
44
}
45
49
json_object *
VuoDragEvent_getJson
(
const
VuoDragEvent
value)
50
{
51
json_object *js = json_object_new_object();
52
53
json_object_object_add(js,
"position"
,
VuoPoint2d_getJson
(value.position));
54
55
if
(value.urls)
56
json_object_object_add(js,
"urls"
,
VuoList_VuoUrl_getJson
(value.urls));
57
58
return
js;
59
}
60
64
char
*
VuoDragEvent_getSummary
(
const
VuoDragEvent
value)
65
{
66
char
*listSummary =
VuoList_VuoUrl_getSummary
(value.urls);
67
char
*summary =
VuoText_format
(
"%g,%g<br>%s"
, value.position.x, value.position.y, listSummary);
68
free(listSummary);
69
return
summary;
70
}
71
75
VuoDragEvent
VuoDragEvent_make
(
const
VuoPoint2d position,
const
VuoList_VuoUrl
urls)
76
{
77
return
(
VuoDragEvent
){position, urls};
78
}
79
86
bool
VuoDragEvent_areEqual
(
const
VuoDragEvent
value1,
const
VuoDragEvent
value2)
87
{
88
if
(!
VuoPoint2d_areEqual
(value1.position, value2.position))
89
return
false
;
90
91
if
(!VuoList_VuoUrl_areEqual(value1.urls, value2.urls))
92
return
false
;
93
94
return
true
;
95
}
96
100
bool
VuoDragEvent_isLessThan
(
const
VuoDragEvent
a,
const
VuoDragEvent
b)
101
{
102
VuoType_returnInequality
(VuoPoint2d, a.position, b.position);
103
VuoType_returnInequality
(
VuoList_VuoUrl
, a.urls, b.urls);
104
return
false
;
105
}
106
111
void
VuoDragEvent_retain
(
VuoDragEvent
value)
112
{
113
VuoRetain
(value.urls);
114
}
115
120
void
VuoDragEvent_release
(
VuoDragEvent
value)
121
{
122
VuoRelease
(value.urls);
123
}
Generated on Thu Nov 9 2023 16:59:30 for Vuo by
1.9.8