class_property.h 948 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (C) 2020 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. #ifndef CLASS_PROPERTY_H
  4. #define CLASS_PROPERTY_H
  5. #include "pysidemacros.h"
  6. #include <sbkpython.h>
  7. extern "C" {
  8. struct propertyobject {
  9. PyObject_HEAD
  10. PyObject *prop_get;
  11. PyObject *prop_set;
  12. PyObject *prop_del;
  13. PyObject *prop_doc;
  14. int getter_doc;
  15. };
  16. struct propertyobject310 {
  17. PyObject_HEAD
  18. PyObject *prop_get;
  19. PyObject *prop_set;
  20. PyObject *prop_del;
  21. PyObject *prop_doc;
  22. // Note: This is a problem with Limited API: We have no direct access.
  23. // You need to pick it from runtime info.
  24. PyObject *prop_name;
  25. int getter_doc;
  26. };
  27. PYSIDE_API PyTypeObject *PyClassProperty_TypeF();
  28. } // extern "C"
  29. namespace PySide::ClassProperty {
  30. PYSIDE_API void init(PyObject *module);
  31. } // namespace PySide::ClassProperty
  32. #endif // CLASS_PROPERTY_H