mirror of
https://github.com/polybar/polybar.git
synced 2026-02-08 09:45:35 +00:00
All modules now expose their actions as public static constants Issues: The menu module no longer closes when an item is clicked (before it would intercept any executed command and look if it matches one of its exec commands)
26 lines
422 B
C++
26 lines
422 B
C++
#pragma once
|
|
|
|
#include "common.hpp"
|
|
|
|
POLYBAR_NS
|
|
|
|
namespace modules {
|
|
class input_handler {
|
|
public:
|
|
virtual ~input_handler() {}
|
|
/**
|
|
* Handle action
|
|
*
|
|
* \returns true if the action is supported and false otherwise
|
|
*/
|
|
virtual bool input(string&& action) = 0;
|
|
|
|
/**
|
|
* The name of this input handler
|
|
*/
|
|
virtual string input_handler_name() const = 0;
|
|
};
|
|
}
|
|
|
|
POLYBAR_NS_END
|