191fb2972c
Only modules can now be action handlers. This also slightly simplifies the controller because we don't need to keep track of input handlers, we can just use the module list.
29 lines
798 B
C++
29 lines
798 B
C++
#pragma once
|
|
|
|
#include "common.hpp"
|
|
|
|
namespace modules {
|
|
struct module_interface;
|
|
} // namespace modules
|
|
|
|
POLYBAR_NS
|
|
|
|
namespace actions_util {
|
|
string get_action_string(const modules::module_interface& module, string action, string data);
|
|
|
|
/**
|
|
* Parses an action string of the form "#name.action[.data]".
|
|
*
|
|
* Only call this function with an action string that begins with '#'.
|
|
*
|
|
* \returns a triple (name, action, data)
|
|
* If no data exists, the third string will be empty.
|
|
* This means "#name.action." and "#name.action" will be produce the
|
|
* same result.
|
|
* \throws runtime_error If the action string is malformed
|
|
*/
|
|
std::tuple<string, string, string> parse_action_string(string action);
|
|
} // namespace actions_util
|
|
|
|
POLYBAR_NS_END
|