/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.1
 *
 *     Copyright: (c) 2020 by Total Control Software
 *     License:   wxWindows License
 */

#include "sipAPI_core.h"
        #include <wx/gdicmn.h>
        #include <wx/gdicmn.h>


class sipwxPixelDataBase : public ::wxPixelDataBase
{
public:
    sipwxPixelDataBase();
    sipwxPixelDataBase(const ::wxPixelDataBase&);
    ~sipwxPixelDataBase();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipwxPixelDataBase(const sipwxPixelDataBase &);
    sipwxPixelDataBase &operator = (const sipwxPixelDataBase &);
};

sipwxPixelDataBase::sipwxPixelDataBase(): ::wxPixelDataBase(), sipPySelf(SIP_NULLPTR)
{
}

sipwxPixelDataBase::sipwxPixelDataBase(const ::wxPixelDataBase& a0): ::wxPixelDataBase(a0), sipPySelf(SIP_NULLPTR)
{
}

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


PyDoc_STRVAR(doc_wxPixelDataBase_GetOrigin, "GetOrigin() -> Point\n"
"\n"
"Return the origin of the area this pixel data represents.");

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

    {
        const ::wxPixelDataBase *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxPoint(sipCpp->GetOrigin());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PixelDataBase, sipName_GetOrigin, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPixelDataBase_GetWidth, "GetWidth() -> int\n"
"\n"
"Return the width of the area this pixel data represents.");

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

    {
        const ::wxPixelDataBase *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPixelDataBase, &sipCpp))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetWidth();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PixelDataBase, sipName_GetWidth, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPixelDataBase_GetHeight, "GetHeight() -> int\n"
"\n"
"Return the height of the area this pixel data represents.");

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

    {
        const ::wxPixelDataBase *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPixelDataBase, &sipCpp))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetHeight();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PixelDataBase, sipName_GetHeight, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPixelDataBase_GetSize, "GetSize() -> Size\n"
"\n"
"Return the size of the area this pixel data represents.");

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

    {
        const ::wxPixelDataBase *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxSize(sipCpp->GetSize());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_PixelDataBase, sipName_GetSize, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPixelDataBase_GetRowStride, "GetRowStride() -> int\n"
"\n"
"Returns the distance between the start of one row to the start of the\n"
"next row.");

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

    {
        const ::wxPixelDataBase *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPixelDataBase, &sipCpp))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetRowStride();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_PixelDataBase, sipName_GetRowStride, SIP_NULLPTR);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_wxPixelDataBase(void *, int);}
static void release_wxPixelDataBase(void *sipCppV, int sipState)
{
    Py_BEGIN_ALLOW_THREADS

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxPixelDataBase *>(sipCppV);
    else
        delete reinterpret_cast< ::wxPixelDataBase *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


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


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

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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxPixelDataBase();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::wxPixelDataBase* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxPixelDataBase, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxPixelDataBase(*a0);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxPixelDataBase[] = {
    {sipName_GetHeight, meth_wxPixelDataBase_GetHeight, METH_VARARGS, doc_wxPixelDataBase_GetHeight},
    {sipName_GetOrigin, meth_wxPixelDataBase_GetOrigin, METH_VARARGS, doc_wxPixelDataBase_GetOrigin},
    {sipName_GetRowStride, meth_wxPixelDataBase_GetRowStride, METH_VARARGS, doc_wxPixelDataBase_GetRowStride},
    {sipName_GetSize, meth_wxPixelDataBase_GetSize, METH_VARARGS, doc_wxPixelDataBase_GetSize},
    {sipName_GetWidth, meth_wxPixelDataBase_GetWidth, METH_VARARGS, doc_wxPixelDataBase_GetWidth}
};

sipVariableDef variables_wxPixelDataBase[] = {
    {PropertyVariable, sipName_Width, &methods_wxPixelDataBase[4], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Size, &methods_wxPixelDataBase[3], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_RowStride, &methods_wxPixelDataBase[2], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Origin, &methods_wxPixelDataBase[1], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Height, &methods_wxPixelDataBase[0], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxPixelDataBase, "PixelDataBase() -> None");


sipClassTypeDef sipTypeDef__core_wxPixelDataBase = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxPixelDataBase,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_PixelDataBase,
        {0, 0, 1},
        5, methods_wxPixelDataBase,
        0, SIP_NULLPTR,
        5, variables_wxPixelDataBase,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxPixelDataBase,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxPixelDataBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxPixelDataBase,
    assign_wxPixelDataBase,
    SIP_NULLPTR,
    copy_wxPixelDataBase,
    release_wxPixelDataBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::wxPixelDataBase),
};
