/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.14.0
 *
 * Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * 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 "sipAPIQtMultimedia.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtMultimedia/qmediatimerange.sip"
#include <qmediatimerange.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtMultimedia/sipQtMultimediaQMediaTimeInterval.cpp"



PyDoc_STRVAR(doc_QMediaTimeInterval_start, "start(self) -> int");

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

    {
        const ::QMediaTimeInterval *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QMediaTimeInterval, &sipCpp))
        {
            ::qint64 sipRes;

            sipRes = sipCpp->start();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMediaTimeInterval, sipName_start, doc_QMediaTimeInterval_start);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaTimeInterval_end, "end(self) -> int");

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

    {
        const ::QMediaTimeInterval *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QMediaTimeInterval, &sipCpp))
        {
            ::qint64 sipRes;

            sipRes = sipCpp->end();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMediaTimeInterval, sipName_end, doc_QMediaTimeInterval_end);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaTimeInterval_contains, "contains(self, time: int) -> bool");

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

    {
        ::qint64 a0;
        const ::QMediaTimeInterval *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QMediaTimeInterval, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->contains(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMediaTimeInterval, sipName_contains, doc_QMediaTimeInterval_contains);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaTimeInterval_isNormal, "isNormal(self) -> bool");

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

    {
        const ::QMediaTimeInterval *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QMediaTimeInterval, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isNormal();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMediaTimeInterval, sipName_isNormal, doc_QMediaTimeInterval_isNormal);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaTimeInterval_normalized, "normalized(self) -> QMediaTimeInterval");

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

    {
        const ::QMediaTimeInterval *sipCpp;

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

            sipRes = new ::QMediaTimeInterval(sipCpp->normalized());

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

    sipNoMethod(sipParseErr, sipName_QMediaTimeInterval, sipName_normalized, doc_QMediaTimeInterval_normalized);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMediaTimeInterval_translated, "translated(self, offset: int) -> QMediaTimeInterval");

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

    {
        ::qint64 a0;
        const ::QMediaTimeInterval *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QMediaTimeInterval, &sipCpp, &a0))
        {
            ::QMediaTimeInterval*sipRes;

            sipRes = new ::QMediaTimeInterval(sipCpp->translated(a0));

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

    sipNoMethod(sipParseErr, sipName_QMediaTimeInterval, sipName_translated, doc_QMediaTimeInterval_translated);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QMediaTimeInterval___eq__(PyObject *, PyObject *);}
static PyObject *slot_QMediaTimeInterval___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QMediaTimeInterval *sipCpp = reinterpret_cast< ::QMediaTimeInterval *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QMediaTimeInterval));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QMediaTimeInterval* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QMediaTimeInterval, &a0))
        {
            bool sipRes;

            sipRes = operator==((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtMultimedia, eq_slot, sipType_QMediaTimeInterval, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QMediaTimeInterval___ne__(PyObject *, PyObject *);}
static PyObject *slot_QMediaTimeInterval___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QMediaTimeInterval *sipCpp = reinterpret_cast< ::QMediaTimeInterval *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QMediaTimeInterval));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QMediaTimeInterval* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QMediaTimeInterval, &a0))
        {
            bool sipRes;

            sipRes = operator!=((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtMultimedia, ne_slot, sipType_QMediaTimeInterval, sipSelf, sipArg);
}


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


extern "C" {static void *array_QMediaTimeInterval(Py_ssize_t);}
static void *array_QMediaTimeInterval(Py_ssize_t sipNrElem)
{
    return new ::QMediaTimeInterval[sipNrElem];
}


extern "C" {static void array_delete_QMediaTimeInterval(void *);}
static void array_delete_QMediaTimeInterval(void *sipCpp)
{
    delete[] reinterpret_cast< ::QMediaTimeInterval *>(sipCpp);
}


extern "C" {static void assign_QMediaTimeInterval(void *, Py_ssize_t, void *);}
static void assign_QMediaTimeInterval(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QMediaTimeInterval *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QMediaTimeInterval *>(sipSrc);
}


extern "C" {static void *copy_QMediaTimeInterval(const void *, Py_ssize_t);}
static void *copy_QMediaTimeInterval(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::QMediaTimeInterval(reinterpret_cast<const ::QMediaTimeInterval *>(sipSrc)[sipSrcIdx]);
}


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


extern "C" {static void *init_type_QMediaTimeInterval(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QMediaTimeInterval(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    ::QMediaTimeInterval *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new ::QMediaTimeInterval();

            return sipCpp;
        }
    }

    {
        ::qint64 a0;
        ::qint64 a1;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "nn", &a0, &a1))
        {
            sipCpp = new ::QMediaTimeInterval(a0, a1);

            return sipCpp;
        }
    }

    {
        const ::QMediaTimeInterval* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QMediaTimeInterval, &a0))
        {
            sipCpp = new ::QMediaTimeInterval(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QMediaTimeInterval[] = {
    {(void *)slot_QMediaTimeInterval___eq__, eq_slot},
    {(void *)slot_QMediaTimeInterval___ne__, ne_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QMediaTimeInterval[] = {
    {sipName_contains, meth_QMediaTimeInterval_contains, METH_VARARGS, doc_QMediaTimeInterval_contains},
    {sipName_end, meth_QMediaTimeInterval_end, METH_VARARGS, doc_QMediaTimeInterval_end},
    {sipName_isNormal, meth_QMediaTimeInterval_isNormal, METH_VARARGS, doc_QMediaTimeInterval_isNormal},
    {sipName_normalized, meth_QMediaTimeInterval_normalized, METH_VARARGS, doc_QMediaTimeInterval_normalized},
    {sipName_start, meth_QMediaTimeInterval_start, METH_VARARGS, doc_QMediaTimeInterval_start},
    {sipName_translated, meth_QMediaTimeInterval_translated, METH_VARARGS, doc_QMediaTimeInterval_translated}
};

PyDoc_STRVAR(doc_QMediaTimeInterval, "\1QMediaTimeInterval()\n"
"QMediaTimeInterval(start: int, end: int)\n"
"QMediaTimeInterval(a0: QMediaTimeInterval)");


static pyqt5ClassPluginDef plugin_QMediaTimeInterval = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtMultimedia_QMediaTimeInterval = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QMediaTimeInterval,
        SIP_NULLPTR,
        &plugin_QMediaTimeInterval,
    },
    {
        sipNameNr_QMediaTimeInterval,
        {0, 0, 1},
        6, methods_QMediaTimeInterval,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QMediaTimeInterval,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QMediaTimeInterval,
    init_type_QMediaTimeInterval,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QMediaTimeInterval,
    assign_QMediaTimeInterval,
    array_QMediaTimeInterval,
    copy_QMediaTimeInterval,
    release_QMediaTimeInterval,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QMediaTimeInterval,
    sizeof (::QMediaTimeInterval),
};
