diff --git a/src/UserInputHandler.hxx b/src/UserInputHandler.hxx index 0aea2643..752411bd 100644 --- a/src/UserInputHandler.hxx +++ b/src/UserInputHandler.hxx @@ -10,11 +10,27 @@ enum class Command : unsigned; struct Point; +/** + * Handler for input events from the user, called by #AsyncUserInput. + */ class UserInputHandler { public: + /** + * A hot key for a #Command was pressed. + * + * @return false if ncmpc will quit + */ virtual bool OnCommand(Command cmd) noexcept = 0; #ifdef HAVE_GETMOUSE + /** + * An input event from the mouse was detected. + * + * @param p the position of the mouse cursor on the screen + * @param bstate the state of all mouse buttons + * + * @return false if ncmpc will quit + */ virtual bool OnMouse(Point p, mmask_t bstate) noexcept = 0; #endif };