1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-03 04:33:30 -05:00
polybar/include/components/signals.hpp
Michael Carlberg bcf9249dc7 refactor: Use plain std::function callbacks
Replace fastdelegate with plain std::function's because
of incomplete clang support
2016-10-25 01:51:57 +02:00

45 lines
1.2 KiB
C++

#pragma once
#include "common.hpp"
#include "components/types.hpp"
LEMONBUDDY_NS
/**
* @TODO: Allow multiple signal handlers
*/
namespace g_signals {
/**
* Signals used to communicate with the bar window
*/
namespace bar {
static function<void(string)> action_click;
static function<void(bool)> visibility_change;
}
/**
* Signals used to communicate with the input parser
*/
namespace parser {
static function<void(alignment)> alignment_change;
static function<void(attribute)> attribute_set;
static function<void(attribute)> attribute_unset;
static function<void(attribute)> attribute_toggle;
static function<void(mousebtn, string)> action_block_open;
static function<void(mousebtn)> action_block_close;
static function<void(gc, color)> color_change;
static function<void(int)> font_change;
static function<void(int)> pixel_offset;
static function<void(uint16_t)> ascii_text_write;
static function<void(uint16_t)> unicode_text_write;
}
/**
* Signals used to communicate with the tray manager
*/
namespace tray {
static function<void(uint16_t)> report_slotcount;
}
}
LEMONBUDDY_NS_END