1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-10-13 05:16:40 -04:00
polybar/include/utils/actions.hpp

35 lines
805 B
C++

#pragma once
#include "common.hpp"
#include "modules/meta/input_handler.hpp"
POLYBAR_NS
namespace actions_util {
/**
* Specifies how an action is routed
*
* A route consists of an input handler where the action should be delivered
* and the action itself.
*
* TODO maybe remove if redundant at the end
*/
struct route {
bool valid;
string handler_name;
string action;
explicit route();
explicit route(string handler_name, string action);
explicit route(const modules::input_handler& handler, string action);
/**
* Constructs the full action string for this route
*/
string get_action_string() const;
};
string get_action_string(const modules::input_handler& handler, string action);
} // namespace actions_util
POLYBAR_NS_END