2016-12-21 07:38:44 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.hpp"
|
|
|
|
|
|
|
|
POLYBAR_NS
|
|
|
|
|
|
|
|
namespace modules {
|
2016-12-23 19:43:52 +00:00
|
|
|
class input_handler {
|
2016-12-21 07:38:44 +00:00
|
|
|
public:
|
|
|
|
virtual ~input_handler() {}
|
2020-05-30 22:09:44 +00:00
|
|
|
/**
|
2020-05-23 22:36:16 +00:00
|
|
|
* Handle action, possibly with data attached
|
|
|
|
*
|
|
|
|
* Any implementation is free to ignore the data, if the action does not
|
|
|
|
* require additional data.
|
2020-05-30 22:09:44 +00:00
|
|
|
*
|
2020-05-06 23:26:14 +00:00
|
|
|
* \returns true if the action is supported and false otherwise
|
2020-05-30 22:09:44 +00:00
|
|
|
*/
|
2020-05-23 22:36:16 +00:00
|
|
|
virtual bool input(string&& action, string&& data) = 0;
|
2019-12-02 18:14:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of this input handler
|
|
|
|
*/
|
|
|
|
virtual string input_handler_name() const = 0;
|
2016-12-21 07:38:44 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
POLYBAR_NS_END
|