17 "title" :
"Window Property",
18 "description" :
"A window setting, such as its title, or whether it is full-screen.",
30 "VuoList_VuoWindowProperty"
51 if (json_object_object_get_ex(js,
"unit", &o))
54 if (json_object_object_get_ex(js,
"title", &o))
56 value.type = VuoWindowProperty_Title;
60 else if (json_object_object_get_ex(js,
"fullScreen", &o))
62 value.type = VuoWindowProperty_FullScreen;
64 if (json_object_object_get_ex(js,
"screen", &o))
68 else if (json_object_object_get_ex(js,
"left", &o))
70 value.type = VuoWindowProperty_Position;
72 if (json_object_object_get_ex(js,
"top", &o))
76 else if (json_object_object_get_ex(js,
"width", &o))
78 value.type = VuoWindowProperty_Size;
80 if (json_object_object_get_ex(js,
"height", &o))
84 else if (json_object_object_get_ex(js,
"aspectRatio", &o))
86 value.type = VuoWindowProperty_AspectRatio;
90 else if (json_object_object_get_ex(js,
"aspectRatioReset", &o))
92 value.type = VuoWindowProperty_AspectRatioReset;
95 else if (json_object_object_get_ex(js,
"resizable", &o))
97 value.type = VuoWindowProperty_Resizable;
101 else if (json_object_object_get_ex(js,
"cursor", &o))
103 value.type = VuoWindowProperty_Cursor;
107 else if (json_object_object_get_ex(js,
"interaction", &o))
109 value.type = VuoWindowProperty_Interaction;
113 else if (json_object_object_get_ex(js,
"level", &o))
115 value.type = VuoWindowProperty_Level;
130 if (value.type == VuoWindowProperty_Title)
132 else if (value.type == VuoWindowProperty_FullScreen)
137 else if (value.type == VuoWindowProperty_Position)
143 else if (value.type == VuoWindowProperty_Size)
149 else if (value.type == VuoWindowProperty_AspectRatio)
150 json_object_object_add(js,
"aspectRatio",
VuoReal_getJson(value.aspectRatio));
151 else if (value.type == VuoWindowProperty_AspectRatioReset)
153 else if (value.type == VuoWindowProperty_Resizable)
155 else if (value.type == VuoWindowProperty_Cursor)
157 else if (value.type == VuoWindowProperty_Interaction)
159 else if (value.type == VuoWindowProperty_Level)
170 if (level == VuoWindowLevel_Background)
172 else if (level == VuoWindowLevel_Normal)
174 else if (level == VuoWindowLevel_Floating)
185 if (value.type == VuoWindowProperty_Title)
186 return VuoText_format(
"Change Window Title: \"%s\"", value.title);
187 else if (value.type == VuoWindowProperty_FullScreen)
190 char *summary =
VuoText_format(
"<div>Change to %s</div>\n<div>%s</div>",
191 value.fullScreen ?
"Fullscreen" :
"Windowed",
196 else if (value.type == VuoWindowProperty_Position)
199 char *t =
VuoText_format(
"Change Window Position: (%lld, %lld) %s", value.left, value.top, unit);
203 else if (value.type == VuoWindowProperty_Size)
206 char *t =
VuoText_format(
"Change Window Size: %lldx%lld %s", value.width, value.height, unit);
210 else if (value.type == VuoWindowProperty_AspectRatio)
211 return VuoText_format(
"Change Window Aspect Ratio: %g", value.aspectRatio);
212 else if (value.type == VuoWindowProperty_AspectRatioReset)
214 else if (value.type == VuoWindowProperty_Resizable)
215 return value.resizable ? strdup(
"Enable Window Resizing") : strdup(
"Disable Window Resizing");
216 else if (value.type == VuoWindowProperty_Cursor)
219 char *summary =
VuoText_format(
"Change mouse cursor to %s", cursorSummary);
223 else if (value.type == VuoWindowProperty_Interaction)
225 else if (value.type == VuoWindowProperty_Level)
228 return strdup(
"Unknown window property");
243 if(prop.type == windowPropertyType)