Vuo
2.0.0
node
vuo.ui
VuoUiTheme.cc
Go to the documentation of this file.
1
10
#include "
type.h
"
11
extern
"C"
{
12
#include "
VuoUiTheme.h
"
13
}
14
15
#include "
VuoUiThemeBase.hh
"
16
18
#ifdef VUO_COMPILER
19
extern
"C"
{
20
VuoModuleMetadata
({
21
"title"
:
"UI Theme"
,
22
"description"
:
"A visual style for UI widgets."
,
23
"keywords"
: [ ],
24
"version"
:
"1.0.0"
,
25
"dependencies"
: [
26
"VuoRenderedLayers"
,
27
"VuoSerializable"
,
28
"VuoUiThemeGroup"
,
29
"VuoUiThemeButtonRounded"
,
30
"VuoUiThemeTextFieldRounded"
,
31
"VuoUiThemeToggleRounded"
,
32
"VuoUiThemeSliderRounded"
,
33
"VuoList_VuoUiTheme"
34
]
35
});
36
}
37
#endif
38
43
VuoUiTheme
VuoUiTheme_makeFromJson
(
json_object
*js)
44
{
45
return
reinterpret_cast<VuoUiTheme>(
VuoSerializable::makeFromJson
(js));
46
}
47
51
json_object
*
VuoUiTheme_getJson
(
const
VuoUiTheme
v)
52
{
53
VuoSerializable
*value = (
VuoSerializable
*)v;
54
return
value != NULL ? value->
getJson
() : NULL;
55
}
56
60
char
*
VuoUiTheme_getSummary
(
const
VuoUiTheme
v)
61
{
62
VuoSerializable
*value = (
VuoSerializable
*)v;
63
return
value != NULL ? value->
getSummary
() : strdup(
"No theme"
);
64
}
65
69
bool
VuoUiTheme_areEqual
(
const
VuoUiTheme
a,
const
VuoUiTheme
b)
70
{
71
if
(!a || !b)
72
return
!a && !b;
73
74
VuoSerializable
*valueA = (
VuoSerializable
*)a;
75
VuoSerializable
*valueB = (
VuoSerializable
*)b;
76
return
*valueA == *valueB;
77
}
78
82
bool
VuoUiTheme_isLessThan
(
const
VuoUiTheme
a,
const
VuoUiTheme
b)
83
{
84
// Treat a null theme as greater than a non-null theme,
85
// so the more useful non-null theme sorts to the beginning of the list.
86
if
(!a || !b)
87
return
a && !b;
88
89
VuoSerializable
*valueA = (
VuoSerializable
*)a;
90
VuoSerializable
*valueB = (
VuoSerializable
*)b;
91
return
*valueA < *valueB;
92
}
Generated on Tue Oct 22 2019 18:07:53 for Vuo by
1.8.16