| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#ifndef CallbackStruct_h |
| 9 |
#define CallbackStruct_h |
| 10 |
|
| 11 |
#include <Python.h> |
| 12 |
|
| 13 |
class CallbackStruct |
| 14 |
{ |
| 15 |
public: |
| 16 |
PyObject *func; |
| 17 |
PyObject *data; |
| 18 |
PyObject *widget; |
| 19 |
void *type; |
| 20 |
PyObject *link; |
| 21 |
char type_name[64]; |
| 22 |
CallbackStruct( PyObject *theFunc, PyObject *theData, PyObject *theWidget, PyObject *theLink = 0): |
| 23 |
func(theFunc), |
| 24 |
data(theData), |
| 25 |
widget(theWidget) |
| 26 |
{ |
| 27 |
memset(type_name, 0, 64); |
| 28 |
} |
| 29 |
CallbackStruct( PyObject *theFunc, PyObject *theData, void *theType): |
| 30 |
func(theFunc), |
| 31 |
data(theData), |
| 32 |
widget(0), |
| 33 |
type(theType) |
| 34 |
{ |
| 35 |
memset(type_name, 0, 64); |
| 36 |
} |
| 37 |
|
| 38 |
}; |
| 39 |
|
| 40 |
#endif |