/*
 * 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 569 "/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/sipQtGuiQFileOpenEvent.cpp"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qfile.sip"
#include <qfile.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFileOpenEvent.cpp"
#line 25 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFileOpenEvent.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qiodevicebase.sip"
#include <qiodevicebase.h>
#line 39 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFileOpenEvent.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qurl.sip"
#include <qurl.h>
#line 42 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFileOpenEvent.cpp"
#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 45 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFileOpenEvent.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 48 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFileOpenEvent.cpp"


PyDoc_STRVAR(doc_QFileOpenEvent_file, "file(self) -> str");

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

    {
        const ::QFileOpenEvent *sipCpp;

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

            sipRes = new ::QString(sipCpp->file());

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

    sipNoMethod(sipParseErr, sipName_QFileOpenEvent, sipName_file, doc_QFileOpenEvent_file);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFileOpenEvent_url, "url(self) -> QUrl");

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

    {
        const ::QFileOpenEvent *sipCpp;

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

            sipRes = new ::QUrl(sipCpp->url());

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

    sipNoMethod(sipParseErr, sipName_QFileOpenEvent, sipName_url, doc_QFileOpenEvent_url);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFileOpenEvent_openFile, "openFile(self, file: QFile, flags: QIODeviceBase.OpenModeFlag) -> bool");

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

    {
        ::QFile* a0;
        ::QIODeviceBase::OpenMode* a1;
        int a1State = 0;
        const ::QFileOpenEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J1", &sipSelf, sipType_QFileOpenEvent, &sipCpp, sipType_QFile, &a0, sipType_QFlags_0100QIODeviceBase_OpenModeFlag, &a1, &a1State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->openFile(*a0, *a1);
            Py_END_ALLOW_THREADS
            sipReleaseType(a1, sipType_QFlags_0100QIODeviceBase_OpenModeFlag, a1State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QFileOpenEvent, sipName_openFile, doc_QFileOpenEvent_openFile);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFileOpenEvent_clone, "clone(self) -> QFileOpenEvent|None");

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

    {
        const ::QFileOpenEvent *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QFileOpenEvent, sipName_clone, doc_QFileOpenEvent_clone);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QFileOpenEvent)
        return sipCppV;

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

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QFileOpenEvent(void *, int);}
static void release_QFileOpenEvent(void *sipCppV, int)
{
    delete reinterpret_cast< ::QFileOpenEvent *>(sipCppV);
}


extern "C" {static void dealloc_QFileOpenEvent(sipSimpleWrapper *);}
static void dealloc_QFileOpenEvent(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QFileOpenEvent(sipGetAddress(sipSelf), 0);
    }
}


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


static PyMethodDef methods_QFileOpenEvent[] = {
    {sipName_clone, meth_QFileOpenEvent_clone, METH_VARARGS, doc_QFileOpenEvent_clone},
    {sipName_file, meth_QFileOpenEvent_file, METH_VARARGS, doc_QFileOpenEvent_file},
    {sipName_openFile, meth_QFileOpenEvent_openFile, METH_VARARGS, doc_QFileOpenEvent_openFile},
    {sipName_url, meth_QFileOpenEvent_url, METH_VARARGS, doc_QFileOpenEvent_url}
};


sipClassTypeDef sipTypeDef_QtGui_QFileOpenEvent = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QFileOpenEvent,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QFileOpenEvent,
        {0, 0, 1},
        4, methods_QFileOpenEvent,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    SIP_NULLPTR,
    -1,
    -1,
    supers_QFileOpenEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QFileOpenEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QFileOpenEvent,
    cast_QFileOpenEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
