2016-12-21 08:38:44 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.hpp"
|
|
|
|
|
|
|
|
POLYBAR_NS
|
|
|
|
|
|
|
|
namespace modules {
|
2016-12-23 20:43:52 +01:00
|
|
|
class input_handler {
|
2016-12-21 08:38:44 +01:00
|
|
|
public:
|
|
|
|
virtual ~input_handler() {}
|
2020-05-31 00:09:44 +02:00
|
|
|
/**
|
|
|
|
* Handle command
|
|
|
|
*
|
|
|
|
* \returns true if the command is supported and false otherwise
|
|
|
|
*/
|
2016-12-23 20:43:52 +01:00
|
|
|
virtual bool input(string&& cmd) = 0;
|
2019-12-02 19:14:26 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of this input handler
|
|
|
|
*
|
|
|
|
* Actions of the form '#NAME#ACTION' can be sent to this handler if NAME is the name of this input handler.
|
|
|
|
*/
|
|
|
|
virtual string input_handler_name() const = 0;
|
2016-12-21 08:38:44 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
POLYBAR_NS_END
|