Vuo  2.4.1
VuoInputEditorOscInputDevice.cc
Go to the documentation of this file.
1
11
12extern "C"
13{
14#include "VuoOsc.h"
15}
16
20static void __attribute__((constructor)) VuoInputEditorOscInputDevice_init(void)
21{
22 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
23 VuoOsc_use();
24 });
25}
26
31{
33}
34
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
48
49 unsigned long deviceCount = VuoListGetCount_VuoOscInputDevice(devices);
50 if (deviceCount)
51 for (unsigned long i = 1; i <= deviceCount; ++i)
52 {
54 optionsTree->addItem(new VuoInputEditorMenuItem(VuoText_format(" %s (%s:%lld)", device.name, device.ipAddress, device.port), VuoOscInputDevice_getJson(device)));
55 }
56 else
57 optionsTree->addItem(new VuoInputEditorMenuItem(" (no devices found)", NULL, NULL, false));
58
59 return optionsTree;
60}