Ejemplo n.º 1
0
static PyObject *meth_QGLContext_create(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        const QGLContext* a0 = 0;
        QGLContext *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "B|J8", &sipSelf, sipType_QGLContext, &sipCpp, sipType_QGLContext, &a0))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->QGLContext::create(a0) : sipCpp->create(a0));

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QGLContext, sipName_create, doc_QGLContext_create);

    return NULL;
}
Ejemplo n.º 2
0
static PyObject *meth_QGLContext_create(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        const QGLContext* a0 = 0;
        QGLContext *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "B|J8", &sipSelf, sipType_QGLContext, &sipCpp, sipType_QGLContext, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->QGLContext::create(a0) : sipCpp->create(a0));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }