/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.16.1
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtGui.h"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qabstracttextdocumentlayout.sip"
#include <qabstracttextdocumentlayout.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qabstracttextdocumentlayout.sip"
#include <qabstracttextdocumentlayout.h>
#line 31 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQAbstractTextDocumentLayoutSelection.cpp"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qtextcursor.sip"
#include <qtextcursor.h>
#line 35 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQAbstractTextDocumentLayoutSelection.cpp"
#line 319 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qtextformat.sip"
#include <qtextformat.h>
#line 38 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQAbstractTextDocumentLayoutSelection.cpp"


/* Call the instance's destructor. */
extern "C" {static void release_QAbstractTextDocumentLayout_Selection(void *, int);}
static void release_QAbstractTextDocumentLayout_Selection(void *sipCppV, int)
{
    delete reinterpret_cast< ::QAbstractTextDocumentLayout::Selection *>(sipCppV);
}


extern "C" {static void *array_QAbstractTextDocumentLayout_Selection(Py_ssize_t);}
static void *array_QAbstractTextDocumentLayout_Selection(Py_ssize_t sipNrElem)
{
    return new ::QAbstractTextDocumentLayout::Selection[sipNrElem];
}


extern "C" {static void array_delete_QAbstractTextDocumentLayout_Selection(void *);}
static void array_delete_QAbstractTextDocumentLayout_Selection(void *sipCpp)
{
    delete[] reinterpret_cast< ::QAbstractTextDocumentLayout::Selection *>(sipCpp);
}


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


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


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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new ::QAbstractTextDocumentLayout::Selection();

            return sipCpp;
        }
    }

    {
        const ::QAbstractTextDocumentLayout::Selection* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QAbstractTextDocumentLayout_Selection, &a0))
        {
            sipCpp = new ::QAbstractTextDocumentLayout::Selection(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_QAbstractTextDocumentLayout_Selection_cursor(void *, PyObject *, PyObject *);}
static PyObject *varget_QAbstractTextDocumentLayout_Selection_cursor(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::QTextCursor*sipVal;
    ::QAbstractTextDocumentLayout::Selection *sipCpp = reinterpret_cast< ::QAbstractTextDocumentLayout::Selection *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -25);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->cursor;

    sipPy = sipConvertFromType(sipVal, sipType_QTextCursor, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -24, sipPySelf);
        sipKeepReference(sipPySelf, -25, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QAbstractTextDocumentLayout_Selection_cursor(void *, PyObject *, PyObject *);}
static int varset_QAbstractTextDocumentLayout_Selection_cursor(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::QTextCursor*sipVal;
    ::QAbstractTextDocumentLayout::Selection *sipCpp = reinterpret_cast< ::QAbstractTextDocumentLayout::Selection *>(sipSelf);

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::QTextCursor *>(sipForceConvertToType(sipPy, sipType_QTextCursor, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->cursor = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QAbstractTextDocumentLayout_Selection_format(void *, PyObject *, PyObject *);}
static PyObject *varget_QAbstractTextDocumentLayout_Selection_format(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
    ::QTextCharFormat*sipVal;
    ::QAbstractTextDocumentLayout::Selection *sipCpp = reinterpret_cast< ::QAbstractTextDocumentLayout::Selection *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -27);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->format;

    sipPy = sipConvertFromType(sipVal, sipType_QTextCharFormat, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -26, sipPySelf);
        sipKeepReference(sipPySelf, -27, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QAbstractTextDocumentLayout_Selection_format(void *, PyObject *, PyObject *);}
static int varset_QAbstractTextDocumentLayout_Selection_format(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::QTextCharFormat*sipVal;
    ::QAbstractTextDocumentLayout::Selection *sipCpp = reinterpret_cast< ::QAbstractTextDocumentLayout::Selection *>(sipSelf);

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::QTextCharFormat *>(sipForceConvertToType(sipPy, sipType_QTextCharFormat, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->format = *sipVal;

    return 0;
}

sipVariableDef variables_QAbstractTextDocumentLayout_Selection[] = {
    {InstanceVariable, sipName_cursor, (PyMethodDef *)varget_QAbstractTextDocumentLayout_Selection_cursor, (PyMethodDef *)varset_QAbstractTextDocumentLayout_Selection_cursor, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_format, (PyMethodDef *)varget_QAbstractTextDocumentLayout_Selection_format, (PyMethodDef *)varset_QAbstractTextDocumentLayout_Selection_format, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QAbstractTextDocumentLayout_Selection, "\1QAbstractTextDocumentLayout.Selection()\n"
"QAbstractTextDocumentLayout.Selection(a0: QAbstractTextDocumentLayout.Selection)");


sipClassTypeDef sipTypeDef_QtGui_QAbstractTextDocumentLayout_Selection = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QAbstractTextDocumentLayout__Selection,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_Selection,
        {3, 255, 0},
        0, SIP_NULLPTR,
        2, variables_QAbstractTextDocumentLayout_Selection,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QAbstractTextDocumentLayout_Selection,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QAbstractTextDocumentLayout_Selection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QAbstractTextDocumentLayout_Selection,
    assign_QAbstractTextDocumentLayout_Selection,
    array_QAbstractTextDocumentLayout_Selection,
    copy_QAbstractTextDocumentLayout_Selection,
    release_QAbstractTextDocumentLayout_Selection,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QAbstractTextDocumentLayout_Selection,
    sizeof (::QAbstractTextDocumentLayout::Selection),
};
