DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 995b94a44b2a0c79fc9dcbb503752b188007718e
parent 757a4cf62c00c9954ed825254c3cfd7a2bc8f6d6
Author: falkTX <falktx@falktx.com>
Date:   Mon, 14 Jun 2021 19:59:41 +0100

Make some event handlers methods public

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdgl/EventHandlers.hpp | 6+++---
Mdgl/src/EventHandlers.cpp | 14+++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dgl/EventHandlers.hpp b/dgl/EventHandlers.hpp @@ -54,14 +54,14 @@ public: void setCallback(Callback* callback) noexcept; + bool mouseEvent(const Widget::MouseEvent& ev); + bool motionEvent(const Widget::MotionEvent& ev); + protected: State getState() const noexcept; virtual void stateChanged(State state, State oldState); - bool mouseEvent(const Widget::MouseEvent& ev); - bool motionEvent(const Widget::MotionEvent& ev); - private: struct PrivateData; PrivateData* const pData; diff --git a/dgl/src/EventHandlers.cpp b/dgl/src/EventHandlers.cpp @@ -208,23 +208,23 @@ void ButtonEventHandler::setCallback(Callback* const callback) noexcept pData->callback = callback; } -ButtonEventHandler::State ButtonEventHandler::getState() const noexcept +bool ButtonEventHandler::mouseEvent(const Widget::MouseEvent& ev) { - return static_cast<State>(pData->state); + return pData->mouseEvent(ev); } -void ButtonEventHandler::stateChanged(State, State) +bool ButtonEventHandler::motionEvent(const Widget::MotionEvent& ev) { + return pData->motionEvent(ev); } -bool ButtonEventHandler::mouseEvent(const Widget::MouseEvent& ev) +ButtonEventHandler::State ButtonEventHandler::getState() const noexcept { - return pData->mouseEvent(ev); + return static_cast<State>(pData->state); } -bool ButtonEventHandler::motionEvent(const Widget::MotionEvent& ev) +void ButtonEventHandler::stateChanged(State, State) { - return pData->motionEvent(ev); } // --------------------------------------------------------------------------------------------------------------------