#ifndef SBK_KTWOFINGERSWIPERECOGNIZERWRAPPER_H
#define SBK_KTWOFINGERSWIPERECOGNIZERWRAPPER_H

// Workaround to access protected functions
#ifndef protected
#  define protected public
#endif

#include <ktwofingerswipe.h>

#include <sbkpython.h>

#include <array>
namespace Shiboken { struct AutoDecRef; class GilState; }

class KTwoFingerSwipeRecognizerWrapper : public KTwoFingerSwipeRecognizer
{
public:
    KTwoFingerSwipeRecognizerWrapper();
    KTwoFingerSwipeRecognizerWrapper(const KTwoFingerSwipeRecognizerWrapper &) = delete;
    KTwoFingerSwipeRecognizerWrapper& operator=(const KTwoFingerSwipeRecognizerWrapper &) = delete;
    KTwoFingerSwipeRecognizerWrapper(KTwoFingerSwipeRecognizerWrapper &&) = delete;
    KTwoFingerSwipeRecognizerWrapper& operator=(KTwoFingerSwipeRecognizerWrapper &&) = delete;
    ~KTwoFingerSwipeRecognizerWrapper() override;

    ::QGesture * create(::QObject * target) override;
    ::QFlags<QGestureRecognizer::ResultFlag> recognize(::QGesture * gesture, ::QObject * watched, ::QEvent * event) override;
    void reset(::QGesture * state) override;
    static void pysideInitQtMetaTypes();

    void resetPyMethodCache();

private:
    mutable std::array<PyObject *, 3> m_PyMethodCache = {nullptr, nullptr, nullptr};
};

#endif // SBK_KTWOFINGERSWIPERECOGNIZERWRAPPER_H
