blob: b13c1829a811735d92932dece376b7cb755238a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef PYSIDE_P_H
#define PYSIDE_P_H
#include <pysidemacros.h>
#include <dynamicqmetaobject.h>
namespace PySide
{
// Struct associated with QObject's via Shiboken::Object::getTypeUserData()
struct TypeUserData
{
explicit TypeUserData(PyTypeObject* type, const QMetaObject* metaobject, std::size_t size) :
mo(type, metaobject), cppObjSize(size) {}
MetaObjectBuilder mo;
std::size_t cppObjSize;
};
TypeUserData *retrieveTypeUserData(PyTypeObject *pyTypeObj);
TypeUserData *retrieveTypeUserData(PyObject *pyObj);
// For QML
PYSIDE_API const QMetaObject *retrieveMetaObject(PyTypeObject *pyTypeObj);
PYSIDE_API const QMetaObject *retrieveMetaObject(PyObject *pyObj);
} //namespace PySide
#endif // PYSIDE_P_H
|