/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * 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 429 "/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/sipQtGuiQInputMethodQueryEvent.cpp"

#line 25 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQInputMethodQueryEvent.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 154 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qtextstream.sip"
#include <qtextstream.h>
#line 38 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQInputMethodQueryEvent.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 41 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQInputMethodQueryEvent.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 44 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQInputMethodQueryEvent.cpp"


class sipQInputMethodQueryEvent : public ::QInputMethodQueryEvent
{
public:
    sipQInputMethodQueryEvent(::Qt::InputMethodQueries);
    virtual ~sipQInputMethodQueryEvent();

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

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipQInputMethodQueryEvent::sipQInputMethodQueryEvent(::Qt::InputMethodQueries a0): ::QInputMethodQueryEvent(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

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

    if (!sipMeth)
    {
        ::QInputMethodQueryEvent::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);
}

::QInputMethodQueryEvent* sipQInputMethodQueryEvent::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 ::QInputMethodQueryEvent::clone();

    extern ::QInputMethodQueryEvent* sipVH_QtGui_37(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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


PyDoc_STRVAR(doc_QInputMethodQueryEvent_queries, "queries(self) -> Qt.InputMethodQuery");

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

    {
        const ::QInputMethodQueryEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInputMethodQueryEvent, &sipCpp))
        {
            ::Qt::InputMethodQueries*sipRes;

            sipRes = new ::Qt::InputMethodQueries(sipCpp->queries());

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

    sipNoMethod(sipParseErr, sipName_QInputMethodQueryEvent, sipName_queries, doc_QInputMethodQueryEvent_queries);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInputMethodQueryEvent_setValue, "setValue(self, query: Qt.InputMethodQuery, value: Any)");

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

    {
        ::Qt::InputMethodQuery a0;
        const ::QVariant* a1;
        int a1State = 0;
        ::QInputMethodQueryEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BEJ1", &sipSelf, sipType_QInputMethodQueryEvent, &sipCpp, sipType_Qt_InputMethodQuery, &a0, sipType_QVariant, &a1, &a1State))
        {
            sipCpp->setValue(a0, *a1);
            sipReleaseType(const_cast< ::QVariant *>(a1), sipType_QVariant, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QInputMethodQueryEvent, sipName_setValue, doc_QInputMethodQueryEvent_setValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInputMethodQueryEvent_value, "value(self, query: Qt.InputMethodQuery) -> Any");

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

    {
        ::Qt::InputMethodQuery a0;
        const ::QInputMethodQueryEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QInputMethodQueryEvent, &sipCpp, sipType_Qt_InputMethodQuery, &a0))
        {
            ::QVariant*sipRes;

            sipRes = new ::QVariant(sipCpp->value(a0));

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

    sipNoMethod(sipParseErr, sipName_QInputMethodQueryEvent, sipName_value, doc_QInputMethodQueryEvent_value);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInputMethodQueryEvent_clone, "clone(self) -> QInputMethodQueryEvent|None");

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

    {
        const ::QInputMethodQueryEvent *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QInputMethodQueryEvent, sipName_clone, doc_QInputMethodQueryEvent_clone);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QInputMethodQueryEvent)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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


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

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


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

    {
        ::Qt::InputMethodQueries* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QFlags_0100Qt_InputMethodQuery, &a0, &a0State))
        {
            sipCpp = new sipQInputMethodQueryEvent(*a0);
            sipReleaseType(a0, sipType_QFlags_0100Qt_InputMethodQuery, a0State);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QInputMethodQueryEvent[] = {
    {sipName_clone, meth_QInputMethodQueryEvent_clone, METH_VARARGS, doc_QInputMethodQueryEvent_clone},
    {sipName_queries, meth_QInputMethodQueryEvent_queries, METH_VARARGS, doc_QInputMethodQueryEvent_queries},
    {sipName_setValue, meth_QInputMethodQueryEvent_setValue, METH_VARARGS, doc_QInputMethodQueryEvent_setValue},
    {sipName_value, meth_QInputMethodQueryEvent_value, METH_VARARGS, doc_QInputMethodQueryEvent_value}
};

PyDoc_STRVAR(doc_QInputMethodQueryEvent, "\1QInputMethodQueryEvent(queries: Qt.InputMethodQuery)");


sipClassTypeDef sipTypeDef_QtGui_QInputMethodQueryEvent = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QInputMethodQueryEvent,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QInputMethodQueryEvent,
        {0, 0, 1},
        4, methods_QInputMethodQueryEvent,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QInputMethodQueryEvent,
    -1,
    -1,
    supers_QInputMethodQueryEvent,
    SIP_NULLPTR,
    init_type_QInputMethodQueryEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QInputMethodQueryEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QInputMethodQueryEvent,
    cast_QInputMethodQueryEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QInputMethodQueryEvent),
};
