/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * 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/qfont.sip"
#include <qfont.h>
#line 267 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qfont.sip"
#include <qfont.h>
#line 31 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFontTag.cpp"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qanystringview.sip"
#include <qanystringview.h>
#line 35 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFontTag.cpp"
#line 27 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpycore_std_optional.sip"
#include <optional>
#line 38 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFontTag.cpp"
#line 30 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 41 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFontTag.cpp"


PyDoc_STRVAR(doc_QFont_Tag_isValid, "isValid(self) -> bool");

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

    {
        const ::QFont::Tag *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_Tag, sipName_isValid, doc_QFont_Tag_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFont_Tag_value, "value(self) -> int");

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

    {
        const ::QFont::Tag *sipCpp;

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

            sipRes = sipCpp->value();

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_Tag, sipName_value, doc_QFont_Tag_value);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFont_Tag_toString, "toString(self) -> QByteArray");

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

    {
        const ::QFont::Tag *sipCpp;

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

            sipRes = new ::QByteArray(sipCpp->toString());

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

    sipNoMethod(sipParseErr, sipName_Tag, sipName_toString, doc_QFont_Tag_toString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFont_Tag_fromValue, "fromValue(value: int) -> QFont.Tag|None");

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

    {
        ::quint32 a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "Cu", &sipSelf, &a0))
        {
            std::optional< ::QFont::Tag>*sipRes;

            sipRes = new std::optional< ::QFont::Tag>(::QFont::Tag::fromValue(a0));

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

    sipNoMethod(sipParseErr, sipName_Tag, sipName_fromValue, doc_QFont_Tag_fromValue);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFont_Tag_fromString, "fromString(view: QByteArray|bytes|bytearray|memoryview|str|None) -> QFont.Tag|None");

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

    {
        ::QAnyStringView* a0;
        int a0State = 0;
        void *a0UserState = SIP_NULLPTR;

        if (sipParseArgs(&sipParseErr, sipArgs, "CJ1", &sipSelf, sipType_QAnyStringView, &a0, &a0State, &a0UserState))
        {
            std::optional< ::QFont::Tag>*sipRes;

            sipRes = new std::optional< ::QFont::Tag>(::QFont::Tag::fromString(*a0));
            sipReleaseTypeUS(a0, sipType_QAnyStringView, a0State, a0UserState);

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

    sipNoMethod(sipParseErr, sipName_Tag, sipName_fromString, doc_QFont_Tag_fromString);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QFont_Tag___ne__(PyObject *, PyObject *);}
static PyObject *slot_QFont_Tag___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QFont::Tag *sipCpp = reinterpret_cast< ::QFont::Tag *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QFont_Tag));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QFont::Tag* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QFont_Tag, &a0))
        {
            bool sipRes;

            sipRes = operator!=((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtGui, ne_slot, sipType_QFont_Tag, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QFont_Tag___eq__(PyObject *, PyObject *);}
static PyObject *slot_QFont_Tag___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QFont::Tag *sipCpp = reinterpret_cast< ::QFont::Tag *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QFont_Tag));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QFont::Tag* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QFont_Tag, &a0))
        {
            bool sipRes;

            sipRes = operator==((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtGui, eq_slot, sipType_QFont_Tag, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QFont_Tag___ge__(PyObject *, PyObject *);}
static PyObject *slot_QFont_Tag___ge__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QFont::Tag *sipCpp = reinterpret_cast< ::QFont::Tag *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QFont_Tag));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QFont::Tag* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QFont_Tag, &a0))
        {
            bool sipRes;

            sipRes = operator>=((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtGui, ge_slot, sipType_QFont_Tag, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QFont_Tag___le__(PyObject *, PyObject *);}
static PyObject *slot_QFont_Tag___le__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QFont::Tag *sipCpp = reinterpret_cast< ::QFont::Tag *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QFont_Tag));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QFont::Tag* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QFont_Tag, &a0))
        {
            bool sipRes;

            sipRes = operator<=((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtGui, le_slot, sipType_QFont_Tag, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QFont_Tag___gt__(PyObject *, PyObject *);}
static PyObject *slot_QFont_Tag___gt__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QFont::Tag *sipCpp = reinterpret_cast< ::QFont::Tag *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QFont_Tag));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QFont::Tag* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QFont_Tag, &a0))
        {
            bool sipRes;

            sipRes = operator>((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtGui, gt_slot, sipType_QFont_Tag, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QFont_Tag___lt__(PyObject *, PyObject *);}
static PyObject *slot_QFont_Tag___lt__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QFont::Tag *sipCpp = reinterpret_cast< ::QFont::Tag *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QFont_Tag));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QFont::Tag* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QFont_Tag, &a0))
        {
            bool sipRes;

            sipRes = operator<((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtGui, lt_slot, sipType_QFont_Tag, sipSelf, sipArg);
}


extern "C" {static Py_hash_t slot_QFont_Tag___hash__(PyObject *);}
static Py_hash_t slot_QFont_Tag___hash__(PyObject *sipSelf)
{
    ::QFont::Tag *sipCpp = reinterpret_cast< ::QFont::Tag *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QFont_Tag));

    if (!sipCpp)
        return 0;


    {
        {
            Py_hash_t sipRes = 0;

#line 289 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qfont.sip"
            sipRes = qHash(*sipCpp);
#line 366 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFontTag.cpp"

            return sipRes;
        }
    }

    return 0;
}


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


extern "C" {static void *array_QFont_Tag(Py_ssize_t);}
static void *array_QFont_Tag(Py_ssize_t sipNrElem)
{
    return new ::QFont::Tag[sipNrElem];
}


extern "C" {static void array_delete_QFont_Tag(void *);}
static void array_delete_QFont_Tag(void *sipCpp)
{
    delete[] reinterpret_cast< ::QFont::Tag *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        ::QAnyStringView* a0;
        int a0State = 0;
        void *a0UserState = SIP_NULLPTR;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QAnyStringView, &a0, &a0State, &a0UserState))
        {
#line 273 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qfont.sip"
            // This is the easiest way to implement this ctor.
            std::optional<::QFont::Tag> opt_tag = ::QFont::Tag::fromString(*a0);
            
            if (opt_tag.has_value())
                sipCpp = new ::QFont::Tag(opt_tag.value());
            else
                sipCpp = new ::QFont::Tag;
#line 451 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQFontTag.cpp"
            sipReleaseTypeUS(a0, sipType_QAnyStringView, a0State, a0UserState);

            return sipCpp;
        }
    }

    {
        const ::QFont::Tag* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QFont_Tag, &a0))
        {
            sipCpp = new ::QFont::Tag(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QFont_Tag[] = {
    {(void *)slot_QFont_Tag___ne__, ne_slot},
    {(void *)slot_QFont_Tag___eq__, eq_slot},
    {(void *)slot_QFont_Tag___ge__, ge_slot},
    {(void *)slot_QFont_Tag___le__, le_slot},
    {(void *)slot_QFont_Tag___gt__, gt_slot},
    {(void *)slot_QFont_Tag___lt__, lt_slot},
    {(void *)slot_QFont_Tag___hash__, hash_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QFont_Tag[] = {
    {sipName_fromString, meth_QFont_Tag_fromString, METH_VARARGS, doc_QFont_Tag_fromString},
    {sipName_fromValue, meth_QFont_Tag_fromValue, METH_VARARGS, doc_QFont_Tag_fromValue},
    {sipName_isValid, meth_QFont_Tag_isValid, METH_VARARGS, doc_QFont_Tag_isValid},
    {sipName_toString, meth_QFont_Tag_toString, METH_VARARGS, doc_QFont_Tag_toString},
    {sipName_value, meth_QFont_Tag_value, METH_VARARGS, doc_QFont_Tag_value}
};

PyDoc_STRVAR(doc_QFont_Tag, "\1QFont.Tag()\n"
"QFont.Tag(view: QByteArray|bytes|bytearray|memoryview|str|None)\n"
"QFont.Tag(a0: QFont.Tag)");


sipClassTypeDef sipTypeDef_QtGui_QFont_Tag = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QFont__Tag,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_Tag,
        {75, 255, 0},
        5, methods_QFont_Tag,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QFont_Tag,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QFont_Tag,
    init_type_QFont_Tag,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QFont_Tag,
    assign_QFont_Tag,
    array_QFont_Tag,
    copy_QFont_Tag,
    release_QFont_Tag,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QFont_Tag,
    sizeof (::QFont::Tag),
};
