mrp_wayland_send_input(wl, &ev);
+ mrp_json_unref(json);
+
return true;
}
"'JSON' class object");
return false;
}
-
+
memset(&u, 0, sizeof(u));
u.mask = copy_json_fields(wl, json, fields, &u);
mrp_wayland_input_request(wl, &u);
+ mrp_json_unref(json);
+
return true;
}
mrp_wayland_area_create(wl, &u);
+ mrp_json_unref(json);
+
return true;
}
#endif
}
}
+ mrp_json_unref(json);
+
return true;
}
mrp_wayland_window_update_t u;
uint32_t framerate;
mrp_json_t *json;
+ bool success;
MRP_UNUSED(L);
MRP_UNUSED(data);
MRP_ASSERT(signature && args && ret_type, "invalid argument");
*ret_type = MRP_FUNCBRIDGE_NO_DATA;
+ json = NULL;
if (strcmp(signature, "oood")) {
mrp_log_error("system-controller: bad signature: "
"expected 'oood' got '%s'",signature);
- return false;
+ success = false;
+ goto out;
}
if (!(wl = mrp_wayland_scripting_window_manager_unwrap(args[0].pointer))) {
mrp_log_error("system-controller: argument 1 is not a "
"'window_manager' class object");
- return false;
+ success = false;
+ goto out;
}
if (!(json = mrp_json_lua_unwrap(args[1].pointer))) {
mrp_log_error("system-controller: argument 2 is not a "
"'JSON' class object");
- return false;
+ success = false;
+ goto out;
}
if (!(anims = mrp_wayland_scripting_animation_unwrap(args[2].pointer))) {
mrp_log_error("system-controller: argument 3 is not an "
"'animation' class object");
- return false;
+ success = false;
+ goto out;
}
if ((framerate = args[3].integer) > MRP_WAYLAND_FRAMERATE_MAX) {
mrp_log_error("system-controller: argument 3 is not valid framerate "
"(out of range 0-%d)", MRP_WAYLAND_FRAMERATE_MAX);
- return false;
+ success = false;
+ goto out;
}
mrp_wayland_window_request(wl, &u, anims, framerate);
- return true;
+ success = true;
+
+ out:
+ mrp_json_unref(json);
+
+ return success;
}
mrp_wayland_output_request(wl, &u);
+ mrp_json_unref(json);
+
return true;
}
mrp_wayland_area_create(wl, &u);
+ mrp_json_unref(json);
+
return true;
}
mrp_wayland_layer_request(wl, &u);
+ mrp_json_unref(json);
+
return true;
}