refactor(modules): Handle events using signal_receiver

This commit is contained in:
Michael Carlberg
2016-12-21 08:38:44 +01:00
parent c01f111e34
commit 7979f5b3d4
26 changed files with 176 additions and 161 deletions

View File

@ -1,20 +1,20 @@
#pragma once
#include "modules/meta/input_handler.hpp"
#include "modules/meta/timer_module.hpp"
POLYBAR_NS
namespace modules {
class date_module : public timer_module<date_module> {
class date_module : public timer_module<date_module>, public input_handler {
public:
explicit date_module(const bar_settings&, string);
bool update();
bool build(builder* builder, const string& tag) const;
bool handle_event(string cmd);
bool receive_events() const {
return true;
}
protected:
bool on(const input_event_t& evt);
private:
static constexpr auto TAG_LABEL = "<label>";