/*
 * 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/bitmap.h>
    int _wxNativePixelData_Accessor___nonzero__(wxNativePixelData_Accessor* self)
    {
        return (int)self->IsOk();
    }
    int _wxNativePixelData_Accessor___bool__(wxNativePixelData_Accessor* self)
    {
        return self->IsOk();
    }
    void _wxNativePixelData_Accessor_nextPixel(wxNativePixelData_Accessor* self)
    {
        ++(*self);
    }
    void _wxNativePixelData_Accessor_Set(wxNativePixelData_Accessor* self, byte red, byte green, byte blue)
    {
        self->Red()   = red;
        self->Green() = green;
        self->Blue()  = blue;
    }
    PyObject* _wxNativePixelData_Accessor_Get(wxNativePixelData_Accessor* self)
    {
        wxPyThreadBlocker blocker;
        PyObject* rv = PyTuple_New(3);
        PyTuple_SetItem(rv, 0, wxPyInt_FromLong(self->Red()));
        PyTuple_SetItem(rv, 1, wxPyInt_FromLong(self->Green()));
        PyTuple_SetItem(rv, 2, wxPyInt_FromLong(self->Blue()));
        return rv;
    }


PyDoc_STRVAR(doc_wxNativePixelData_Accessor_Reset, "Reset(data) -> None");

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

    {
        const ::wxNativePixelData* data;
        ::wxNativePixelData_Accessor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_data,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxNativePixelData_Accessor, &sipCpp, sipType_wxNativePixelData, &data))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Reset(*data);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName_Reset, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxNativePixelData_Accessor_IsOk, "IsOk() -> bool");

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

    {
        const ::wxNativePixelData_Accessor *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->IsOk();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName_IsOk, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxNativePixelData_Accessor___nonzero__, "__nonzero__() -> bool");

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

    {
        ::wxNativePixelData_Accessor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativePixelData_Accessor, &sipCpp))
        {
            int sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxNativePixelData_Accessor___nonzero__(sipCpp);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName___nonzero__, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxNativePixelData_Accessor_Offset, "Offset(data, x, y) -> None");

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

    {
        const ::wxNativePixelData* data;
        int x;
        int y;
        ::wxNativePixelData_Accessor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_data,
            sipName_x,
            sipName_y,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9ii", &sipSelf, sipType_wxNativePixelData_Accessor, &sipCpp, sipType_wxNativePixelData, &data, &x, &y))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Offset(*data, x, y);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName_Offset, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxNativePixelData_Accessor_OffsetX, "OffsetX(data, x) -> None");

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

    {
        const ::wxNativePixelData* data;
        int x;
        ::wxNativePixelData_Accessor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_data,
            sipName_x,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9i", &sipSelf, sipType_wxNativePixelData_Accessor, &sipCpp, sipType_wxNativePixelData, &data, &x))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->OffsetX(*data, x);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName_OffsetX, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxNativePixelData_Accessor_OffsetY, "OffsetY(data, y) -> None");

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

    {
        const ::wxNativePixelData* data;
        int y;
        ::wxNativePixelData_Accessor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_data,
            sipName_y,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9i", &sipSelf, sipType_wxNativePixelData_Accessor, &sipCpp, sipType_wxNativePixelData, &data, &y))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->OffsetY(*data, y);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName_OffsetY, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxNativePixelData_Accessor_MoveTo, "MoveTo(data, x, y) -> None");

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

    {
        const ::wxNativePixelData* data;
        int x;
        int y;
        ::wxNativePixelData_Accessor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_data,
            sipName_x,
            sipName_y,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9ii", &sipSelf, sipType_wxNativePixelData_Accessor, &sipCpp, sipType_wxNativePixelData, &data, &x, &y))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->MoveTo(*data, x, y);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName_MoveTo, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxNativePixelData_Accessor_nextPixel, "nextPixel() -> None");

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

    {
        ::wxNativePixelData_Accessor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativePixelData_Accessor, &sipCpp))
        {
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        _wxNativePixelData_Accessor_nextPixel(sipCpp);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName_nextPixel, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxNativePixelData_Accessor_Set, "Set(red, green, blue) -> None");

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

    {
        ::byte red;
        ::byte green;
        ::byte blue;
        ::wxNativePixelData_Accessor *sipCpp;

        static const char *sipKwdList[] = {
            sipName_red,
            sipName_green,
            sipName_blue,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BMMM", &sipSelf, sipType_wxNativePixelData_Accessor, &sipCpp, &red, &green, &blue))
        {
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        _wxNativePixelData_Accessor_Set(sipCpp, red, green, blue);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName_Set, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxNativePixelData_Accessor_Get, "Get() -> Any");

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

    {
        ::wxNativePixelData_Accessor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxNativePixelData_Accessor, &sipCpp))
        {
            PyObject * sipRes = SIP_NULLPTR;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxNativePixelData_Accessor_Get(sipCpp);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_NativePixelData_Accessor, sipName_Get, SIP_NULLPTR);

    return SIP_NULLPTR;
}


extern "C" {static int slot_wxNativePixelData_Accessor___bool__(PyObject *);}
static int slot_wxNativePixelData_Accessor___bool__(PyObject *sipSelf)
{
    ::wxNativePixelData_Accessor *sipCpp = reinterpret_cast< ::wxNativePixelData_Accessor *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxNativePixelData_Accessor));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxNativePixelData_Accessor___bool__(sipCpp);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return -1;

            return sipRes;
        }
    }

    return 0;
}


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

    delete reinterpret_cast< ::wxNativePixelData_Accessor *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


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


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


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


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


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

    {
        ::wxNativePixelData* data;

        static const char *sipKwdList[] = {
            sipName_data,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9", sipType_wxNativePixelData, &data))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxNativePixelData_Accessor(*data);
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        ::wxBitmap* bmp;
        ::wxNativePixelData* data;

        static const char *sipKwdList[] = {
            sipName_bmp,
            sipName_data,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9J9", sipType_wxBitmap, &bmp, sipType_wxNativePixelData, &data))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxNativePixelData_Accessor(*bmp, *data);
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxNativePixelData_Accessor();
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        const ::wxNativePixelData_Accessor* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_wxNativePixelData_Accessor[] = {
    {(void *)slot_wxNativePixelData_Accessor___bool__, bool_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_wxNativePixelData_Accessor[] = {
    {sipName_Get, meth_wxNativePixelData_Accessor_Get, METH_VARARGS, doc_wxNativePixelData_Accessor_Get},
    {sipName_IsOk, meth_wxNativePixelData_Accessor_IsOk, METH_VARARGS, doc_wxNativePixelData_Accessor_IsOk},
    {sipName_MoveTo, SIP_MLMETH_CAST(meth_wxNativePixelData_Accessor_MoveTo), METH_VARARGS|METH_KEYWORDS, doc_wxNativePixelData_Accessor_MoveTo},
    {sipName_Offset, SIP_MLMETH_CAST(meth_wxNativePixelData_Accessor_Offset), METH_VARARGS|METH_KEYWORDS, doc_wxNativePixelData_Accessor_Offset},
    {sipName_OffsetX, SIP_MLMETH_CAST(meth_wxNativePixelData_Accessor_OffsetX), METH_VARARGS|METH_KEYWORDS, doc_wxNativePixelData_Accessor_OffsetX},
    {sipName_OffsetY, SIP_MLMETH_CAST(meth_wxNativePixelData_Accessor_OffsetY), METH_VARARGS|METH_KEYWORDS, doc_wxNativePixelData_Accessor_OffsetY},
    {sipName_Reset, SIP_MLMETH_CAST(meth_wxNativePixelData_Accessor_Reset), METH_VARARGS|METH_KEYWORDS, doc_wxNativePixelData_Accessor_Reset},
    {sipName_Set, SIP_MLMETH_CAST(meth_wxNativePixelData_Accessor_Set), METH_VARARGS|METH_KEYWORDS, doc_wxNativePixelData_Accessor_Set},
    {sipName___nonzero__, meth_wxNativePixelData_Accessor___nonzero__, METH_VARARGS, doc_wxNativePixelData_Accessor___nonzero__},
    {sipName_nextPixel, meth_wxNativePixelData_Accessor_nextPixel, METH_VARARGS, doc_wxNativePixelData_Accessor_nextPixel}
};

PyDoc_STRVAR(doc_wxNativePixelData_Accessor, "NativePixelData_Accessor(data) -> None\n"
"NativePixelData_Accessor(bmp, data) -> None\n"
"NativePixelData_Accessor() -> None");


sipClassTypeDef sipTypeDef__core_wxNativePixelData_Accessor = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxNativePixelData_Accessor,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_NativePixelData_Accessor,
        {0, 0, 1},
        10, methods_wxNativePixelData_Accessor,
        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_wxNativePixelData_Accessor,
    -1,
    -1,
    SIP_NULLPTR,
    slots_wxNativePixelData_Accessor,
    init_type_wxNativePixelData_Accessor,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxNativePixelData_Accessor,
    assign_wxNativePixelData_Accessor,
    array_wxNativePixelData_Accessor,
    copy_wxNativePixelData_Accessor,
    release_wxNativePixelData_Accessor,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxNativePixelData_Accessor,
    sizeof (::wxNativePixelData_Accessor),
};
