PythonQt
PythonQtSlot.h
Go to the documentation of this file.
1 #ifndef _PYTHONQTSLOT_H
2 #define _PYTHONQTSLOT_H
3 
4 /*
5  *
6  * Copyright (C) 2010 MeVis Medical Solutions AG All Rights Reserved.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * Further, this software is distributed without any warranty that it is
19  * free of the rightful claim of any third person regarding infringement
20  * or the like. Any license provided herein, whether implied or
21  * otherwise, applies only to this software file. Patent licenses, if
22  * any, provided herein do not apply to combinations of this program with
23  * other software, or any other product whatsoever.
24  *
25  * You should have received a copy of the GNU Lesser General Public
26  * License along with this library; if not, write to the Free Software
27  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28  *
29  * Contact information: MeVis Medical Solutions AG, Universitaetsallee 29,
30  * 28359 Bremen, Germany or:
31  *
32  * http://www.mevis.de
33  *
34  */
35 
36 //----------------------------------------------------------------------------------
43 //----------------------------------------------------------------------------------
44 
45 #include "PythonQtPythonInclude.h"
46 
47 #include "PythonQtSystem.h"
48 #include "structmember.h"
49 
50 class PythonQtSlotInfo;
51 
53 {
57 };
58 
59 extern PYTHONQT_EXPORT PyTypeObject PythonQtSlotFunction_Type;
60 
61 #define PythonQtSlotFunction_Check(op) (Py_TYPE(op) == &PythonQtSlotFunction_Type)
62 
65 
66 /* Macros for direct access to these values. Type checks are *not*
67  done, so use with care. */
68 #define PythonQtSlotFunction_GET_SELF(func) \
69  (((PythonQtSlotFunctionObject *)func) -> m_self)
70 
72 
73 PyObject *PythonQtSlotFunction_CallImpl(PythonQtClassInfo* classInfo, QObject* objectToCall, PythonQtSlotInfo* info, PyObject *args, PyObject *kw, void* firstArg=nullptr, void** directReturnValuePointer=nullptr, PythonQtPassThisOwnershipType* passThisOwnershipToCPP = nullptr);
74 
76  PyObject *);
77 
82 
85  PyObject_HEAD
86  PythonQtSlotInfo *m_ml; /* Description of the C function to call */
87  PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
88  PyObject *m_module; /* The __module__ attribute, can be anything */
89 };
90 
91 
92 #endif
struct _object PyObject
PyObject * PythonQtSlotFunction_CallImpl(PythonQtClassInfo *classInfo, QObject *objectToCall, PythonQtSlotInfo *info, PyObject *args, PyObject *kw, void *firstArg=nullptr, void **directReturnValuePointer=nullptr, PythonQtPassThisOwnershipType *passThisOwnershipToCPP=nullptr)
PyObject * PythonQtMemberFunction_parameterTypes(PythonQtSlotInfo *theInfo)
PyObject * PythonQtSlotFunction_GetSelf(PyObject *)
PyObject * PythonQtSlotFunction_New(PythonQtSlotInfo *, PyObject *, PyObject *)
PyObject * PythonQtMemberFunction_typeName(PythonQtSlotInfo *theInfo)
PyObject * PythonQtSlotFunction_Call(PyObject *, PyObject *, PyObject *)
PYTHONQT_EXPORT PyTypeObject PythonQtSlotFunction_Type
PyObject * PythonQtMemberFunction_Call(PythonQtSlotInfo *info, PyObject *m_self, PyObject *args, PyObject *kw)
PyObject * PythonQtMemberFunction_parameterNames(PythonQtSlotInfo *theInfo)
PythonQtSlotInfo * PythonQtSlotFunction_GetSlotInfo(PyObject *)
PythonQtPassThisOwnershipType
Definition: PythonQtSlot.h:53
@ PassOwnershipToPython
Definition: PythonQtSlot.h:56
@ IgnoreOwnership
Definition: PythonQtSlot.h:54
@ PassOwnershipToCPP
Definition: PythonQtSlot.h:55
#define PYTHONQT_EXPORT
a class that stores all required information about a Qt object (and an optional associated C++ class ...
stores information about a slot, including a next pointer to overloaded slots
defines a python object that stores a Qt slot info
Definition: PythonQtSlot.h:84
PyObject_HEAD PythonQtSlotInfo * m_ml
Definition: PythonQtSlot.h:86