1 // This defines the interfaces for the pyqtBoundSignal type. 2 // 3 // Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 4 // 5 // This file is part of PyQt5. 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 20 21 #ifndef _QPYCORE_PYQTBOUNDSIGNAL_H 22 #define _QPYCORE_PYQTBOUNDSIGNAL_H 23 24 25 #include <Python.h> 26 #include <sip.h> 27 28 #include "qpycore_pyqtsignal.h" 29 #include "qpycore_namespace.h" 30 31 32 QT_BEGIN_NAMESPACE 33 class QByteArray; 34 class QObject; 35 QT_END_NAMESPACE 36 37 38 extern "C" { 39 40 // This defines the structure of a bound PyQt signal. 41 typedef struct { 42 PyObject_HEAD 43 44 // The unbound signal. 45 qpycore_pyqtSignal *unbound_signal; 46 47 // A borrowed reference to the wrapped QObject that is bound to the signal. 48 PyObject *bound_pyobject; 49 50 // The QObject that is bound to the signal. 51 QObject *bound_qobject; 52 } qpycore_pyqtBoundSignal; 53 54 } 55 56 57 // The type object. 58 extern PyTypeObject *qpycore_pyqtBoundSignal_TypeObject; 59 60 61 bool qpycore_pyqtBoundSignal_init_type(); 62 PyObject *qpycore_pyqtBoundSignal_New(qpycore_pyqtSignal *unbound_signal, 63 PyObject *bound_pyobject, QObject *bound_qobject); 64 sipErrorState qpycore_get_receiver_slot_signature(PyObject *slot, 65 QObject *transmitter, const Chimera::Signature *signal_signature, 66 bool single_shot, QObject **receiver, QByteArray &slot_signature); 67 68 69 #endif 70