qpygui_vulkan.sip 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // This is the SIP specifications of the Vulkan support.
  2. //
  3. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  4. //
  5. // This file is part of PyQt6.
  6. //
  7. // This file may be used under the terms of the GNU General Public License
  8. // version 3.0 as published by the Free Software Foundation and appearing in
  9. // the file LICENSE included in the packaging of this file. Please review the
  10. // following information to ensure the GNU General Public License version 3.0
  11. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  12. //
  13. // If you do not wish to use this file under the terms of the GPL version 3.0
  14. // then you may purchase a commercial license. For more information contact
  15. // info@riverbankcomputing.com.
  16. //
  17. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  18. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19. %If (PyQt_Vulkan)
  20. %ModuleCode
  21. #include <qvulkaninstance.h>
  22. %End
  23. typedef void *VkSurfaceKHR;
  24. struct QVulkanExtension
  25. {
  26. %TypeHeaderCode
  27. #include <qvulkaninstance.h>
  28. %End
  29. QByteArray name;
  30. unsigned version; // Actually uint32_t.
  31. Py_hash_t __hash__() const;
  32. %MethodCode
  33. sipRes = qHash(*sipCpp);
  34. %End
  35. };
  36. bool operator==(const QVulkanExtension &, const QVulkanExtension &);
  37. bool operator!=(const QVulkanExtension &, const QVulkanExtension &);
  38. struct QVulkanLayer
  39. {
  40. %TypeHeaderCode
  41. #include <qvulkaninstance.h>
  42. %End
  43. QByteArray description;
  44. QByteArray name;
  45. QVersionNumber specVersion;
  46. unsigned version; // Actually uint32_t.
  47. Py_hash_t __hash__() const;
  48. %MethodCode
  49. sipRes = qHash(*sipCpp);
  50. %End
  51. };
  52. bool operator==(const QVulkanLayer &, const QVulkanLayer &);
  53. bool operator!=(const QVulkanLayer &, const QVulkanLayer &);
  54. class QVulkanInstance
  55. {
  56. %TypeHeaderCode
  57. #include <qvulkaninstance.h>
  58. %End
  59. public:
  60. QVulkanInstance();
  61. ~QVulkanInstance();
  62. QVersionNumber apiVersion() const;
  63. void setApiVersion(const QVersionNumber &vulkanVersion);
  64. QVersionNumber supportedApiVersion() const;
  65. QList<QVulkanExtension> supportedExtensions() const;
  66. QList<QVulkanLayer> supportedLayers() const;
  67. bool create();
  68. void destroy();
  69. bool isValid() const;
  70. static VkSurfaceKHR surfaceForWindow(QWindow *window);
  71. private:
  72. QVulkanInstance(const QVulkanInstance &);
  73. };
  74. %End