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

#include "sipAPI_html.h"
        #include <wx/html/htmlcell.h>
        #include <wx/gdicmn.h>
        #include <wx/html/htmlcell.h>


PyDoc_STRVAR(doc_wxHtmlSelection_Set, "Set(fromPos, fromCell, toPos, toCell) -> None\n"
"Set(fromCell, toCell) -> None\n"
"");

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

    {
        const ::wxPoint* fromPos;
        int fromPosState = 0;
        const ::wxHtmlCell* fromCell;
        const ::wxPoint* toPos;
        int toPosState = 0;
        const ::wxHtmlCell* toCell;
        ::wxHtmlSelection *sipCpp;

        static const char *sipKwdList[] = {
            sipName_fromPos,
            sipName_fromCell,
            sipName_toPos,
            sipName_toCell,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J8J1J8", &sipSelf, sipType_wxHtmlSelection, &sipCpp, sipType_wxPoint, &fromPos, &fromPosState, sipType_wxHtmlCell, &fromCell, sipType_wxPoint, &toPos, &toPosState, sipType_wxHtmlCell, &toCell))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Set(*fromPos, fromCell, *toPos, toCell);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxPoint *>(fromPos), sipType_wxPoint, fromPosState);
            sipReleaseType(const_cast< ::wxPoint *>(toPos), sipType_wxPoint, toPosState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const ::wxHtmlCell* fromCell;
        const ::wxHtmlCell* toCell;
        ::wxHtmlSelection *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8", &sipSelf, sipType_wxHtmlSelection, &sipCpp, sipType_wxHtmlCell, &fromCell, sipType_wxHtmlCell, &toCell))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Set(fromCell, toCell);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_Set, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_GetFromCell, "GetFromCell() -> HtmlCell");

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

    {
        const ::wxHtmlSelection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxHtmlSelection, &sipCpp))
        {
            const ::wxHtmlCell*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetFromCell();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(const_cast< ::wxHtmlCell *>(sipRes), sipType_wxHtmlCell, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_GetFromCell, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_GetToCell, "GetToCell() -> HtmlCell");

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

    {
        const ::wxHtmlSelection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxHtmlSelection, &sipCpp))
        {
            const ::wxHtmlCell*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetToCell();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(const_cast< ::wxHtmlCell *>(sipRes), sipType_wxHtmlCell, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_GetToCell, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_GetFromPos, "GetFromPos() -> wx.Point");

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

    {
        const ::wxHtmlSelection *sipCpp;

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

            PyErr_Clear();

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

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_GetFromPos, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_GetToPos, "GetToPos() -> wx.Point");

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

    {
        const ::wxHtmlSelection *sipCpp;

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

            PyErr_Clear();

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

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_GetToPos, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_ClearFromToCharacterPos, "ClearFromToCharacterPos() -> None");

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

    {
        ::wxHtmlSelection *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxHtmlSelection, &sipCpp))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->ClearFromToCharacterPos();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_ClearFromToCharacterPos, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_AreFromToCharacterPosSet, "AreFromToCharacterPosSet() -> bool");

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

    {
        const ::wxHtmlSelection *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->AreFromToCharacterPosSet();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_AreFromToCharacterPosSet, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_SetFromCharacterPos, "SetFromCharacterPos(pos) -> None");

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

    {
        ::wxCoord pos;
        ::wxHtmlSelection *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxHtmlSelection, &sipCpp, &pos))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetFromCharacterPos(pos);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_SetFromCharacterPos, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_SetToCharacterPos, "SetToCharacterPos(pos) -> None");

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

    {
        ::wxCoord pos;
        ::wxHtmlSelection *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxHtmlSelection, &sipCpp, &pos))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetToCharacterPos(pos);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_SetToCharacterPos, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_GetFromCharacterPos, "GetFromCharacterPos() -> int");

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

    {
        const ::wxHtmlSelection *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetFromCharacterPos();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_GetFromCharacterPos, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_GetToCharacterPos, "GetToCharacterPos() -> int");

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

    {
        const ::wxHtmlSelection *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetToCharacterPos();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_GetToCharacterPos, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxHtmlSelection_IsEmpty, "IsEmpty() -> bool");

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

    {
        const ::wxHtmlSelection *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->IsEmpty();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_HtmlSelection, sipName_IsEmpty, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxHtmlSelection();
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        const ::wxHtmlSelection* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxHtmlSelection[] = {
    {sipName_AreFromToCharacterPosSet, meth_wxHtmlSelection_AreFromToCharacterPosSet, METH_VARARGS, doc_wxHtmlSelection_AreFromToCharacterPosSet},
    {sipName_ClearFromToCharacterPos, meth_wxHtmlSelection_ClearFromToCharacterPos, METH_VARARGS, doc_wxHtmlSelection_ClearFromToCharacterPos},
    {sipName_GetFromCell, meth_wxHtmlSelection_GetFromCell, METH_VARARGS, doc_wxHtmlSelection_GetFromCell},
    {sipName_GetFromCharacterPos, meth_wxHtmlSelection_GetFromCharacterPos, METH_VARARGS, doc_wxHtmlSelection_GetFromCharacterPos},
    {sipName_GetFromPos, meth_wxHtmlSelection_GetFromPos, METH_VARARGS, doc_wxHtmlSelection_GetFromPos},
    {sipName_GetToCell, meth_wxHtmlSelection_GetToCell, METH_VARARGS, doc_wxHtmlSelection_GetToCell},
    {sipName_GetToCharacterPos, meth_wxHtmlSelection_GetToCharacterPos, METH_VARARGS, doc_wxHtmlSelection_GetToCharacterPos},
    {sipName_GetToPos, meth_wxHtmlSelection_GetToPos, METH_VARARGS, doc_wxHtmlSelection_GetToPos},
    {sipName_IsEmpty, meth_wxHtmlSelection_IsEmpty, METH_VARARGS, doc_wxHtmlSelection_IsEmpty},
    {sipName_Set, SIP_MLMETH_CAST(meth_wxHtmlSelection_Set), METH_VARARGS|METH_KEYWORDS, doc_wxHtmlSelection_Set},
    {sipName_SetFromCharacterPos, SIP_MLMETH_CAST(meth_wxHtmlSelection_SetFromCharacterPos), METH_VARARGS|METH_KEYWORDS, doc_wxHtmlSelection_SetFromCharacterPos},
    {sipName_SetToCharacterPos, SIP_MLMETH_CAST(meth_wxHtmlSelection_SetToCharacterPos), METH_VARARGS|METH_KEYWORDS, doc_wxHtmlSelection_SetToCharacterPos}
};

sipVariableDef variables_wxHtmlSelection[] = {
    {PropertyVariable, sipName_ToPos, &methods_wxHtmlSelection[7], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_ToCharacterPos, &methods_wxHtmlSelection[6], &methods_wxHtmlSelection[11], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_ToCell, &methods_wxHtmlSelection[5], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_FromPos, &methods_wxHtmlSelection[4], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_FromCharacterPos, &methods_wxHtmlSelection[3], &methods_wxHtmlSelection[10], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_FromCell, &methods_wxHtmlSelection[2], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxHtmlSelection, "HtmlSelection() -> None");


sipClassTypeDef sipTypeDef__html_wxHtmlSelection = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxHtmlSelection,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_HtmlSelection,
        {0, 0, 1},
        12, methods_wxHtmlSelection,
        0, SIP_NULLPTR,
        6, variables_wxHtmlSelection,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxHtmlSelection,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxHtmlSelection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxHtmlSelection,
    assign_wxHtmlSelection,
    array_wxHtmlSelection,
    copy_wxHtmlSelection,
    release_wxHtmlSelection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxHtmlSelection,
    sizeof (::wxHtmlSelection),
};
