This commit is contained in:
rattatwinko
2025-05-25 20:42:58 +02:00
commit 8e9b2568b2
4902 changed files with 1152638 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
# Automatically generated configuration for PyQt5.QtQuick.
sip-version = "6.8.6"
sip-abi-version = "12.15"
module-tags = ["Qt_5_15_14", "WS_X11"]
module-disabled-features = []

View File

@@ -0,0 +1,75 @@
// QtQuickmod.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%Module(name=PyQt5.QtQuick, keyword_arguments="Optional", use_limited_api=True)
%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip
%Import QtQml/QtQmlmod.sip
%Copying
Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
This file is part of PyQt5.
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.
%End
%DefaultSupertype sip.simplewrapper
%Include qquickframebufferobject.sip
%Include qquickimageprovider.sip
%Include qquickitem.sip
%Include qquickitemgrabresult.sip
%Include qquickpainteditem.sip
%Include qquickrendercontrol.sip
%Include qquicktextdocument.sip
%Include qquickview.sip
%Include qquickwindow.sip
%Include qsgabstractrenderer.sip
%Include qsgengine.sip
%Include qsgflatcolormaterial.sip
%Include qsggeometry.sip
%Include qsgimagenode.sip
%Include qsgmaterial.sip
%Include qsgmaterialrhishader.sip
%Include qsgnode.sip
%Include qsgrectanglenode.sip
%Include qsgrendererinterface.sip
%Include qsgrendernode.sip
%Include qsgsimplerectnode.sip
%Include qsgsimpletexturenode.sip
%Include qsgtexture.sip
%Include qsgtexturematerial.sip
%Include qsgtextureprovider.sip
%Include qsgvertexcolormaterial.sip

View File

@@ -0,0 +1,88 @@
// qquickframebufferobject.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_2_0 -)
class QQuickFramebufferObject : public QQuickItem /ExportDerived/
{
%TypeHeaderCode
#include <qquickframebufferobject.h>
%End
public:
class Renderer /Supertype=sip.wrapper/
{
%TypeHeaderCode
#include <qquickframebufferobject.h>
%End
protected:
Renderer();
virtual ~Renderer();
virtual void render() = 0;
%If (PyQt_OpenGL)
virtual QOpenGLFramebufferObject *createFramebufferObject(const QSize &size);
%End
virtual void synchronize(QQuickFramebufferObject *);
%If (PyQt_OpenGL)
QOpenGLFramebufferObject *framebufferObject() const;
%End
void update();
void invalidateFramebufferObject();
};
QQuickFramebufferObject(QQuickItem *parent /TransferThis/ = 0);
bool textureFollowsItemSize() const;
void setTextureFollowsItemSize(bool follows);
virtual QQuickFramebufferObject::Renderer *createRenderer() const = 0 /Factory/;
protected:
virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
virtual QSGNode *updatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *);
signals:
void textureFollowsItemSizeChanged(bool);
public:
%If (Qt_5_4_0 -)
virtual bool isTextureProvider() const;
%End
%If (Qt_5_4_0 -)
virtual QSGTextureProvider *textureProvider() const;
%End
%If (Qt_5_4_0 -)
virtual void releaseResources();
%End
%If (Qt_5_6_0 -)
bool mirrorVertically() const;
%End
%If (Qt_5_6_0 -)
void setMirrorVertically(bool enable);
%End
signals:
%If (Qt_5_6_0 -)
void mirrorVerticallyChanged(bool);
%End
};
%End

View File

@@ -0,0 +1,93 @@
// qquickimageprovider.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QQuickTextureFactory : public QObject
{
%TypeHeaderCode
#include <qquickimageprovider.h>
%End
public:
QQuickTextureFactory();
virtual ~QQuickTextureFactory();
virtual QSGTexture *createTexture(QQuickWindow *window) const = 0 /Factory/;
virtual QSize textureSize() const = 0;
virtual int textureByteCount() const = 0;
virtual QImage image() const;
%If (Qt_5_6_0 -)
static QQuickTextureFactory *textureFactoryForImage(const QImage &image) /Factory/;
%End
};
class QQuickImageProvider : public QQmlImageProviderBase
{
%TypeHeaderCode
#include <qquickimageprovider.h>
%End
public:
QQuickImageProvider(QQmlImageProviderBase::ImageType type, QQmlImageProviderBase::Flags flags = QQmlImageProviderBase::Flags());
virtual ~QQuickImageProvider();
virtual QQmlImageProviderBase::ImageType imageType() const;
virtual QQmlImageProviderBase::Flags flags() const;
virtual QImage requestImage(const QString &id, QSize *size /Out/, const QSize &requestedSize);
virtual QPixmap requestPixmap(const QString &id, QSize *size /Out/, const QSize &requestedSize);
virtual QQuickTextureFactory *requestTexture(const QString &id, QSize *size /Out/, const QSize &requestedSize) /Factory/;
};
%If (Qt_5_6_0 -)
class QQuickImageResponse : public QObject
{
%TypeHeaderCode
#include <qquickimageprovider.h>
%End
public:
QQuickImageResponse();
virtual ~QQuickImageResponse();
virtual QQuickTextureFactory *textureFactory() const = 0 /Factory/;
virtual QString errorString() const;
public slots:
virtual void cancel();
signals:
void finished();
};
%End
%If (Qt_5_6_0 -)
class QQuickAsyncImageProvider : public QQuickImageProvider
{
%TypeHeaderCode
#include <qquickimageprovider.h>
%End
public:
QQuickAsyncImageProvider();
virtual ~QQuickAsyncImageProvider();
virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) = 0 /Factory/;
};
%End

View File

@@ -0,0 +1,324 @@
// qquickitem.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QQuickItem : public QObject, public QQmlParserStatus /ExportDerived/
{
%TypeHeaderCode
#include <qquickitem.h>
%End
public:
enum Flag
{
ItemClipsChildrenToShape,
ItemAcceptsInputMethod,
ItemIsFocusScope,
ItemHasContents,
ItemAcceptsDrops,
};
typedef QFlags<QQuickItem::Flag> Flags;
enum ItemChange
{
ItemChildAddedChange,
ItemChildRemovedChange,
ItemSceneChange,
ItemVisibleHasChanged,
ItemParentHasChanged,
ItemOpacityHasChanged,
ItemActiveFocusHasChanged,
ItemRotationHasChanged,
%If (Qt_5_3_0 -)
ItemAntialiasingHasChanged,
%End
%If (Qt_5_6_0 -)
ItemDevicePixelRatioHasChanged,
%End
%If (Qt_5_10_0 -)
ItemEnabledHasChanged,
%End
};
struct ItemChangeData
{
%TypeHeaderCode
#include <qquickitem.h>
%End
ItemChangeData(QQuickItem *v);
ItemChangeData(QQuickWindow *v);
ItemChangeData(qreal v /Constrained/);
ItemChangeData(bool v /Constrained/);
QQuickItem *item;
QQuickWindow *window;
qreal realValue;
bool boolValue;
};
enum TransformOrigin
{
TopLeft,
Top,
TopRight,
Left,
Center,
Right,
BottomLeft,
Bottom,
BottomRight,
};
%If (Qt_5_6_1 -)
explicit QQuickItem(QQuickItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_6_1)
QQuickItem(QQuickItem *parent /TransferThis/ = 0);
%End
virtual ~QQuickItem();
QQuickWindow *window() const;
QQuickItem *parentItem() const;
void setParentItem(QQuickItem *parent);
void stackBefore(const QQuickItem *);
void stackAfter(const QQuickItem *);
QRectF childrenRect();
QList<QQuickItem *> childItems() const;
bool clip() const;
void setClip(bool);
QString state() const;
void setState(const QString &);
qreal baselineOffset() const;
void setBaselineOffset(qreal);
qreal x() const;
qreal y() const;
void setX(qreal);
void setY(qreal);
qreal width() const;
void setWidth(qreal);
void resetWidth();
void setImplicitWidth(qreal);
qreal implicitWidth() const;
qreal height() const;
void setHeight(qreal);
void resetHeight();
void setImplicitHeight(qreal);
qreal implicitHeight() const;
QQuickItem::TransformOrigin transformOrigin() const;
void setTransformOrigin(QQuickItem::TransformOrigin);
qreal z() const;
void setZ(qreal);
qreal rotation() const;
void setRotation(qreal);
qreal scale() const;
void setScale(qreal);
qreal opacity() const;
void setOpacity(qreal);
bool isVisible() const;
void setVisible(bool);
bool isEnabled() const;
void setEnabled(bool);
bool smooth() const;
void setSmooth(bool);
bool antialiasing() const;
void setAntialiasing(bool);
QQuickItem::Flags flags() const;
void setFlag(QQuickItem::Flag flag, bool enabled = true);
void setFlags(QQuickItem::Flags flags);
bool hasActiveFocus() const;
bool hasFocus() const;
void setFocus(bool);
bool isFocusScope() const;
QQuickItem *scopedFocusItem() const;
Qt::MouseButtons acceptedMouseButtons() const;
void setAcceptedMouseButtons(Qt::MouseButtons buttons);
bool acceptHoverEvents() const;
void setAcceptHoverEvents(bool enabled);
QCursor cursor() const;
void setCursor(const QCursor &cursor);
void unsetCursor();
void grabMouse();
void ungrabMouse();
bool keepMouseGrab() const;
void setKeepMouseGrab(bool);
bool filtersChildMouseEvents() const;
void setFiltersChildMouseEvents(bool filter);
void grabTouchPoints(const QVector<int> &ids);
void ungrabTouchPoints();
bool keepTouchGrab() const;
void setKeepTouchGrab(bool);
virtual bool contains(const QPointF &point) const;
QPointF mapToItem(const QQuickItem *item, const QPointF &point) const;
QPointF mapToScene(const QPointF &point) const;
QRectF mapRectToItem(const QQuickItem *item, const QRectF &rect) const;
QRectF mapRectToScene(const QRectF &rect) const;
QPointF mapFromItem(const QQuickItem *item, const QPointF &point) const;
QPointF mapFromScene(const QPointF &point) const;
QRectF mapRectFromItem(const QQuickItem *item, const QRectF &rect) const;
QRectF mapRectFromScene(const QRectF &rect) const;
void polish();
void forceActiveFocus();
QQuickItem *childAt(qreal x, qreal y) const;
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
struct UpdatePaintNodeData
{
%TypeHeaderCode
#include <qquickitem.h>
%End
QSGTransformNode *transformNode;
private:
UpdatePaintNodeData();
};
virtual bool isTextureProvider() const;
virtual QSGTextureProvider *textureProvider() const;
public slots:
void update() /ReleaseGIL/;
protected:
virtual bool event(QEvent *);
bool isComponentComplete() const;
virtual void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &);
void updateInputMethod(Qt::InputMethodQueries queries = Qt::InputMethodQuery::ImQueryInput);
bool widthValid() const;
bool heightValid() const;
virtual void classBegin();
virtual void componentComplete();
virtual void keyPressEvent(QKeyEvent *event);
virtual void keyReleaseEvent(QKeyEvent *event);
virtual void inputMethodEvent(QInputMethodEvent *);
virtual void focusInEvent(QFocusEvent *);
virtual void focusOutEvent(QFocusEvent *);
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
virtual void mouseDoubleClickEvent(QMouseEvent *event);
virtual void mouseUngrabEvent();
virtual void touchUngrabEvent();
virtual void wheelEvent(QWheelEvent *event);
virtual void touchEvent(QTouchEvent *event);
virtual void hoverEnterEvent(QHoverEvent *event);
virtual void hoverMoveEvent(QHoverEvent *event);
virtual void hoverLeaveEvent(QHoverEvent *event);
virtual void dragEnterEvent(QDragEnterEvent *);
virtual void dragMoveEvent(QDragMoveEvent *);
virtual void dragLeaveEvent(QDragLeaveEvent *);
virtual void dropEvent(QDropEvent *);
virtual bool childMouseEventFilter(QQuickItem *, QEvent *);
virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
virtual QSGNode *updatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *);
%VirtualCatcherCode
PyObject *res;
res = sipCallMethod(&sipIsErr, sipMethod, "DD",
a0, sipType_QSGNode, NULL,
a1, sipType_QQuickItem_UpdatePaintNodeData, NULL);
if (res)
{
sipParseResult(&sipIsErr, sipMethod, res, "H0", sipType_QSGNode, &sipRes);
if (!sipIsErr && sipRes && (sipRes->flags() & QSGNode::OwnedByParent))
sipTransferTo(res, (PyObject *)sipPySelf);
Py_DECREF(res);
}
%End
virtual void releaseResources();
virtual void updatePolish();
public:
%If (Qt_5_1_0 -)
bool activeFocusOnTab() const;
%End
%If (Qt_5_1_0 -)
void setActiveFocusOnTab(bool);
%End
%If (Qt_5_1_0 -)
void setFocus(bool focus, Qt::FocusReason reason);
%End
%If (Qt_5_1_0 -)
void forceActiveFocus(Qt::FocusReason reason);
%End
%If (Qt_5_1_0 -)
QQuickItem *nextItemInFocusChain(bool forward = true);
%End
signals:
%If (Qt_5_1_0 -)
void windowChanged(QQuickWindow *window);
%End
public:
%If (Qt_5_3_0 -)
void resetAntialiasing();
%End
%If (Qt_5_4_0 -)
QQuickItemGrabResult *grabToImage(const QSize &targetSize = QSize()) /Factory/;
%MethodCode
QSharedPointer<QQuickItemGrabResult> *grab;
Py_BEGIN_ALLOW_THREADS
// This will leak but there seems to be no way to detach the object.
grab = new QSharedPointer<QQuickItemGrabResult>(sipCpp->grabToImage(*a0));
Py_END_ALLOW_THREADS
sipRes = grab->data();
%End
%End
%If (Qt_5_7_0 -)
bool isAncestorOf(const QQuickItem *child) const;
%End
%If (Qt_5_7_0 -)
QPointF mapToGlobal(const QPointF &point) const;
%End
%If (Qt_5_7_0 -)
QPointF mapFromGlobal(const QPointF &point) const;
%End
%If (Qt_5_10_0 -)
QSizeF size() const;
%End
%If (Qt_5_10_0 -)
bool acceptTouchEvents() const;
%End
%If (Qt_5_10_0 -)
void setAcceptTouchEvents(bool accept);
%End
%If (Qt_5_11_0 -)
QObject *containmentMask() const;
%End
%If (Qt_5_11_0 -)
void setContainmentMask(QObject *mask /KeepReference/);
%End
signals:
%If (Qt_5_11_0 -)
void containmentMaskChanged();
%End
};
QFlags<QQuickItem::Flag> operator|(QQuickItem::Flag f1, QFlags<QQuickItem::Flag> f2);

View File

@@ -0,0 +1,53 @@
// qquickitemgrabresult.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_4_0 -)
class QQuickItemGrabResult : public QObject
{
%TypeHeaderCode
#include <qquickitemgrabresult.h>
%End
public:
QImage image() const;
QUrl url() const;
%If (Qt_5_9_0 -)
bool saveToFile(const QString &fileName) const;
%End
%If (- Qt_5_9_0)
%If (Qt_5_11_0 -)
bool saveToFile(const QString &fileName);
%End
%End
protected:
virtual bool event(QEvent *);
signals:
void ready();
private:
QQuickItemGrabResult(QObject *parent = 0);
};
%End

View File

@@ -0,0 +1,112 @@
// qquickpainteditem.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QQuickPaintedItem : public QQuickItem /ExportDerived/
{
%TypeHeaderCode
#include <qquickpainteditem.h>
%End
public:
%If (Qt_5_6_1 -)
explicit QQuickPaintedItem(QQuickItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_6_1)
QQuickPaintedItem(QQuickItem *parent /TransferThis/ = 0);
%End
virtual ~QQuickPaintedItem();
enum RenderTarget
{
Image,
FramebufferObject,
InvertedYFramebufferObject,
};
enum PerformanceHint
{
FastFBOResizing,
};
typedef QFlags<QQuickPaintedItem::PerformanceHint> PerformanceHints;
void update(const QRect &rect = QRect());
bool opaquePainting() const;
void setOpaquePainting(bool opaque);
bool antialiasing() const;
void setAntialiasing(bool enable);
bool mipmap() const;
void setMipmap(bool enable);
QQuickPaintedItem::PerformanceHints performanceHints() const;
void setPerformanceHint(QQuickPaintedItem::PerformanceHint hint, bool enabled = true);
void setPerformanceHints(QQuickPaintedItem::PerformanceHints hints);
QRectF contentsBoundingRect() const;
QSize contentsSize() const;
void setContentsSize(const QSize &);
void resetContentsSize();
qreal contentsScale() const;
void setContentsScale(qreal);
QColor fillColor() const;
void setFillColor(const QColor &);
QQuickPaintedItem::RenderTarget renderTarget() const;
void setRenderTarget(QQuickPaintedItem::RenderTarget target);
virtual void paint(QPainter *painter) = 0;
signals:
void fillColorChanged();
void contentsSizeChanged();
void contentsScaleChanged();
void renderTargetChanged();
protected:
virtual QSGNode *updatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *);
public:
%If (Qt_5_4_0 -)
virtual bool isTextureProvider() const;
%End
%If (Qt_5_4_0 -)
virtual QSGTextureProvider *textureProvider() const;
%End
protected:
%If (Qt_5_4_0 -)
virtual void releaseResources();
%End
%If (Qt_5_6_1 -)
virtual void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &);
%End
public:
%If (Qt_5_6_0 -)
QSize textureSize() const;
%End
%If (Qt_5_6_0 -)
void setTextureSize(const QSize &size);
%End
signals:
%If (Qt_5_6_0 -)
void textureSizeChanged();
%End
};
QFlags<QQuickPaintedItem::PerformanceHint> operator|(QQuickPaintedItem::PerformanceHint f1, QFlags<QQuickPaintedItem::PerformanceHint> f2);

View File

@@ -0,0 +1,58 @@
// qquickrendercontrol.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_4_0 -)
class QQuickRenderControl : public QObject
{
%TypeHeaderCode
#include <qquickrendercontrol.h>
%End
public:
%If (Qt_5_6_1 -)
explicit QQuickRenderControl(QObject *parent /TransferThis/ = 0);
%End
%If (- Qt_5_6_1)
QQuickRenderControl(QObject *parent /TransferThis/ = 0);
%End
virtual ~QQuickRenderControl();
%If (PyQt_OpenGL)
void initialize(QOpenGLContext *gl);
%End
void invalidate();
void polishItems();
void render();
bool sync();
QImage grab();
static QWindow *renderWindowFor(QQuickWindow *win, QPoint *offset = 0);
virtual QWindow *renderWindow(QPoint *offset);
%If (Qt_5_5_0 -)
void prepareThread(QThread *targetThread);
%End
signals:
void renderRequested();
void sceneChanged();
};
%End

View File

@@ -0,0 +1,39 @@
// qquicktextdocument.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_1_0 -)
class QQuickTextDocument : public QObject
{
%TypeHeaderCode
#include <qquicktextdocument.h>
%End
public:
QQuickTextDocument(QQuickItem *parent /TransferThis/);
QTextDocument *textDocument() const;
private:
QQuickTextDocument(const QQuickTextDocument &);
};
%End

View File

@@ -0,0 +1,77 @@
// qquickview.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QQuickView : public QQuickWindow /ExportDerived/
{
%TypeHeaderCode
#include <qquickview.h>
%End
public:
explicit QQuickView(QWindow *parent /TransferThis/ = 0);
QQuickView(QQmlEngine *engine, QWindow *parent /TransferThis/);
QQuickView(const QUrl &source, QWindow *parent /TransferThis/ = 0);
virtual ~QQuickView() /ReleaseGIL/;
QUrl source() const;
QQmlEngine *engine() const;
QQmlContext *rootContext() const;
QQuickItem *rootObject() const;
enum ResizeMode
{
SizeViewToRootObject,
SizeRootObjectToView,
};
QQuickView::ResizeMode resizeMode() const;
void setResizeMode(QQuickView::ResizeMode);
enum Status
{
Null,
Ready,
Loading,
Error,
};
QQuickView::Status status() const;
QList<QQmlError> errors() const;
QSize initialSize() const;
public slots:
void setSource(const QUrl &) /ReleaseGIL/;
%If (Qt_5_14_0 -)
void setInitialProperties(const QVariantMap &initialProperties);
%End
signals:
void statusChanged(QQuickView::Status);
protected:
virtual void resizeEvent(QResizeEvent *);
virtual void timerEvent(QTimerEvent *);
virtual void keyPressEvent(QKeyEvent *);
virtual void keyReleaseEvent(QKeyEvent *);
virtual void mousePressEvent(QMouseEvent *);
virtual void mouseReleaseEvent(QMouseEvent *);
virtual void mouseMoveEvent(QMouseEvent *);
};

View File

@@ -0,0 +1,331 @@
// qquickwindow.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QQuickWindow : public QWindow /ExportDerived/
{
%TypeHeaderCode
#include <qquickwindow.h>
%End
%ConvertToSubClassCode
static struct class_graph {
const char *name;
sipTypeDef **type;
int yes, no;
} graph[] = {
#if QT_VERSION >= 0x050400
{sipName_QSGEngine, &sipType_QSGEngine, -1, 1},
#else
{0, 0, -1, 1},
#endif
{sipName_QQuickItem, &sipType_QQuickItem, 11, 2},
#if QT_VERSION >= 0x050400
{sipName_QQuickItemGrabResult, &sipType_QQuickItemGrabResult, -1, 3},
#else
{0, 0, -1, 3},
#endif
{sipName_QSGTexture, &sipType_QSGTexture, 13, 4},
#if QT_VERSION >= 0x050100
{sipName_QQuickTextDocument, &sipType_QQuickTextDocument, -1, 5},
#else
{0, 0, -1, 5},
#endif
#if QT_VERSION >= 0x050400
{sipName_QSGAbstractRenderer, &sipType_QSGAbstractRenderer, -1, 6},
#else
{0, 0, -1, 6},
#endif
#if QT_VERSION >= 0x050600
{sipName_QQuickImageResponse, &sipType_QQuickImageResponse, -1, 7},
#else
{0, 0, -1, 7},
#endif
{sipName_QQuickTextureFactory, &sipType_QQuickTextureFactory, -1, 8},
#if QT_VERSION >= 0x050400
{sipName_QQuickRenderControl, &sipType_QQuickRenderControl, -1, 9},
#else
{0, 0, -1, 9},
#endif
{sipName_QSGTextureProvider, &sipType_QSGTextureProvider, -1, 10},
{sipName_QQuickWindow, &sipType_QQuickWindow, 14, -1},
#if QT_VERSION >= 0x050200
{sipName_QQuickFramebufferObject, &sipType_QQuickFramebufferObject, -1, 12},
#else
{0, 0, -1, 12},
#endif
{sipName_QQuickPaintedItem, &sipType_QQuickPaintedItem, -1, -1},
{sipName_QSGDynamicTexture, &sipType_QSGDynamicTexture, -1, -1},
{sipName_QQuickView, &sipType_QQuickView, -1, -1},
};
int i = 0;
sipType = NULL;
do
{
struct class_graph *cg = &graph[i];
if (cg->name != NULL && sipCpp->inherits(cg->name))
{
sipType = *cg->type;
i = cg->yes;
}
else
i = cg->no;
}
while (i >= 0);
%End
public:
enum CreateTextureOption
{
TextureHasAlphaChannel,
TextureHasMipmaps,
TextureOwnsGLTexture,
%If (Qt_5_2_0 -)
TextureCanUseAtlas,
%End
%If (Qt_5_6_0 -)
TextureIsOpaque,
%End
};
typedef QFlags<QQuickWindow::CreateTextureOption> CreateTextureOptions;
%If (Qt_5_6_1 -)
explicit QQuickWindow(QWindow *parent /TransferThis/ = 0);
%End
%If (- Qt_5_6_1)
QQuickWindow(QWindow *parent /TransferThis/ = 0);
%End
virtual ~QQuickWindow() /ReleaseGIL/;
QQuickItem *contentItem() const;
QQuickItem *activeFocusItem() const;
virtual QObject *focusObject() const;
QQuickItem *mouseGrabberItem() const;
bool sendEvent(QQuickItem *, QEvent *);
QImage grabWindow() /ReleaseGIL/;
%If (PyQt_OpenGL)
void setRenderTarget(QOpenGLFramebufferObject *fbo);
%End
%If (PyQt_OpenGL)
QOpenGLFramebufferObject *renderTarget() const;
%End
void setRenderTarget(uint fboId, const QSize &size);
uint renderTargetId() const;
QSize renderTargetSize() const;
QQmlIncubationController *incubationController() const;
QSGTexture *createTextureFromImage(const QImage &image) const /Factory/;
%If (Qt_5_2_0 -)
QSGTexture *createTextureFromImage(const QImage &image, QQuickWindow::CreateTextureOptions options) const /Factory/;
%End
QSGTexture *createTextureFromId(uint id, const QSize &size, QQuickWindow::CreateTextureOptions options = QQuickWindow::CreateTextureOption()) const /Factory/;
%If (Qt_5_14_0 -)
QSGTexture *createTextureFromNativeObject(QQuickWindow::NativeObjectType type, const void *nativeObjectPtr, int nativeLayout, const QSize &size, QQuickWindow::CreateTextureOptions options = QQuickWindow::CreateTextureOption()) const /Factory/;
%End
void setClearBeforeRendering(bool enabled);
bool clearBeforeRendering() const;
void setColor(const QColor &color);
QColor color() const;
void setPersistentOpenGLContext(bool persistent);
bool isPersistentOpenGLContext() const;
void setPersistentSceneGraph(bool persistent);
bool isPersistentSceneGraph() const;
%If (PyQt_OpenGL)
QOpenGLContext *openglContext() const;
%End
signals:
void frameSwapped();
void sceneGraphInitialized();
void sceneGraphInvalidated();
void beforeSynchronizing();
void beforeRendering();
void afterRendering();
void colorChanged(const QColor &);
public slots:
void update();
void releaseResources();
protected:
virtual void exposeEvent(QExposeEvent *);
virtual void resizeEvent(QResizeEvent *);
virtual void showEvent(QShowEvent *);
virtual void hideEvent(QHideEvent *);
virtual void focusInEvent(QFocusEvent *);
virtual void focusOutEvent(QFocusEvent *);
virtual bool event(QEvent *);
virtual void keyPressEvent(QKeyEvent *);
virtual void keyReleaseEvent(QKeyEvent *);
virtual void mousePressEvent(QMouseEvent *);
virtual void mouseReleaseEvent(QMouseEvent *);
virtual void mouseDoubleClickEvent(QMouseEvent *);
virtual void mouseMoveEvent(QMouseEvent *);
virtual void wheelEvent(QWheelEvent *);
%If (Qt_5_15_0 -)
virtual void tabletEvent(QTabletEvent *);
%End
public:
%If (Qt_5_1_0 -)
static bool hasDefaultAlphaBuffer();
%End
%If (Qt_5_1_0 -)
static void setDefaultAlphaBuffer(bool useAlpha);
%End
signals:
%If (Qt_5_1_0 -)
void closing(QQuickCloseEvent *close);
%End
%If (Qt_5_1_0 -)
void activeFocusItemChanged();
%End
public:
%If (Qt_5_2_0 -)
%If (PyQt_OpenGL)
void resetOpenGLState();
%End
%End
%If (Qt_5_3_0 -)
enum SceneGraphError
{
ContextNotAvailable,
};
%End
signals:
%If (Qt_5_3_0 -)
%If (PyQt_OpenGL)
void openglContextCreated(QOpenGLContext *context);
%End
%End
%If (Qt_5_3_0 -)
void afterSynchronizing();
%End
%If (Qt_5_3_0 -)
void afterAnimating();
%End
%If (Qt_5_3_0 -)
void sceneGraphAboutToStop();
%End
%If (Qt_5_3_0 -)
void sceneGraphError(QQuickWindow::SceneGraphError error, const QString &message);
%End
public:
%If (Qt_5_4_0 -)
enum RenderStage
{
BeforeSynchronizingStage,
AfterSynchronizingStage,
BeforeRenderingStage,
AfterRenderingStage,
AfterSwapStage,
%If (Qt_5_6_0 -)
NoStage,
%End
};
%End
%If (Qt_5_4_0 -)
void scheduleRenderJob(QRunnable *job /Transfer/, QQuickWindow::RenderStage schedule) /ReleaseGIL/;
%End
%If (Qt_5_4_0 -)
qreal effectiveDevicePixelRatio() const;
%End
%If (Qt_5_5_0 -)
bool isSceneGraphInitialized() const;
%End
%If (Qt_5_8_0 -)
QSGRendererInterface *rendererInterface() const;
%End
%If (Qt_5_8_0 -)
static void setSceneGraphBackend(QSGRendererInterface::GraphicsApi api);
%End
%If (Qt_5_8_0 -)
static void setSceneGraphBackend(const QString &backend);
%End
%If (Qt_5_8_0 -)
QSGRectangleNode *createRectangleNode() const /Factory/;
%End
%If (Qt_5_8_0 -)
QSGImageNode *createImageNode() const /Factory/;
%End
%If (Qt_5_9_0 -)
static QString sceneGraphBackend();
%End
%If (Qt_5_10_0 -)
enum TextRenderType
{
QtTextRendering,
NativeTextRendering,
};
%End
%If (Qt_5_10_0 -)
static QQuickWindow::TextRenderType textRenderType();
%End
%If (Qt_5_10_0 -)
static void setTextRenderType(QQuickWindow::TextRenderType renderType);
%End
%If (Qt_5_14_0 -)
enum NativeObjectType
{
NativeObjectTexture,
};
%End
%If (Qt_5_14_0 -)
void beginExternalCommands();
%End
%If (Qt_5_14_0 -)
void endExternalCommands();
%End
signals:
%If (Qt_5_14_0 -)
void beforeRenderPassRecording();
%End
%If (Qt_5_14_0 -)
void afterRenderPassRecording();
%End
};
%If (Qt_5_1_0 -)
class QQuickCloseEvent;
%End
%ModuleHeaderCode
#include "qpyquick_api.h"
%End
%PostInitialisationCode
qpyquick_post_init();
%End

View File

@@ -0,0 +1,77 @@
// qsgabstractrenderer.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_4_0 -)
class QSGAbstractRenderer : public QObject /NoDefaultCtors/
{
%TypeHeaderCode
#include <qsgabstractrenderer.h>
%End
public:
enum ClearModeBit
{
ClearColorBuffer,
ClearDepthBuffer,
ClearStencilBuffer,
};
typedef QFlags<QSGAbstractRenderer::ClearModeBit> ClearMode;
%If (Qt_5_14_0 -)
enum MatrixTransformFlag
{
MatrixTransformFlipY,
};
%End
%If (Qt_5_14_0 -)
typedef QFlags<QSGAbstractRenderer::MatrixTransformFlag> MatrixTransformFlags;
%End
virtual ~QSGAbstractRenderer();
void setDeviceRect(const QRect &rect);
void setDeviceRect(const QSize &size);
QRect deviceRect() const;
void setViewportRect(const QRect &rect);
void setViewportRect(const QSize &size);
QRect viewportRect() const;
void setProjectionMatrixToRect(const QRectF &rect);
%If (Qt_5_14_0 -)
void setProjectionMatrixToRect(const QRectF &rect, QSGAbstractRenderer::MatrixTransformFlags flags);
%End
void setProjectionMatrix(const QMatrix4x4 &matrix);
QMatrix4x4 projectionMatrix() const;
void setClearColor(const QColor &color);
QColor clearColor() const;
void setClearMode(QSGAbstractRenderer::ClearMode mode);
QSGAbstractRenderer::ClearMode clearMode() const;
virtual void renderScene(uint fboId = 0) = 0;
signals:
void sceneGraphChanged();
};
%End
%If (Qt_5_4_0 -)
QFlags<QSGAbstractRenderer::ClearModeBit> operator|(QSGAbstractRenderer::ClearModeBit f1, QFlags<QSGAbstractRenderer::ClearModeBit> f2);
%End

View File

@@ -0,0 +1,68 @@
// qsgengine.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_4_0 -)
class QSGEngine : public QObject
{
%TypeHeaderCode
#include <qsgengine.h>
%End
public:
enum CreateTextureOption
{
TextureHasAlphaChannel,
TextureOwnsGLTexture,
TextureCanUseAtlas,
%If (Qt_5_6_0 -)
TextureIsOpaque,
%End
};
typedef QFlags<QSGEngine::CreateTextureOption> CreateTextureOptions;
%If (Qt_5_6_1 -)
explicit QSGEngine(QObject *parent /TransferThis/ = 0);
%End
%If (- Qt_5_6_1)
QSGEngine(QObject *parent /TransferThis/ = 0);
%End
virtual ~QSGEngine();
%If (PyQt_OpenGL)
void initialize(QOpenGLContext *context);
%End
void invalidate();
QSGAbstractRenderer *createRenderer() const;
QSGTexture *createTextureFromImage(const QImage &image, QSGEngine::CreateTextureOptions options = QSGEngine::CreateTextureOption()) const;
QSGTexture *createTextureFromId(uint id, const QSize &size, QSGEngine::CreateTextureOptions options = QSGEngine::CreateTextureOption()) const;
%If (Qt_5_8_0 -)
QSGRendererInterface *rendererInterface() const;
%End
%If (Qt_5_8_0 -)
QSGRectangleNode *createRectangleNode() const /Factory/;
%End
%If (Qt_5_8_0 -)
QSGImageNode *createImageNode() const /Factory/;
%End
};
%End

View File

@@ -0,0 +1,36 @@
// qsgflatcolormaterial.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGFlatColorMaterial : public QSGMaterial
{
%TypeHeaderCode
#include <qsgflatcolormaterial.h>
%End
public:
QSGFlatColorMaterial();
virtual QSGMaterialType *type() const;
virtual QSGMaterialShader *createShader() const /Factory/;
void setColor(const QColor &color);
const QColor &color() const;
virtual int compare(const QSGMaterial *other) const;
};

View File

@@ -0,0 +1,407 @@
// qsggeometry.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGGeometry /Supertype=sip.wrapper/
{
%TypeHeaderCode
#include <qsggeometry.h>
%End
public:
// Convenient primitives and drawing modes.
enum /NoScope/
{
GL_BYTE,
%If (PyQt_Desktop_OpenGL)
GL_DOUBLE,
%End
GL_FLOAT,
GL_INT
};
enum /NoScope/
{
GL_POINTS,
GL_LINES,
GL_LINE_LOOP,
GL_LINE_STRIP,
GL_TRIANGLES,
GL_TRIANGLE_STRIP,
GL_TRIANGLE_FAN
};
struct Attribute
{
%TypeHeaderCode
#include <qsggeometry.h>
%End
int position;
int tupleSize;
int type;
uint isVertexCoordinate;
%If (Qt_5_8_0 -)
QSGGeometry::AttributeType attributeType;
%End
static QSGGeometry::Attribute create(int pos, int tupleSize, int primitiveType, bool isPosition = false) /Factory/;
%If (Qt_5_8_0 -)
static QSGGeometry::Attribute createWithAttributeType(int pos, int tupleSize, int primitiveType, QSGGeometry::AttributeType attributeType) /Factory/;
%End
};
struct AttributeSet /NoDefaultCtors/
{
%TypeHeaderCode
#include <qsggeometry.h>
#include <QVector>
%End
AttributeSet(SIP_PYOBJECT attributes /TypeHint="Iterable[QSGGeometry.Attribute]"/, int stride = 0);
%MethodCode
PyObject *iter = PyObject_GetIter(a0);
if (!iter
#if PY_MAJOR_VERSION < 3
|| PyString_Check(a0)
#endif
|| PyUnicode_Check(a0))
{
Py_XDECREF(iter);
PyErr_SetString(PyExc_TypeError, "iterable object expected");
sipError = sipErrorContinue;
}
else
{
QVector<QSGGeometry::Attribute> attrs;
int stride = 0;
for (Py_ssize_t i = 0; ; ++i)
{
PyErr_Clear();
PyObject *itm = PyIter_Next(iter);
if (!itm)
{
if (PyErr_Occurred())
sipError = sipErrorFail;
break;
}
int state, is_err = 0;
QSGGeometry::Attribute *attr;
attr = reinterpret_cast<QSGGeometry::Attribute *>(
sipForceConvertToType(itm, sipType_QSGGeometry_Attribute, 0,
SIP_NOT_NONE, &state, &is_err));
if (is_err)
{
PyErr_Format(PyExc_TypeError,
"index %zd has type '%s' but 'QSGGeometry.Attribute' is expected",
i, sipPyTypeName(Py_TYPE(itm)));
Py_DECREF(itm);
sipError = sipErrorFail;
break;
}
// Calculate the stride if there no explicit one.
if (a1 <= 0)
{
int size;
switch (attr->type)
{
case GL_BYTE:
size = sizeof (qint8);
break;
#if defined(SIPFeature_PyQt_Desktop_OpenGL)
#if GL_DOUBLE != GL_FLOAT
case GL_DOUBLE:
size = sizeof (double);
break;
#endif
#endif
case GL_FLOAT:
size = sizeof (float);
break;
case GL_INT:
size = sizeof (qint32);
break;
default:
size = 0;
}
if (!size)
{
PyErr_Format(PyExc_TypeError,
"index %zd has an unsupported primitive type",
i);
sipReleaseType(attr, sipType_QSGGeometry_Attribute, state);
Py_DECREF(itm);
sipError = sipErrorFail;
break;
}
stride += attr->tupleSize * size;
}
attrs.append(*attr);
sipReleaseType(attr, sipType_QSGGeometry_Attribute, state);
Py_DECREF(itm);
}
Py_DECREF(iter);
if (sipError == sipErrorNone)
{
if (attrs.isEmpty())
{
PyErr_SetString(PyExc_TypeError, "no attributes defined");
sipError = sipErrorFail;
}
else
{
PyObject *bytes = SIPBytes_FromStringAndSize(
reinterpret_cast<char *>(attrs.data()),
sizeof (QSGGeometry::Attribute) * attrs.size());
if (!bytes)
{
sipError = sipErrorFail;
}
else
{
sipCpp = new QSGGeometry::AttributeSet;
sipCpp->count = attrs.size();
sipCpp->stride = (a1 > 0 ? a1 : stride);
sipCpp->attributes = reinterpret_cast<QSGGeometry::Attribute *>(
SIPBytes_AsString(bytes));
sipSetUserObject(sipSelf, bytes);
}
}
}
}
%End
int count;
int stride;
const QSGGeometry::Attribute *attributes /TypeHint="PyQt5.sip.array[QSGGeometry.Attribute]"/ {
%GetCode
sipPy = sipConvertToTypedArray((void *)sipCpp->attributes,
sipType_QSGGeometry_Attribute, "iiiI", sizeof (QSGGeometry::Attribute),
sipCpp->count, SIP_READ_ONLY);
%End
%SetCode
sipErr = 1;
PyErr_SetString(PyExc_ValueError, "array is read-only");
%End
};
};
struct Point2D
{
%TypeHeaderCode
#include <qsggeometry.h>
%End
float x;
float y;
void set(float nx, float ny);
};
struct TexturedPoint2D
{
%TypeHeaderCode
#include <qsggeometry.h>
%End
float x;
float y;
float tx;
float ty;
void set(float nx, float ny, float ntx, float nty);
};
struct ColoredPoint2D
{
%TypeHeaderCode
#include <qsggeometry.h>
%End
float x;
float y;
unsigned char r /PyInt/;
unsigned char g /PyInt/;
unsigned char b /PyInt/;
unsigned char a /PyInt/;
void set(float nx, float ny, uchar nr /PyInt/, uchar ng /PyInt/, uchar nb /PyInt/, uchar na /PyInt/);
};
static const QSGGeometry::AttributeSet &defaultAttributes_Point2D() /NoCopy/;
static const QSGGeometry::AttributeSet &defaultAttributes_TexturedPoint2D() /NoCopy/;
static const QSGGeometry::AttributeSet &defaultAttributes_ColoredPoint2D() /NoCopy/;
enum DataPattern
{
AlwaysUploadPattern,
StreamPattern,
DynamicPattern,
StaticPattern,
};
QSGGeometry(const QSGGeometry::AttributeSet &attribs /KeepReference/, int vertexCount, int indexCount = 0, int indexType = GL_UNSIGNED_SHORT);
virtual ~QSGGeometry();
void setDrawingMode(unsigned int mode);
unsigned int drawingMode() const;
void allocate(int vertexCount, int indexCount = 0);
int vertexCount() const;
void *vertexData();
int indexType() const;
int indexCount() const;
void *indexData();
int attributeCount() const;
SIP_PYOBJECT attributes() const /TypeHint="PyQt5.sip.array[QSGGeometry.Attribute]"/;
%MethodCode
sipRes = sipConvertToTypedArray((void *)sipCpp->attributes(),
sipType_QSGGeometry_Attribute, "iiiI", sizeof (QSGGeometry::Attribute),
sipCpp->attributeCount(), SIP_READ_ONLY);
%End
int sizeOfVertex() const;
static void updateRectGeometry(QSGGeometry *g, const QRectF &rect);
static void updateTexturedRectGeometry(QSGGeometry *g, const QRectF &rect, const QRectF &sourceRect);
void setIndexDataPattern(QSGGeometry::DataPattern p);
QSGGeometry::DataPattern indexDataPattern() const;
void setVertexDataPattern(QSGGeometry::DataPattern p);
QSGGeometry::DataPattern vertexDataPattern() const;
void markIndexDataDirty();
void markVertexDataDirty();
float lineWidth() const;
void setLineWidth(float w);
SIP_PYOBJECT indexDataAsUInt() /TypeHint="PyQt5.sip.array[int]"/;
%MethodCode
sipRes = sipConvertToArray(sipCpp->indexDataAsUInt(), "I",
sipCpp->indexCount(), 0);
%End
SIP_PYOBJECT indexDataAsUShort() /TypeHint="PyQt5.sip.array[int]"/;
%MethodCode
sipRes = sipConvertToArray(sipCpp->indexDataAsUShort(), "H",
sipCpp->indexCount(), 0);
%End
SIP_PYOBJECT vertexDataAsPoint2D() /TypeHint="PyQt5.sip.array[QSGGeometry.Point2D]"/;
%MethodCode
sipRes = sipConvertToTypedArray(sipCpp->vertexDataAsPoint2D(),
sipType_QSGGeometry_Point2D, "ff", sizeof (QSGGeometry::Point2D),
sipCpp->vertexCount(), 0);
%End
SIP_PYOBJECT vertexDataAsTexturedPoint2D() /TypeHint="PyQt5.sip.array[QSGGeometry.TexturedPoint2D]"/;
%MethodCode
sipRes = sipConvertToTypedArray(sipCpp->vertexDataAsTexturedPoint2D(),
sipType_QSGGeometry_TexturedPoint2D, "ffff",
sizeof (QSGGeometry::TexturedPoint2D), sipCpp->vertexCount(), 0);
%End
SIP_PYOBJECT vertexDataAsColoredPoint2D() /TypeHint="PyQt5.sip.array[QSGGeometry.ColoredPoint2D]"/;
%MethodCode
sipRes = sipConvertToTypedArray(sipCpp->vertexDataAsColoredPoint2D(),
sipType_QSGGeometry_ColoredPoint2D, "ffbbbb",
sizeof (QSGGeometry::ColoredPoint2D), sipCpp->vertexCount(), 0);
%End
int sizeOfIndex() const;
%If (Qt_5_8_0 -)
enum AttributeType
{
UnknownAttribute,
PositionAttribute,
ColorAttribute,
TexCoordAttribute,
TexCoord1Attribute,
TexCoord2Attribute,
};
%End
%If (Qt_5_8_0 -)
enum DrawingMode
{
DrawPoints,
DrawLines,
DrawLineLoop,
DrawLineStrip,
DrawTriangles,
DrawTriangleStrip,
DrawTriangleFan,
};
%End
%If (Qt_5_8_0 -)
enum Type
{
ByteType,
UnsignedByteType,
ShortType,
UnsignedShortType,
IntType,
UnsignedIntType,
FloatType,
%If (Qt_5_14_0 -)
Bytes2Type,
%End
%If (Qt_5_14_0 -)
Bytes3Type,
%End
%If (Qt_5_14_0 -)
Bytes4Type,
%End
%If (Qt_5_14_0 -)
DoubleType,
%End
};
%End
%If (Qt_5_8_0 -)
static void updateColoredRectGeometry(QSGGeometry *g, const QRectF &rect);
%End
private:
QSGGeometry(const QSGGeometry &);
};

View File

@@ -0,0 +1,71 @@
// qsgimagenode.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_8_0 -)
class QSGImageNode : public QSGGeometryNode /NoDefaultCtors/
{
%TypeHeaderCode
#include <qsgimagenode.h>
%End
public:
virtual ~QSGImageNode();
virtual void setRect(const QRectF &rect) = 0;
void setRect(qreal x, qreal y, qreal w, qreal h);
virtual QRectF rect() const = 0;
virtual void setSourceRect(const QRectF &r) = 0;
void setSourceRect(qreal x, qreal y, qreal w, qreal h);
virtual QRectF sourceRect() const = 0;
virtual void setTexture(QSGTexture *texture /GetWrapper/) = 0;
%MethodCode
sipCpp->setTexture(a0);
if (sipCpp->ownsTexture())
sipTransferTo(a0Wrapper, sipSelf);
%End
virtual QSGTexture *texture() const = 0;
virtual void setFiltering(QSGTexture::Filtering filtering) = 0;
virtual QSGTexture::Filtering filtering() const = 0;
virtual void setMipmapFiltering(QSGTexture::Filtering filtering) = 0;
virtual QSGTexture::Filtering mipmapFiltering() const = 0;
enum TextureCoordinatesTransformFlag
{
NoTransform,
MirrorHorizontally,
MirrorVertically,
};
typedef QFlags<QSGImageNode::TextureCoordinatesTransformFlag> TextureCoordinatesTransformMode;
virtual void setTextureCoordinatesTransform(QSGImageNode::TextureCoordinatesTransformMode mode) = 0;
virtual QSGImageNode::TextureCoordinatesTransformMode textureCoordinatesTransform() const = 0;
virtual void setOwnsTexture(bool owns) = 0;
virtual bool ownsTexture() const = 0;
static void rebuildGeometry(QSGGeometry *g, QSGTexture *texture, const QRectF &rect, QRectF sourceRect, QSGImageNode::TextureCoordinatesTransformMode texCoordMode);
};
%End
%If (Qt_5_8_0 -)
QFlags<QSGImageNode::TextureCoordinatesTransformFlag> operator|(QSGImageNode::TextureCoordinatesTransformFlag f1, QFlags<QSGImageNode::TextureCoordinatesTransformFlag> f2);
%End

View File

@@ -0,0 +1,301 @@
// qsgmaterial.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGMaterialShader /Supertype=sip.wrapper/
{
%TypeHeaderCode
#include <qsgmaterial.h>
%End
public:
class RenderState
{
%TypeHeaderCode
#include <qsgmaterial.h>
%End
public:
enum DirtyState
{
DirtyMatrix,
DirtyOpacity,
%If (Qt_5_8_0 -)
DirtyCachedMaterialData,
%End
%If (Qt_5_8_0 -)
DirtyAll,
%End
};
typedef QFlags<QSGMaterialShader::RenderState::DirtyState> DirtyStates;
QSGMaterialShader::RenderState::DirtyStates dirtyStates() const;
bool isMatrixDirty() const;
bool isOpacityDirty() const;
float opacity() const;
QMatrix4x4 combinedMatrix() const;
QMatrix4x4 modelViewMatrix() const;
QRect viewportRect() const;
QRect deviceRect() const;
float determinant() const;
%If (PyQt_OpenGL)
QOpenGLContext *context() const;
%End
%If (Qt_5_1_0 -)
QMatrix4x4 projectionMatrix() const;
%End
%If (Qt_5_1_0 -)
float devicePixelRatio() const;
%End
%If (Qt_5_8_0 -)
bool isCachedMaterialDataDirty() const;
%End
};
QSGMaterialShader();
virtual ~QSGMaterialShader();
virtual void activate();
virtual void deactivate();
virtual void updateState(const QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
virtual SIP_PYOBJECT attributeNames() const = 0 /TypeHint="List[str]"/ [const char * const * ()];
%MethodCode
const char * const *names = sipCpp->attributeNames();
Py_ssize_t nr_names = 0;
if (names)
while (names[nr_names])
++nr_names;
sipRes = PyList_New(nr_names);
if (!sipRes)
sipIsErr = 1;
else
for (Py_ssize_t i = 0; i < nr_names; ++i)
{
const char *name = names[i];
PyObject *el;
#if PY_MAJOR_VERSION >= 3
el = PyUnicode_DecodeASCII(name, strlen(name), 0);
#else
el = PyString_FromString(name);
#endif
if (!el)
{
Py_DECREF(sipRes);
sipIsErr = 1;
break;
}
PyList_SetItem(sipRes, i, el);
}
%End
%VirtualCatcherCode
PyObject *names = sipCallMethod(&sipIsErr, sipMethod, "");
if (names)
{
sipRes = qtquick_anc_get_attr_names(sipPySelf, sipMethod, names);
if (!sipRes)
sipIsErr = 1;
Py_DECREF(names);
}
%End
%If (PyQt_OpenGL)
QOpenGLShaderProgram *program();
%End
protected:
%If (PyQt_OpenGL)
virtual void compile();
%End
virtual void initialize();
%If (Qt_5_2_0 -)
%If (PyQt_OpenGL)
virtual const char *vertexShader() const;
%End
%End
%If (- Qt_5_2_0)
%If (PyQt_OpenGL)
virtual const char *vertexShader() const = 0;
%End
%End
%If (Qt_5_2_0 -)
%If (PyQt_OpenGL)
virtual const char *fragmentShader() const;
%End
%End
%If (- Qt_5_2_0)
%If (PyQt_OpenGL)
virtual const char *fragmentShader() const = 0;
%End
%End
%If (Qt_5_2_0 -)
%If (PyQt_OpenGL)
void setShaderSourceFile(QOpenGLShader::ShaderType type, const QString &sourceFile);
%End
%End
%If (Qt_5_2_0 -)
%If (PyQt_OpenGL)
void setShaderSourceFiles(QOpenGLShader::ShaderType type, const QStringList &sourceFiles);
%End
%End
private:
QSGMaterialShader(const QSGMaterialShader &);
};
struct QSGMaterialType
{
%TypeHeaderCode
#include <qsgmaterial.h>
%End
};
class QSGMaterial /Supertype=sip.wrapper/
{
%TypeHeaderCode
#include <qsgmaterial.h>
%End
public:
enum Flag
{
Blending,
RequiresDeterminant,
RequiresFullMatrixExceptTranslate,
RequiresFullMatrix,
%If (Qt_5_2_0 -)
CustomCompileStep,
%End
%If (Qt_5_14_0 -)
SupportsRhiShader,
%End
%If (Qt_5_14_0 -)
RhiShaderWanted,
%End
};
typedef QFlags<QSGMaterial::Flag> Flags;
QSGMaterial();
virtual ~QSGMaterial();
virtual QSGMaterialType *type() const = 0;
virtual QSGMaterialShader *createShader() const = 0 /Factory/;
virtual int compare(const QSGMaterial *other) const;
QSGMaterial::Flags flags() const;
void setFlag(QSGMaterial::Flags flags, bool enabled = true);
private:
QSGMaterial(const QSGMaterial &);
};
QFlags<QSGMaterial::Flag> operator|(QSGMaterial::Flag f1, QFlags<QSGMaterial::Flag> f2);
QFlags<QSGMaterialShader::RenderState::DirtyState> operator|(QSGMaterialShader::RenderState::DirtyState f1, QFlags<QSGMaterialShader::RenderState::DirtyState> f2);
%ModuleCode
// Release any attribute names to the heap.
static void qtquick_anc_release(char **attr_names)
{
if (attr_names)
{
for (int i = 0; attr_names[i]; ++i)
delete[] attr_names[i];
delete[] attr_names;
}
}
// The destructor for the attribute names PyCapsule.
static void qtquick_anc_destructor(PyObject *cap)
{
qtquick_anc_release(
reinterpret_cast<char **>(PyCapsule_GetPointer(cap, NULL)));
}
// Get the attribute names or 0 if there was an error.
static char **qtquick_anc_get_attr_names(sipSimpleWrapper *pySelf, PyObject *method, PyObject *attr_names_obj)
{
// Dispose of any existing names.
Py_XDECREF(sipGetUserObject(pySelf));
sipSetUserObject(pySelf, NULL);
// Convert the new names.
if (!PyList_Check(attr_names_obj))
{
sipBadCatcherResult(method);
return 0;
}
char **names = new char *[PyList_Size(attr_names_obj) + 1];
for (Py_ssize_t i = 0; i < PyList_Size(attr_names_obj); ++i)
{
char *name;
PyObject *el = PyList_GetItem(attr_names_obj, i);
#if PY_MAJOR_VERSION >= 3
PyObject *name_obj = PyUnicode_AsASCIIString(el);
name = (name_obj ? PyBytes_AsString(name_obj) : 0);
#else
name = PyString_AsString(el);
#endif
if (!name)
{
names[i] = 0;
qtquick_anc_release(names);
sipBadCatcherResult(method);
return 0;
}
char *name_copy = new char[strlen(name) + 1];
strcpy(name_copy, name);
names[i] = name_copy;
#if PY_MAJOR_VERSION >= 3
Py_DECREF(name_obj);
#endif
}
names[PyList_Size(attr_names_obj)] = 0;
sipSetUserObject(pySelf, PyCapsule_New(names, NULL, qtquick_anc_destructor));
if (!sipGetUserObject(pySelf))
{
qtquick_anc_release(names);
return 0;
}
return names;
}
%End

View File

@@ -0,0 +1,123 @@
// qsgmaterialrhishader.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_14_0 -)
class QSGMaterialRhiShader : public QSGMaterialShader
{
%TypeHeaderCode
#include <qsgmaterialrhishader.h>
%End
public:
class RenderState
{
%TypeHeaderCode
#include <qsgmaterialrhishader.h>
%End
typedef QSGMaterialShader::RenderState::DirtyStates DirtyStates;
public:
QSGMaterialRhiShader::RenderState::DirtyStates dirtyStates() const;
bool isMatrixDirty() const;
bool isOpacityDirty() const;
float opacity() const;
QMatrix4x4 combinedMatrix() const;
QMatrix4x4 modelViewMatrix() const;
QMatrix4x4 projectionMatrix() const;
QRect viewportRect() const;
QRect deviceRect() const;
float determinant() const;
float devicePixelRatio() const;
QByteArray *uniformData();
};
struct GraphicsPipelineState
{
%TypeHeaderCode
#include <qsgmaterialrhishader.h>
%End
enum BlendFactor
{
Zero,
One,
SrcColor,
OneMinusSrcColor,
DstColor,
OneMinusDstColor,
SrcAlpha,
OneMinusSrcAlpha,
DstAlpha,
OneMinusDstAlpha,
ConstantColor,
OneMinusConstantColor,
ConstantAlpha,
OneMinusConstantAlpha,
SrcAlphaSaturate,
Src1Color,
OneMinusSrc1Color,
Src1Alpha,
OneMinusSrc1Alpha,
};
enum ColorMaskComponent
{
R,
G,
B,
A,
};
typedef QFlags<QSGMaterialRhiShader::GraphicsPipelineState::ColorMaskComponent> ColorMask;
enum CullMode
{
CullNone,
CullFront,
CullBack,
};
};
enum Flag
{
UpdatesGraphicsPipelineState,
};
typedef QFlags<QSGMaterialRhiShader::Flag> Flags;
QSGMaterialRhiShader();
virtual ~QSGMaterialRhiShader();
virtual bool updateUniformData(QSGMaterialRhiShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
virtual void updateSampledImage(QSGMaterialRhiShader::RenderState &state, int binding, QSGTexture **texture, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
virtual bool updateGraphicsPipelineState(QSGMaterialRhiShader::RenderState &state, QSGMaterialRhiShader::GraphicsPipelineState *ps, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
QSGMaterialRhiShader::Flags flags() const;
void setFlag(QSGMaterialRhiShader::Flags flags, bool on = true);
};
%End
%If (Qt_5_14_0 -)
QFlags<QSGMaterialRhiShader::GraphicsPipelineState::ColorMaskComponent> operator|(QSGMaterialRhiShader::GraphicsPipelineState::ColorMaskComponent f1, QFlags<QSGMaterialRhiShader::GraphicsPipelineState::ColorMaskComponent> f2);
%End
%If (Qt_5_14_0 -)
QFlags<QSGMaterialRhiShader::Flag> operator|(QSGMaterialRhiShader::Flag f1, QFlags<QSGMaterialRhiShader::Flag> f2);
%End

View File

@@ -0,0 +1,338 @@
// qsgnode.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGNode /Supertype=sip.wrapper/
{
%TypeHeaderCode
#include <qsgnode.h>
%End
%TypeCode
static sipErrorState qsgnode_handle_flags(QSGNode *node, PyObject *self, QSGNode::Flags old_flags)
{
QSGNode::Flags new_flags = node->flags();
if (node->parent())
{
if ((old_flags & QSGNode::OwnedByParent) != (new_flags & QSGNode::OwnedByParent))
{
if (old_flags & QSGNode::OwnedByParent)
{
sipTransferBack(self);
}
else
{
PyObject *parent = sipConvertFromType(node->parent(), sipType_QSGNode, 0);
if (!parent)
return sipErrorFail;
sipTransferTo(self, parent);
Py_DECREF(parent);
}
}
}
QSGNode::NodeType ntype = node->type();
if (ntype == QSGNode::BasicNodeType || ntype == QSGNode::GeometryNodeType || ntype == QSGNode::ClipNodeType)
{
QSGBasicGeometryNode *bg_node = (QSGBasicGeometryNode *)node;
if (bg_node->geometry())
{
if ((old_flags & QSGNode::OwnsGeometry) != (new_flags & QSGNode::OwnsGeometry))
{
PyObject *geom = sipConvertFromType(bg_node->geometry(), sipType_QSGGeometry, 0);
if (!geom)
return sipErrorFail;
if (old_flags & QSGNode::OwnsGeometry)
sipTransferBack(geom);
else
sipTransferTo(geom, self);
Py_DECREF(geom);
}
}
}
if (ntype == QSGNode::GeometryNodeType)
{
QSGGeometryNode *g_node = (QSGGeometryNode *)node;
if (g_node->material())
{
if ((old_flags & QSGNode::OwnsMaterial) != (new_flags & QSGNode::OwnsMaterial))
{
PyObject *mat = sipConvertFromType(g_node->material(), sipType_QSGMaterial, 0);
if (!mat)
return sipErrorFail;
if (old_flags & QSGNode::OwnsMaterial)
sipTransferBack(mat);
else
sipTransferTo(mat, self);
Py_DECREF(mat);
}
}
if (g_node->opaqueMaterial())
{
if ((old_flags & QSGNode::OwnsOpaqueMaterial) != (new_flags & QSGNode::OwnsOpaqueMaterial))
{
PyObject *omat = sipConvertFromType(g_node->opaqueMaterial(), sipType_QSGMaterial, 0);
if (!omat)
return sipErrorFail;
if (old_flags & QSGNode::OwnsOpaqueMaterial)
sipTransferBack(omat);
else
sipTransferTo(omat, self);
Py_DECREF(omat);
}
}
}
return sipErrorNone;
}
%End
%ConvertToSubClassCode
switch (sipCpp->type())
{
case QSGNode::BasicNodeType:
sipType = sipType_QSGBasicGeometryNode;
break;
case QSGNode::GeometryNodeType:
sipType = sipType_QSGGeometryNode;
break;
case QSGNode::TransformNodeType:
sipType = sipType_QSGClipNode;
break;
case QSGNode::ClipNodeType:
sipType = sipType_QSGTransformNode;
break;
case QSGNode::OpacityNodeType:
sipType = sipType_QSGOpacityNode;
break;
default:
sipType = 0;
}
%End
public:
enum NodeType
{
BasicNodeType,
GeometryNodeType,
TransformNodeType,
ClipNodeType,
OpacityNodeType,
};
enum Flag
{
OwnedByParent,
UsePreprocess,
OwnsGeometry,
OwnsMaterial,
OwnsOpaqueMaterial,
};
typedef QFlags<QSGNode::Flag> Flags;
enum DirtyStateBit
{
DirtyMatrix,
DirtyNodeAdded,
DirtyNodeRemoved,
DirtyGeometry,
DirtyMaterial,
DirtyOpacity,
};
typedef QFlags<QSGNode::DirtyStateBit> DirtyState;
QSGNode();
virtual ~QSGNode();
QSGNode *parent() const;
void removeChildNode(QSGNode *node);
void removeAllChildNodes();
void prependChildNode(QSGNode *node /GetWrapper/);
%MethodCode
sipCpp->prependChildNode(a0);
if (a0->flags() & QSGNode::OwnedByParent)
sipTransferTo(a0Wrapper, sipSelf);
%End
void appendChildNode(QSGNode *node /GetWrapper/);
%MethodCode
sipCpp->appendChildNode(a0);
if (a0->flags() & QSGNode::OwnedByParent)
sipTransferTo(a0Wrapper, sipSelf);
%End
void insertChildNodeBefore(QSGNode *node /GetWrapper/, QSGNode *before);
%MethodCode
sipCpp->insertChildNodeBefore(a0, a1);
if (a0->flags() & QSGNode::OwnedByParent)
sipTransferTo(a0Wrapper, sipSelf);
%End
void insertChildNodeAfter(QSGNode *node /GetWrapper/, QSGNode *after);
%MethodCode
sipCpp->insertChildNodeAfter(a0, a1);
if (a0->flags() & QSGNode::OwnedByParent)
sipTransferTo(a0Wrapper, sipSelf);
%End
int childCount() const /__len__/;
QSGNode *childAtIndex(int i) const;
QSGNode *firstChild() const;
QSGNode *lastChild() const;
QSGNode *nextSibling() const;
QSGNode *previousSibling() const;
QSGNode::NodeType type() const;
void markDirty(QSGNode::DirtyState bits);
virtual bool isSubtreeBlocked() const;
QSGNode::Flags flags() const;
void setFlag(QSGNode::Flag, bool enabled = true);
%MethodCode
QSGNode::Flags old_flags = sipCpp->flags();
sipCpp->setFlag(a0, a1);
sipError = qsgnode_handle_flags(sipCpp, sipSelf, old_flags);
%End
void setFlags(QSGNode::Flags, bool enabled = true);
virtual void preprocess();
private:
QSGNode(const QSGNode &);
};
class QSGBasicGeometryNode : public QSGNode /NoDefaultCtors/
{
%TypeHeaderCode
#include <qsgnode.h>
%End
public:
virtual ~QSGBasicGeometryNode();
void setGeometry(QSGGeometry *geometry /GetWrapper/);
%MethodCode
sipCpp->setGeometry(a0);
if (sipCpp->flags() & QSGNode::OwnsGeometry)
sipTransferTo(a0Wrapper, sipSelf);
%End
QSGGeometry *geometry();
};
class QSGGeometryNode : public QSGBasicGeometryNode
{
%TypeHeaderCode
#include <qsgnode.h>
%End
public:
QSGGeometryNode();
virtual ~QSGGeometryNode();
void setMaterial(QSGMaterial *material /GetWrapper/);
%MethodCode
sipCpp->setMaterial(a0);
if (sipCpp->flags() & QSGNode::OwnsMaterial)
sipTransferTo(a0Wrapper, sipSelf);
%End
QSGMaterial *material() const;
void setOpaqueMaterial(QSGMaterial *material /GetWrapper/);
%MethodCode
sipCpp->setOpaqueMaterial(a0);
if (sipCpp->flags() & QSGNode::OwnsOpaqueMaterial)
sipTransferTo(a0Wrapper, sipSelf);
%End
QSGMaterial *opaqueMaterial() const;
};
class QSGClipNode : public QSGBasicGeometryNode
{
%TypeHeaderCode
#include <qsgnode.h>
%End
public:
QSGClipNode();
virtual ~QSGClipNode();
void setIsRectangular(bool rectHint);
bool isRectangular() const;
void setClipRect(const QRectF &);
QRectF clipRect() const;
};
class QSGTransformNode : public QSGNode
{
%TypeHeaderCode
#include <qsgnode.h>
%End
public:
QSGTransformNode();
virtual ~QSGTransformNode();
void setMatrix(const QMatrix4x4 &matrix);
const QMatrix4x4 &matrix() const;
};
class QSGOpacityNode : public QSGNode
{
%TypeHeaderCode
#include <qsgnode.h>
%End
public:
QSGOpacityNode();
virtual ~QSGOpacityNode();
void setOpacity(qreal opacity);
qreal opacity() const;
};
QFlags<QSGNode::DirtyStateBit> operator|(QSGNode::DirtyStateBit f1, QFlags<QSGNode::DirtyStateBit> f2);
QFlags<QSGNode::Flag> operator|(QSGNode::Flag f1, QFlags<QSGNode::Flag> f2);

View File

@@ -0,0 +1,40 @@
// qsgrectanglenode.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_8_0 -)
class QSGRectangleNode : public QSGGeometryNode /NoDefaultCtors/
{
%TypeHeaderCode
#include <qsgrectanglenode.h>
%End
public:
virtual ~QSGRectangleNode();
virtual void setRect(const QRectF &rect) = 0;
void setRect(qreal x, qreal y, qreal w, qreal h);
virtual QRectF rect() const = 0;
virtual void setColor(const QColor &color) = 0;
virtual QColor color() const = 0;
};
%End

View File

@@ -0,0 +1,131 @@
// qsgrendererinterface.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_8_0 -)
class QSGRendererInterface /NoDefaultCtors/
{
%TypeHeaderCode
#include <qsgrendererinterface.h>
%End
public:
enum GraphicsApi
{
Unknown,
Software,
OpenGL,
Direct3D12,
%If (Qt_5_9_0 -)
OpenVG,
%End
%If (Qt_5_14_0 -)
OpenGLRhi,
%End
%If (Qt_5_14_0 -)
Direct3D11Rhi,
%End
%If (Qt_5_14_0 -)
VulkanRhi,
%End
%If (Qt_5_14_0 -)
MetalRhi,
%End
%If (Qt_5_14_0 -)
NullRhi,
%End
};
enum Resource
{
DeviceResource,
CommandQueueResource,
CommandListResource,
PainterResource,
%If (Qt_5_14_0 -)
RhiResource,
%End
%If (Qt_5_14_0 -)
PhysicalDeviceResource,
%End
%If (Qt_5_14_0 -)
OpenGLContextResource,
%End
%If (Qt_5_14_0 -)
DeviceContextResource,
%End
%If (Qt_5_14_0 -)
CommandEncoderResource,
%End
%If (Qt_5_14_0 -)
VulkanInstanceResource,
%End
%If (Qt_5_14_0 -)
RenderPassResource,
%End
};
enum ShaderType
{
UnknownShadingLanguage,
GLSL,
HLSL,
%If (Qt_5_14_0 -)
RhiShader,
%End
};
enum ShaderCompilationType
{
RuntimeCompilation,
OfflineCompilation,
};
typedef QFlags<QSGRendererInterface::ShaderCompilationType> ShaderCompilationTypes;
enum ShaderSourceType
{
ShaderSourceString,
ShaderSourceFile,
ShaderByteCode,
};
typedef QFlags<QSGRendererInterface::ShaderSourceType> ShaderSourceTypes;
virtual ~QSGRendererInterface();
virtual QSGRendererInterface::GraphicsApi graphicsApi() const = 0;
virtual void *getResource(QQuickWindow *window, QSGRendererInterface::Resource resource) const;
virtual void *getResource(QQuickWindow *window, const char *resource) const;
virtual QSGRendererInterface::ShaderType shaderType() const = 0;
virtual QSGRendererInterface::ShaderCompilationTypes shaderCompilationType() const = 0;
virtual QSGRendererInterface::ShaderSourceTypes shaderSourceType() const = 0;
%If (Qt_5_14_0 -)
static bool isApiRhiBased(QSGRendererInterface::GraphicsApi api);
%End
};
%End
%If (Qt_5_8_0 -)
QFlags<QSGRendererInterface::ShaderCompilationType> operator|(QSGRendererInterface::ShaderCompilationType f1, QFlags<QSGRendererInterface::ShaderCompilationType> f2);
%End
%If (Qt_5_8_0 -)
QFlags<QSGRendererInterface::ShaderSourceType> operator|(QSGRendererInterface::ShaderSourceType f1, QFlags<QSGRendererInterface::ShaderSourceType> f2);
%End

View File

@@ -0,0 +1,88 @@
// qsgrendernode.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
%If (Qt_5_8_0 -)
class QSGRenderNode : public QSGNode
{
%TypeHeaderCode
#include <qsgrendernode.h>
%End
public:
enum StateFlag
{
DepthState,
StencilState,
ScissorState,
ColorState,
BlendState,
CullState,
ViewportState,
RenderTargetState,
};
typedef QFlags<QSGRenderNode::StateFlag> StateFlags;
enum RenderingFlag
{
BoundedRectRendering,
DepthAwareRendering,
OpaqueRendering,
};
typedef QFlags<QSGRenderNode::RenderingFlag> RenderingFlags;
struct RenderState /NoDefaultCtors/
{
%TypeHeaderCode
#include <qsgrendernode.h>
%End
virtual ~RenderState();
virtual const QMatrix4x4 *projectionMatrix() const = 0;
virtual QRect scissorRect() const = 0;
virtual bool scissorEnabled() const = 0;
virtual int stencilValue() const = 0;
virtual bool stencilEnabled() const = 0;
virtual const QRegion *clipRegion() const = 0;
virtual void *get(const char *state) const;
};
virtual ~QSGRenderNode();
virtual QSGRenderNode::StateFlags changedStates() const;
virtual void render(const QSGRenderNode::RenderState *state) = 0;
virtual void releaseResources();
virtual QSGRenderNode::RenderingFlags flags() const;
virtual QRectF rect() const;
const QMatrix4x4 *matrix() const;
const QSGClipNode *clipList() const;
qreal inheritedOpacity() const;
};
%End
%If (Qt_5_8_0 -)
QFlags<QSGRenderNode::StateFlag> operator|(QSGRenderNode::StateFlag f1, QFlags<QSGRenderNode::StateFlag> f2);
%End
%If (Qt_5_8_0 -)
QFlags<QSGRenderNode::RenderingFlag> operator|(QSGRenderNode::RenderingFlag f1, QFlags<QSGRenderNode::RenderingFlag> f2);
%End

View File

@@ -0,0 +1,37 @@
// qsgsimplerectnode.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGSimpleRectNode : public QSGGeometryNode /NoDefaultCtors/
{
%TypeHeaderCode
#include <qsgsimplerectnode.h>
%End
public:
QSGSimpleRectNode(const QRectF &rect, const QColor &color);
QSGSimpleRectNode();
void setRect(const QRectF &rect);
void setRect(qreal x, qreal y, qreal w, qreal h);
QRectF rect() const;
void setColor(const QColor &color);
QColor color() const;
};

View File

@@ -0,0 +1,79 @@
// qsgsimpletexturenode.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGSimpleTextureNode : public QSGGeometryNode /NoDefaultCtors/
{
%TypeHeaderCode
#include <qsgsimpletexturenode.h>
%End
public:
QSGSimpleTextureNode();
%If (Qt_5_4_0 -)
virtual ~QSGSimpleTextureNode();
%End
void setRect(const QRectF &rect);
void setRect(qreal x, qreal y, qreal w, qreal h);
QRectF rect() const;
void setTexture(QSGTexture *texture);
QSGTexture *texture() const;
void setFiltering(QSGTexture::Filtering filtering);
QSGTexture::Filtering filtering() const;
%If (Qt_5_2_0 -)
enum TextureCoordinatesTransformFlag
{
NoTransform,
MirrorHorizontally,
MirrorVertically,
};
%End
%If (Qt_5_2_0 -)
typedef QFlags<QSGSimpleTextureNode::TextureCoordinatesTransformFlag> TextureCoordinatesTransformMode;
%End
%If (Qt_5_2_0 -)
void setTextureCoordinatesTransform(QSGSimpleTextureNode::TextureCoordinatesTransformMode mode);
%End
%If (Qt_5_2_0 -)
QSGSimpleTextureNode::TextureCoordinatesTransformMode textureCoordinatesTransform() const;
%End
%If (Qt_5_4_0 -)
void setOwnsTexture(bool owns);
%End
%If (Qt_5_4_0 -)
bool ownsTexture() const;
%End
%If (Qt_5_5_0 -)
void setSourceRect(const QRectF &r);
%End
%If (Qt_5_5_0 -)
void setSourceRect(qreal x, qreal y, qreal w, qreal h);
%End
%If (Qt_5_5_0 -)
QRectF sourceRect() const;
%End
};
%If (Qt_5_2_0 -)
QFlags<QSGSimpleTextureNode::TextureCoordinatesTransformFlag> operator|(QSGSimpleTextureNode::TextureCoordinatesTransformFlag f1, QFlags<QSGSimpleTextureNode::TextureCoordinatesTransformFlag> f2);
%End

View File

@@ -0,0 +1,117 @@
// qsgtexture.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGTexture : public QObject
{
%TypeHeaderCode
#include <qsgtexture.h>
%End
public:
QSGTexture();
virtual ~QSGTexture();
enum WrapMode
{
Repeat,
ClampToEdge,
%If (Qt_5_10_0 -)
MirroredRepeat,
%End
};
enum Filtering
{
None /PyName=None_/,
Nearest,
Linear,
};
virtual int textureId() const = 0;
virtual QSize textureSize() const = 0;
virtual bool hasAlphaChannel() const = 0;
virtual bool hasMipmaps() const = 0;
virtual QRectF normalizedTextureSubRect() const;
virtual bool isAtlasTexture() const;
virtual QSGTexture *removedFromAtlas() const;
virtual void bind() = 0;
void updateBindOptions(bool force = false);
void setMipmapFiltering(QSGTexture::Filtering filter);
QSGTexture::Filtering mipmapFiltering() const;
void setFiltering(QSGTexture::Filtering filter);
QSGTexture::Filtering filtering() const;
void setHorizontalWrapMode(QSGTexture::WrapMode hwrap);
QSGTexture::WrapMode horizontalWrapMode() const;
void setVerticalWrapMode(QSGTexture::WrapMode vwrap);
QSGTexture::WrapMode verticalWrapMode() const;
QRectF convertToNormalizedSourceRect(const QRectF &rect) const;
%If (Qt_5_9_0 -)
enum AnisotropyLevel
{
AnisotropyNone,
Anisotropy2x,
Anisotropy4x,
Anisotropy8x,
Anisotropy16x,
};
%End
%If (Qt_5_9_0 -)
void setAnisotropyLevel(QSGTexture::AnisotropyLevel level);
%End
%If (Qt_5_9_0 -)
QSGTexture::AnisotropyLevel anisotropyLevel() const;
%End
%If (Qt_5_14_0 -)
int comparisonKey() const;
%End
%If (Qt_5_15_0 -)
struct NativeTexture
{
%TypeHeaderCode
#include <qsgtexture.h>
%End
const void *object;
int layout;
};
%End
%If (Qt_5_15_0 -)
QSGTexture::NativeTexture nativeTexture() const;
%End
};
class QSGDynamicTexture : public QSGTexture
{
%TypeHeaderCode
#include <qsgtexture.h>
%End
public:
%If (Qt_5_14_0 -)
QSGDynamicTexture();
%End
virtual bool updateTexture() = 0;
};

View File

@@ -0,0 +1,61 @@
// qsgtexturematerial.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGOpaqueTextureMaterial : public QSGMaterial
{
%TypeHeaderCode
#include <qsgtexturematerial.h>
%End
public:
QSGOpaqueTextureMaterial();
virtual QSGMaterialType *type() const;
virtual QSGMaterialShader *createShader() const /Factory/;
virtual int compare(const QSGMaterial *other) const;
void setTexture(QSGTexture *texture);
QSGTexture *texture() const;
void setMipmapFiltering(QSGTexture::Filtering filtering);
QSGTexture::Filtering mipmapFiltering() const;
void setFiltering(QSGTexture::Filtering filtering);
QSGTexture::Filtering filtering() const;
void setHorizontalWrapMode(QSGTexture::WrapMode mode);
QSGTexture::WrapMode horizontalWrapMode() const;
void setVerticalWrapMode(QSGTexture::WrapMode mode);
QSGTexture::WrapMode verticalWrapMode() const;
%If (Qt_5_9_0 -)
void setAnisotropyLevel(QSGTexture::AnisotropyLevel level);
%End
%If (Qt_5_9_0 -)
QSGTexture::AnisotropyLevel anisotropyLevel() const;
%End
};
class QSGTextureMaterial : public QSGOpaqueTextureMaterial
{
%TypeHeaderCode
#include <qsgtexturematerial.h>
%End
public:
virtual QSGMaterialType *type() const;
virtual QSGMaterialShader *createShader() const /Factory/;
};

View File

@@ -0,0 +1,34 @@
// qsgtextureprovider.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGTextureProvider : public QObject
{
%TypeHeaderCode
#include <qsgtextureprovider.h>
%End
public:
virtual QSGTexture *texture() const = 0 /Factory/;
signals:
void textureChanged();
};

View File

@@ -0,0 +1,36 @@
// qsgvertexcolormaterial.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// 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.
class QSGVertexColorMaterial : public QSGMaterial
{
%TypeHeaderCode
#include <qsgvertexcolormaterial.h>
%End
public:
QSGVertexColorMaterial();
virtual int compare(const QSGMaterial *other) const;
protected:
virtual QSGMaterialType *type() const;
virtual QSGMaterialShader *createShader() const /Factory/;
};