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

#include "sipAPI_core.h"

        #include <wx/layout.h>

        #include <wx/layout.h>
        #include <wx/window.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxLayoutConstraints : public  ::wxLayoutConstraints
{
public:
    sipwxLayoutConstraints();
    sipwxLayoutConstraints(const  ::wxLayoutConstraints&);
    ~sipwxLayoutConstraints();

public:
    sipSimpleWrapper *sipPySelf;

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

sipwxLayoutConstraints::sipwxLayoutConstraints():  ::wxLayoutConstraints(), sipPySelf(SIP_NULLPTR)
{
}

sipwxLayoutConstraints::sipwxLayoutConstraints(const  ::wxLayoutConstraints& a0):  ::wxLayoutConstraints(a0), sipPySelf(SIP_NULLPTR)
{
}

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


PyDoc_STRVAR(doc_wxLayoutConstraints_SatisfyConstraints, "SatisfyConstraints(win, noChanges) -> bool");

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

    {
         ::wxWindow* win;
        int noChanges;
         ::wxLayoutConstraints *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxLayoutConstraints, &sipCpp, sipType_wxWindow, &win))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->SatisfyConstraints(win,&noChanges);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipBuildResult(0,"(bi)",sipRes,noChanges);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_LayoutConstraints, sipName_SatisfyConstraints, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxLayoutConstraints_AreSatisfied, "AreSatisfied() -> bool");

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

    {
        const  ::wxLayoutConstraints *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->AreSatisfied();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_LayoutConstraints, sipName_AreSatisfied, SIP_NULLPTR);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_wxLayoutConstraints(void *, const sipTypeDef *);}
static void *cast_wxLayoutConstraints(void *sipCppV, const sipTypeDef *targetType)
{
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipCppV);

    if (targetType == sipType_wxObject)
        return static_cast< ::wxObject *>(sipCpp);

    return sipCppV;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxLayoutConstraints *>(sipCppV);
    else
        delete reinterpret_cast< ::wxLayoutConstraints *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void assign_wxLayoutConstraints(void *, SIP_SSIZE_T, void *);}
static void assign_wxLayoutConstraints(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxLayoutConstraints *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxLayoutConstraints *>(sipSrc);
}


extern "C" {static void *array_wxLayoutConstraints(SIP_SSIZE_T);}
static void *array_wxLayoutConstraints(SIP_SSIZE_T sipNrElem)
{
    return new  ::wxLayoutConstraints[sipNrElem];
}


extern "C" {static void *copy_wxLayoutConstraints(const void *, SIP_SSIZE_T);}
static void *copy_wxLayoutConstraints(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::wxLayoutConstraints(reinterpret_cast<const  ::wxLayoutConstraints *>(sipSrc)[sipSrcIdx]);
}


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

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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxLayoutConstraints();
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxLayoutConstraints* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_wxLayoutConstraints[] = {{358, 255, 1}};


static PyMethodDef methods_wxLayoutConstraints[] = {
    {SIP_MLNAME_CAST(sipName_AreSatisfied), meth_wxLayoutConstraints_AreSatisfied, METH_VARARGS, SIP_MLDOC_CAST(doc_wxLayoutConstraints_AreSatisfied)},
    {SIP_MLNAME_CAST(sipName_SatisfyConstraints), SIP_MLMETH_CAST(meth_wxLayoutConstraints_SatisfyConstraints), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxLayoutConstraints_SatisfyConstraints)}
};


extern "C" {static PyObject *varget_wxLayoutConstraints_bottom(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLayoutConstraints_bottom(void *sipSelf, PyObject *, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    sipVal = &sipCpp->bottom;

    return sipConvertFromType(sipVal, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR);
}


extern "C" {static int varset_wxLayoutConstraints_bottom(void *, PyObject *, PyObject *);}
static int varset_wxLayoutConstraints_bottom(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::wxIndividualLayoutConstraint *>(sipForceConvertToType(sipPy, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->bottom = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxLayoutConstraints_centreX(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLayoutConstraints_centreX(void *sipSelf, PyObject *, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    sipVal = &sipCpp->centreX;

    return sipConvertFromType(sipVal, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR);
}


extern "C" {static int varset_wxLayoutConstraints_centreX(void *, PyObject *, PyObject *);}
static int varset_wxLayoutConstraints_centreX(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::wxIndividualLayoutConstraint *>(sipForceConvertToType(sipPy, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->centreX = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxLayoutConstraints_centreY(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLayoutConstraints_centreY(void *sipSelf, PyObject *, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    sipVal = &sipCpp->centreY;

    return sipConvertFromType(sipVal, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR);
}


extern "C" {static int varset_wxLayoutConstraints_centreY(void *, PyObject *, PyObject *);}
static int varset_wxLayoutConstraints_centreY(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::wxIndividualLayoutConstraint *>(sipForceConvertToType(sipPy, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->centreY = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxLayoutConstraints_height(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLayoutConstraints_height(void *sipSelf, PyObject *, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    sipVal = &sipCpp->height;

    return sipConvertFromType(sipVal, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR);
}


extern "C" {static int varset_wxLayoutConstraints_height(void *, PyObject *, PyObject *);}
static int varset_wxLayoutConstraints_height(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::wxIndividualLayoutConstraint *>(sipForceConvertToType(sipPy, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->height = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxLayoutConstraints_left(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLayoutConstraints_left(void *sipSelf, PyObject *, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    sipVal = &sipCpp->left;

    return sipConvertFromType(sipVal, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR);
}


extern "C" {static int varset_wxLayoutConstraints_left(void *, PyObject *, PyObject *);}
static int varset_wxLayoutConstraints_left(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::wxIndividualLayoutConstraint *>(sipForceConvertToType(sipPy, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->left = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxLayoutConstraints_right(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLayoutConstraints_right(void *sipSelf, PyObject *, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    sipVal = &sipCpp->right;

    return sipConvertFromType(sipVal, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR);
}


extern "C" {static int varset_wxLayoutConstraints_right(void *, PyObject *, PyObject *);}
static int varset_wxLayoutConstraints_right(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::wxIndividualLayoutConstraint *>(sipForceConvertToType(sipPy, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->right = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxLayoutConstraints_top(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLayoutConstraints_top(void *sipSelf, PyObject *, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    sipVal = &sipCpp->top;

    return sipConvertFromType(sipVal, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR);
}


extern "C" {static int varset_wxLayoutConstraints_top(void *, PyObject *, PyObject *);}
static int varset_wxLayoutConstraints_top(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::wxIndividualLayoutConstraint *>(sipForceConvertToType(sipPy, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->top = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_wxLayoutConstraints_width(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLayoutConstraints_width(void *sipSelf, PyObject *, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    sipVal = &sipCpp->width;

    return sipConvertFromType(sipVal, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR);
}


extern "C" {static int varset_wxLayoutConstraints_width(void *, PyObject *, PyObject *);}
static int varset_wxLayoutConstraints_width(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::wxIndividualLayoutConstraint*sipVal;
     ::wxLayoutConstraints *sipCpp = reinterpret_cast< ::wxLayoutConstraints *>(sipSelf);

    int sipIsErr = 0;

    sipVal = reinterpret_cast< ::wxIndividualLayoutConstraint *>(sipForceConvertToType(sipPy, sipType_wxIndividualLayoutConstraint, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->width = *sipVal;

    return 0;
}

sipVariableDef variables_wxLayoutConstraints[] = {
    {InstanceVariable, sipName_bottom, (PyMethodDef *)varget_wxLayoutConstraints_bottom, (PyMethodDef *)varset_wxLayoutConstraints_bottom, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_centreX, (PyMethodDef *)varget_wxLayoutConstraints_centreX, (PyMethodDef *)varset_wxLayoutConstraints_centreX, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_centreY, (PyMethodDef *)varget_wxLayoutConstraints_centreY, (PyMethodDef *)varset_wxLayoutConstraints_centreY, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_height, (PyMethodDef *)varget_wxLayoutConstraints_height, (PyMethodDef *)varset_wxLayoutConstraints_height, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_left, (PyMethodDef *)varget_wxLayoutConstraints_left, (PyMethodDef *)varset_wxLayoutConstraints_left, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_right, (PyMethodDef *)varget_wxLayoutConstraints_right, (PyMethodDef *)varset_wxLayoutConstraints_right, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_top, (PyMethodDef *)varget_wxLayoutConstraints_top, (PyMethodDef *)varset_wxLayoutConstraints_top, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_width, (PyMethodDef *)varget_wxLayoutConstraints_width, (PyMethodDef *)varset_wxLayoutConstraints_width, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxLayoutConstraints, "LayoutConstraints()");


sipClassTypeDef sipTypeDef__core_wxLayoutConstraints = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxLayoutConstraints,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_LayoutConstraints,
        {0, 0, 1},
        2, methods_wxLayoutConstraints,
        0, SIP_NULLPTR,
        8, variables_wxLayoutConstraints,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxLayoutConstraints,
    -1,
    -1,
    supers_wxLayoutConstraints,
    SIP_NULLPTR,
    init_type_wxLayoutConstraints,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxLayoutConstraints,
    assign_wxLayoutConstraints,
    array_wxLayoutConstraints,
    copy_wxLayoutConstraints,
    release_wxLayoutConstraints,
    cast_wxLayoutConstraints,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
