polybar-dwm/include
Patrick Ziegler 26be83f893
module: Implement action router (#2336)
* module: Implement proof of concept action router

Action implementation inside module becomes much cleaner because each
module just registers action names together with a callback (pointer to
member function) and the action router does the rest.

* Make input function final

This forces all modules to use the action router

* modules: Catch exceptions in action handlers

* Use action router for all modules

* Use action_ prefix for function names

The mpd module's 'stop' action overwrote the base module's stop function
which caused difficult to debug behavior.

To prevent this in the future we now prefix each function that is
responsible for an action with 'action_'

* Cleanup

* actions: Throw exception when re-registering action

Action names are unique inside modules. Unfortunately there is no way to
ensure this statically, the next best thing is to crash the module and
let the user know that this is a bug.

* Formatting

* actions: Ignore data for actions without data

This is the same behavior as before.

* action_router: Write tests
2021-01-04 10:25:52 +01:00
..
adapters feat(net): interface discovery (#2025) 2021-01-03 11:48:15 +01:00
cairo feat(conf) Properties for {bottom,top}-{left,right} radius 2020-12-13 17:02:23 +01:00
components feat: Module Visibility (#2320) 2020-12-27 16:05:26 +01:00
drawtypes feat: Warn state for cpu, memory, fs, battery modules (#2199) 2020-12-02 15:55:13 +01:00
events New Tag Parser (#2303) 2020-12-17 20:37:28 +01:00
modules module: Implement action router (#2336) 2021-01-04 10:25:52 +01:00
tags New Tag Parser (#2303) 2020-12-17 20:37:28 +01:00
utils module: Implement action router (#2336) 2021-01-04 10:25:52 +01:00
x11 fix(x11): Don't include composite when disabled 2020-12-22 00:37:07 +01:00
CMakeLists.txt refactor(cmake): Allow targets to be enabled individually 2020-12-24 02:20:38 +01:00
common.hpp refactor(build): Remove version number namespace 2019-05-17 16:49:47 +02:00
debug.hpp refactor: Cleanup 2017-01-11 03:07:28 +01:00
errors.hpp Add missing <stdexcept> header 2019-12-25 01:00:29 +01:00
settings.hpp.cmake cmake: Make xrandr and xcomposite required 2020-12-22 00:37:07 +01:00