/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.16.1
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtGui.h"

#line 650 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qevent.sip"
#include <qevent.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQScrollEvent.cpp"

#line 110 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpoint.sip"
#include <qpoint.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQScrollEvent.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQScrollEvent.cpp"


class sipQScrollEvent : public ::QScrollEvent
{
public:
    sipQScrollEvent(const ::QPointF&, const ::QPointF&, ::QScrollEvent::ScrollState);
    virtual ~sipQScrollEvent();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void setAccepted(bool) SIP_OVERRIDE;
    ::QScrollEvent* clone() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQScrollEvent(const sipQScrollEvent &);
    sipQScrollEvent &operator = (const sipQScrollEvent &);

    char sipPyMethods[2];
};

sipQScrollEvent::sipQScrollEvent(const ::QPointF& a0, const ::QPointF& a1, ::QScrollEvent::ScrollState a2): ::QScrollEvent(a0, a1, a2), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQScrollEvent::~sipQScrollEvent()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

void sipQScrollEvent::setAccepted(bool a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_setAccepted);

    if (!sipMeth)
    {
        ::QScrollEvent::setAccepted(a0);
        return;
    }

    extern void sipVH_QtGui_25(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, bool);

    sipVH_QtGui_25(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

::QScrollEvent* sipQScrollEvent::clone() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[1]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_clone);

    if (!sipMeth)
        return ::QScrollEvent::clone();

    extern ::QScrollEvent* sipVH_QtGui_51(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtGui_51(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_QScrollEvent_contentPos, "contentPos(self) -> QPointF");

extern "C" {static PyObject *meth_QScrollEvent_contentPos(PyObject *, PyObject *);}
static PyObject *meth_QScrollEvent_contentPos(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QScrollEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QScrollEvent, &sipCpp))
        {
            ::QPointF*sipRes;

            sipRes = new ::QPointF(sipCpp->contentPos());

            return sipConvertFromNewType(sipRes, sipType_QPointF, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QScrollEvent, sipName_contentPos, doc_QScrollEvent_contentPos);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QScrollEvent_overshootDistance, "overshootDistance(self) -> QPointF");

extern "C" {static PyObject *meth_QScrollEvent_overshootDistance(PyObject *, PyObject *);}
static PyObject *meth_QScrollEvent_overshootDistance(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QScrollEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QScrollEvent, &sipCpp))
        {
            ::QPointF*sipRes;

            sipRes = new ::QPointF(sipCpp->overshootDistance());

            return sipConvertFromNewType(sipRes, sipType_QPointF, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QScrollEvent, sipName_overshootDistance, doc_QScrollEvent_overshootDistance);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QScrollEvent_scrollState, "scrollState(self) -> QScrollEvent.ScrollState");

extern "C" {static PyObject *meth_QScrollEvent_scrollState(PyObject *, PyObject *);}
static PyObject *meth_QScrollEvent_scrollState(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QScrollEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QScrollEvent, &sipCpp))
        {
            ::QScrollEvent::ScrollState sipRes;

            sipRes = sipCpp->scrollState();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QScrollEvent_ScrollState);
        }
    }

    sipNoMethod(sipParseErr, sipName_QScrollEvent, sipName_scrollState, doc_QScrollEvent_scrollState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QScrollEvent_clone, "clone(self) -> QScrollEvent|None");

extern "C" {static PyObject *meth_QScrollEvent_clone(PyObject *, PyObject *);}
static PyObject *meth_QScrollEvent_clone(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QScrollEvent)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QScrollEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QScrollEvent, &sipCpp))
        {
            ::QScrollEvent*sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QScrollEvent::clone() : sipCpp->clone());

            return sipConvertFromType(sipRes, sipType_QScrollEvent, Py_None);
        }
    }

    sipNoMethod(sipParseErr, sipName_QScrollEvent, sipName_clone, doc_QScrollEvent_clone);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QScrollEvent(void *, const sipTypeDef *);}
static void *cast_QScrollEvent(void *sipCppV, const sipTypeDef *targetType)
{
    ::QScrollEvent *sipCpp = reinterpret_cast< ::QScrollEvent *>(sipCppV);

    if (targetType == sipType_QScrollEvent)
        return sipCppV;

    if (targetType == sipType_QEvent)
        return static_cast< ::QEvent *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QScrollEvent(void *, int);}
static void release_QScrollEvent(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQScrollEvent *>(sipCppV);
    else
        delete reinterpret_cast< ::QScrollEvent *>(sipCppV);
}


extern "C" {static void dealloc_QScrollEvent(sipSimpleWrapper *);}
static void dealloc_QScrollEvent(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQScrollEvent *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QScrollEvent(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QScrollEvent(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QScrollEvent(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipQScrollEvent *sipCpp = SIP_NULLPTR;

    {
        const ::QPointF* a0;
        const ::QPointF* a1;
        ::QScrollEvent::ScrollState a2;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9J9E", sipType_QPointF, &a0, sipType_QPointF, &a1, sipType_QScrollEvent_ScrollState, &a2))
        {
            sipCpp = new sipQScrollEvent(*a0, *a1, a2);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QScrollEvent[] = {{10, 0, 1}};


static PyMethodDef methods_QScrollEvent[] = {
    {sipName_clone, meth_QScrollEvent_clone, METH_VARARGS, doc_QScrollEvent_clone},
    {sipName_contentPos, meth_QScrollEvent_contentPos, METH_VARARGS, doc_QScrollEvent_contentPos},
    {sipName_overshootDistance, meth_QScrollEvent_overshootDistance, METH_VARARGS, doc_QScrollEvent_overshootDistance},
    {sipName_scrollState, meth_QScrollEvent_scrollState, METH_VARARGS, doc_QScrollEvent_scrollState}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QScrollEvent[] = {
    {sipName_ScrollStarted, static_cast<int>(::QScrollEvent::ScrollStarted)},
    {sipName_ScrollUpdated, static_cast<int>(::QScrollEvent::ScrollUpdated)},
    {sipName_ScrollFinished, static_cast<int>(::QScrollEvent::ScrollFinished)},
    {0, 0}
};

PyDoc_STRVAR(doc_QScrollEvent, "\1QScrollEvent(contentPos: QPointF, overshoot: QPointF, scrollState: QScrollEvent.ScrollState)");


sipClassTypeDef sipTypeDef_QtGui_QScrollEvent = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QScrollEvent,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QScrollEvent,
        {0, 0, 1},
        4, methods_QScrollEvent,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QScrollEvent, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QScrollEvent,
    -1,
    -1,
    supers_QScrollEvent,
    SIP_NULLPTR,
    init_type_QScrollEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QScrollEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QScrollEvent,
    cast_QScrollEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QScrollEvent),
};
