MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / _validate_alpha

Method _validate_alpha

plugins/window-rules/view-action-interface.cpp:316–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316std::tuple<bool, float> view_action_interface_t::_validate_alpha(
317 const std::vector<variant_t> & args)
318{
319 auto arg_float = _expect_float(args, 1);
320 if (std::get<0>(arg_float))
321 {
322 return arg_float;
323 } else
324 {
325 auto arg_double = _expect_double(args, 1);
326 if (std::get<0>(arg_double))
327 {
328 return {true, static_cast<float>(std::get<1>(arg_double))};
329 }
330 }
331
332 LOGE(
333 "View action interface: Invalid arguments. Expected 'set alpha [float|double].");
334
335 return {false, 1.0f};
336}
337
338std::tuple<bool, int, int, int, int> view_action_interface_t::_validate_geometry(
339 const std::vector<variant_t> & args)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected