Vuo
2.1.2
type
inputEditor
VuoInputEditorOscOutputDevice
VuoInputEditorOscOutputDevice.cc
Go to the documentation of this file.
1
10
#include "
VuoInputEditorOscOutputDevice.hh
"
11
12
extern
"C"
13
{
14
#include "
VuoOsc.h
"
15
}
16
20
static
void
__attribute__((constructor)) VuoInputEditorOscOutputDevice_init(
void
)
21
{
22
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
23
VuoOsc_use
();
24
});
25
}
26
30
VuoInputEditor
*
VuoInputEditorOscOutputDeviceFactory::newInputEditor
()
31
{
32
return
new
VuoInputEditorOscOutputDevice
();
33
}
34
38
VuoInputEditorMenuItem
*
VuoInputEditorOscOutputDevice::setUpMenuTree
()
39
{
40
VuoInputEditorMenuItem
*optionsTree =
new
VuoInputEditorMenuItem
(
"root"
);
41
42
optionsTree->
addItem
(
new
VuoInputEditorMenuItem
(
"Auto"
, NULL));
43
44
optionsTree->
addSeparator
();
45
optionsTree->
addItem
(
new
VuoInputEditorMenuItem
(
"Specific device"
, NULL, NULL,
false
));
46
47
VuoList_VuoOscOutputDevice
devices =
VuoOsc_getOutputDeviceList
();
48
49
unsigned
long
deviceCount =
VuoListGetCount_VuoOscOutputDevice
(devices);
50
if
(deviceCount)
51
for
(
unsigned
long
i = 1; i <= deviceCount; ++i)
52
{
53
VuoOscOutputDevice
device =
VuoListGetValue_VuoOscOutputDevice
(devices, i);
54
optionsTree->
addItem
(
new
VuoInputEditorMenuItem
(
VuoText_format
(
" %s (%s:%lld)"
, device.name, device.ipAddress, device.port),
VuoOscOutputDevice_getJson
(device)));
55
}
56
else
57
optionsTree->
addItem
(
new
VuoInputEditorMenuItem
(
" (no devices found)"
, NULL, NULL,
false
));
58
59
return
optionsTree;
60
}
Generated on Tue Jul 14 2020 23:19:41 for Vuo by
1.8.18