/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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 "sipAPIQtMultimedia.h"

#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtMultimedia/qvideoframe.sip"
#include <qvideoframe.h>
#line 79 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtMultimedia/qvideoframe.sip"
#include <qvideoframe.h>
#line 31 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQVideoFramePaintOptions.cpp"

#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 150 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qtextstream.sip"
#include <qtextstream.h>
#line 37 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQVideoFramePaintOptions.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtGui/qcolor.sip"
#include <qcolor.h>
#line 40 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQVideoFramePaintOptions.cpp"
#line 25 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 43 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQVideoFramePaintOptions.cpp"


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


extern "C" {static void *array_QVideoFrame_PaintOptions(Py_ssize_t);}
static void *array_QVideoFrame_PaintOptions(Py_ssize_t sipNrElem)
{
    return new  ::QVideoFrame::PaintOptions[sipNrElem];
}


extern "C" {static void array_delete_QVideoFrame_PaintOptions(void *);}
static void array_delete_QVideoFrame_PaintOptions(void *sipCpp)
{
    delete[] reinterpret_cast< ::QVideoFrame::PaintOptions *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QVideoFrame::PaintOptions* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_QVideoFrame_PaintOptions_aspectRatioMode(void *, PyObject *, PyObject *);}
static PyObject *varget_QVideoFrame_PaintOptions_aspectRatioMode(void *sipSelf, PyObject *, PyObject *)
{
     ::Qt::AspectRatioMode sipVal;
     ::QVideoFrame::PaintOptions *sipCpp = reinterpret_cast< ::QVideoFrame::PaintOptions *>(sipSelf);

    sipVal = sipCpp->aspectRatioMode;

    return sipConvertFromEnum(static_cast<int>(sipVal), sipType_Qt_AspectRatioMode);
}


extern "C" {static int varset_QVideoFrame_PaintOptions_aspectRatioMode(void *, PyObject *, PyObject *);}
static int varset_QVideoFrame_PaintOptions_aspectRatioMode(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::Qt::AspectRatioMode sipVal;
     ::QVideoFrame::PaintOptions *sipCpp = reinterpret_cast< ::QVideoFrame::PaintOptions *>(sipSelf);

    sipVal = ( ::Qt::AspectRatioMode)sipConvertToEnum(sipPy, sipType_Qt_AspectRatioMode);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->aspectRatioMode = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QVideoFrame_PaintOptions_backgroundColor(void *, PyObject *, PyObject *);}
static PyObject *varget_QVideoFrame_PaintOptions_backgroundColor(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QColor*sipVal;
     ::QVideoFrame::PaintOptions *sipCpp = reinterpret_cast< ::QVideoFrame::PaintOptions *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -1);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->backgroundColor;

    sipPy = sipConvertFromType(sipVal, sipType_QColor, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -8, sipPySelf);
        sipKeepReference(sipPySelf, -1, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QVideoFrame_PaintOptions_backgroundColor(void *, PyObject *, PyObject *);}
static int varset_QVideoFrame_PaintOptions_backgroundColor(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QColor*sipVal;
     ::QVideoFrame::PaintOptions *sipCpp = reinterpret_cast< ::QVideoFrame::PaintOptions *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::QColor *>(sipForceConvertToType(sipPy, sipType_QColor, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->backgroundColor = *sipVal;

    sipReleaseType(sipVal, sipType_QColor, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QVideoFrame_PaintOptions_paintFlags(void *, PyObject *, PyObject *);}
static PyObject *varget_QVideoFrame_PaintOptions_paintFlags(void *sipSelf, PyObject *, PyObject *)
{
     ::QVideoFrame::PaintOptions::PaintFlags*sipVal;
     ::QVideoFrame::PaintOptions *sipCpp = reinterpret_cast< ::QVideoFrame::PaintOptions *>(sipSelf);

    sipVal = &sipCpp->paintFlags;

    return sipConvertFromType(sipVal, sipType_QFlags_0100QVideoFrame_PaintOptions_PaintFlag, SIP_NULLPTR);
}


extern "C" {static int varset_QVideoFrame_PaintOptions_paintFlags(void *, PyObject *, PyObject *);}
static int varset_QVideoFrame_PaintOptions_paintFlags(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QVideoFrame::PaintOptions::PaintFlags*sipVal;
     ::QVideoFrame::PaintOptions *sipCpp = reinterpret_cast< ::QVideoFrame::PaintOptions *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::QVideoFrame::PaintOptions::PaintFlags *>(sipForceConvertToType(sipPy, sipType_QFlags_0100QVideoFrame_PaintOptions_PaintFlag, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->paintFlags = *sipVal;

    sipReleaseType(sipVal, sipType_QFlags_0100QVideoFrame_PaintOptions_PaintFlag, sipValState);

    return 0;
}

sipVariableDef variables_QVideoFrame_PaintOptions[] = {
    {InstanceVariable, sipName_aspectRatioMode, (PyMethodDef *)varget_QVideoFrame_PaintOptions_aspectRatioMode, (PyMethodDef *)varset_QVideoFrame_PaintOptions_aspectRatioMode, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_backgroundColor, (PyMethodDef *)varget_QVideoFrame_PaintOptions_backgroundColor, (PyMethodDef *)varset_QVideoFrame_PaintOptions_backgroundColor, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_paintFlags, (PyMethodDef *)varget_QVideoFrame_PaintOptions_paintFlags, (PyMethodDef *)varset_QVideoFrame_PaintOptions_paintFlags, SIP_NULLPTR, SIP_NULLPTR},
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QVideoFrame_PaintOptions[] = {
    {sipName_DontDrawSubtitles, static_cast<int>( ::QVideoFrame::PaintOptions::DontDrawSubtitles)},
    {0, 0}
};

PyDoc_STRVAR(doc_QVideoFrame_PaintOptions, "\1QVideoFrame.PaintOptions()\n"
"QVideoFrame.PaintOptions(QVideoFrame.PaintOptions)");


sipClassTypeDef sipTypeDef_QtMultimedia_QVideoFrame_PaintOptions = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QVideoFrame__PaintOptions,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_PaintOptions,
        {70, 255, 0},
        0, SIP_NULLPTR,
        3, variables_QVideoFrame_PaintOptions,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QVideoFrame_PaintOptions, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QVideoFrame_PaintOptions,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QVideoFrame_PaintOptions,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QVideoFrame_PaintOptions,
    assign_QVideoFrame_PaintOptions,
    array_QVideoFrame_PaintOptions,
    copy_QVideoFrame_PaintOptions,
    release_QVideoFrame_PaintOptions,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QVideoFrame_PaintOptions,
    sizeof ( ::QVideoFrame::PaintOptions),
};
