qglobal.sip 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. // qglobal.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtCore Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. %ModuleCode
  22. #include <qglobal.h>
  23. %End
  24. const int QT_VERSION;
  25. const char *QT_VERSION_STR;
  26. %If (- Qt_6_5_0)
  27. const char *qVersion();
  28. %End
  29. %If (- Qt_6_5_0)
  30. typedef signed char qint8 /PyInt/;
  31. %End
  32. %If (- Qt_6_5_0)
  33. typedef unsigned char quint8 /PyInt/;
  34. %End
  35. %If (- Qt_6_5_0)
  36. typedef short qint16;
  37. %End
  38. %If (- Qt_6_5_0)
  39. typedef unsigned short quint16;
  40. %End
  41. %If (- Qt_6_5_0)
  42. typedef int qint32;
  43. %End
  44. %If (- Qt_6_5_0)
  45. typedef unsigned int quint32;
  46. %End
  47. %If (- Qt_6_5_0)
  48. typedef long long qint64;
  49. %End
  50. %If (- Qt_6_5_0)
  51. typedef unsigned long long quint64;
  52. %End
  53. %If (- Qt_6_5_0)
  54. typedef qint64 qlonglong;
  55. %End
  56. %If (- Qt_6_5_0)
  57. typedef quint64 qulonglong;
  58. %End
  59. %If (- Qt_6_5_0)
  60. %If (PyQt_qreal_double)
  61. typedef double qreal;
  62. %End
  63. %End
  64. %If (- Qt_6_5_0)
  65. %If (!PyQt_qreal_double)
  66. typedef float qreal;
  67. %End
  68. %End
  69. %If (- Qt_6_5_0)
  70. typedef unsigned char uchar;
  71. %End
  72. %If (- Qt_6_5_0)
  73. typedef unsigned short ushort;
  74. %End
  75. %If (- Qt_6_5_0)
  76. typedef unsigned int uint;
  77. %End
  78. %If (- Qt_6_5_0)
  79. typedef unsigned long ulong;
  80. %End
  81. %If (- Qt_6_5_0)
  82. typedef long long qsizetype;
  83. %End
  84. %If (- Qt_6_5_0)
  85. double qAbs(const double &t);
  86. %End
  87. %If (- Qt_6_5_0)
  88. int qRound(qreal d);
  89. %End
  90. %If (- Qt_6_5_0)
  91. qint64 qRound64(qreal d);
  92. %End
  93. %If (- Qt_6_5_0)
  94. bool qFuzzyCompare(double p1, double p2);
  95. %End
  96. typedef void *QFunctionPointer;
  97. // Minimal support for the Qt resource system to help porting from PyQt5.
  98. %ModuleCode
  99. QT_BEGIN_NAMESPACE
  100. extern bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
  101. extern bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
  102. QT_END_NAMESPACE
  103. %End
  104. bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
  105. bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
  106. // Mapped type for qintptr.
  107. // Map qintptr onto sip.voidptr. This means either an address (on Windows) or
  108. // an integer file descriptor (on everything else) can be used.
  109. %MappedType qintptr /TypeHint="PyQt6.sip.voidptr"/
  110. {
  111. %TypeHeaderCode
  112. #include <QtGlobal>
  113. %End
  114. %ConvertToTypeCode
  115. qintptr ptr = (qintptr)sipConvertToVoidPtr(sipPy);
  116. if (!sipIsErr)
  117. return !PyErr_Occurred();
  118. // Mapped types deal with pointers, so create one on the heap.
  119. qintptr *heap = new qintptr;
  120. *heap = ptr;
  121. *sipCppPtr = heap;
  122. // Make sure the pointer doesn't leak.
  123. return SIP_TEMPORARY;
  124. %End
  125. %ConvertFromTypeCode
  126. return sipConvertFromVoidPtr((void *)*sipCpp);
  127. %End
  128. };
  129. // Mapped type for quintptr.
  130. // Map quintptr onto sip.voidptr. This means either an address (on Windows) or
  131. // an integer file descriptor (on everything else) can be used.
  132. %MappedType quintptr /TypeHint="PyQt6.sip.voidptr"/
  133. {
  134. %TypeHeaderCode
  135. #include <QtGlobal>
  136. %End
  137. %ConvertToTypeCode
  138. quintptr ptr = (quintptr)sipConvertToVoidPtr(sipPy);
  139. if (!sipIsErr)
  140. return !PyErr_Occurred();
  141. // Mapped types deal with pointers, so create one on the heap.
  142. quintptr *heap = new quintptr;
  143. *heap = ptr;
  144. *sipCppPtr = heap;
  145. // Make sure the pointer doesn't leak.
  146. return SIP_TEMPORARY;
  147. %End
  148. %ConvertFromTypeCode
  149. return sipConvertFromVoidPtr((void *)*sipCpp);
  150. %End
  151. };
  152. // Implementations of pyqt[Set]PickleProtocol().
  153. void pyqtSetPickleProtocol(SIP_PYOBJECT /TypeHint="Optional[int]"/);
  154. %MethodCode
  155. Py_XDECREF(qpycore_pickle_protocol);
  156. qpycore_pickle_protocol = a0;
  157. Py_INCREF(qpycore_pickle_protocol);
  158. %End
  159. SIP_PYOBJECT pyqtPickleProtocol() /TypeHint="Optional[int]"/;
  160. %MethodCode
  161. sipRes = qpycore_pickle_protocol;
  162. if (!sipRes)
  163. sipRes = Py_None;
  164. Py_INCREF(sipRes);
  165. %End
  166. %If (- Qt_6_5_0)
  167. bool qEnvironmentVariableIsEmpty(const char *varName);
  168. %End
  169. %If (- Qt_6_5_0)
  170. bool qEnvironmentVariableIsSet(const char *varName);
  171. %End
  172. %If (- Qt_6_5_0)
  173. QString qEnvironmentVariable(const char *varName);
  174. %End
  175. %If (- Qt_6_5_0)
  176. QString qEnvironmentVariable(const char *varName, const QString &defaultValue);
  177. %End
  178. %If (- Qt_6_5_0)
  179. int qEnvironmentVariableIntValue(const char *varName, bool *ok = 0);
  180. %End