python 3 port
This commit is contained in:
parent
c4caed4368
commit
c28d961744
@ -57,7 +57,7 @@ PyObject *args;
|
|||||||
{
|
{
|
||||||
long o;
|
long o;
|
||||||
int w, h;
|
int w, h;
|
||||||
char *b;
|
unsigned char *b;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "liis", &o, &w, &h, &b))
|
if (!PyArg_ParseTuple(args, "liis", &o, &w, &h, &b))
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -106,18 +106,29 @@ static char bitmaps_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"bitmaps",
|
||||||
|
bitmaps_module_documentation,
|
||||||
|
-1,
|
||||||
|
bmp_methods,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
void initbitmaps()
|
void initbitmaps()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("bitmaps", bmp_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
bitmaps_module_documentation,
|
|
||||||
(PyObject *) NULL, PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("bitmaps.error");
|
ErrorObject = PyBytes_FromString("bitmaps.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -62,19 +62,30 @@ static char box_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"box", /* m_name */
|
||||||
|
box_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
box_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initbox()
|
initbox()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("box", box_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
box_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("box.error");
|
ErrorObject = PyBytes_FromString("box.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -460,19 +460,29 @@ static char browser_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"browser", /* m_name */
|
||||||
|
browser_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
browser_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initbrowser()
|
initbrowser()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("browser", browser_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
browser_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("browser.error");
|
ErrorObject = PyBytes_FromString("browser.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -344,19 +344,28 @@ static char button_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"button", /* m_name */
|
||||||
|
button_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
button_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initbutton()
|
initbutton()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("button", button_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
button_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("button.error");
|
ErrorObject = PyBytes_FromString("button.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -319,19 +319,29 @@ static char choice_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"choice", /* m_name */
|
||||||
|
choice_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
choice_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initchoice()
|
initchoice()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("choice", choice_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
choice_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("choice.error");
|
ErrorObject = PyBytes_FromString("choice.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -80,19 +80,29 @@ static char clock_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"clock", /* m_name */
|
||||||
|
clock_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
clock_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
initclock()
|
initclock()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("clock", clock_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
clock_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("clock.error");
|
ErrorObject = PyBytes_FromString("clock.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -179,6 +179,17 @@ static struct PyMethodDef counter_methods[] = {
|
|||||||
static char counter_module_documentation[] =
|
static char counter_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"counter", /* m_name */
|
||||||
|
counter_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
counter_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initcounter()
|
initcounter()
|
||||||
@ -186,13 +197,10 @@ initcounter()
|
|||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("counter", counter_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
counter_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("counter.error");
|
ErrorObject = PyBytes_FromString("counter.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -179,19 +179,28 @@ static char dial_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"dial", /* m_name */
|
||||||
|
dial_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
dial_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initdial()
|
initdial()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("dial", dial_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
dial_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("dial.error");
|
ErrorObject = PyBytes_FromString("dial.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -569,8 +569,8 @@ PyObject *args;
|
|||||||
long o;
|
long o;
|
||||||
if (!PyArg_ParseTuple(args, "l",&o))
|
if (!PyArg_ParseTuple(args, "l",&o))
|
||||||
return NULL;
|
return NULL;
|
||||||
return Py_BuildValue ("iiiiiil",
|
return Py_BuildValue ("iiiiil",
|
||||||
((FL_FORM *)o)->vmode,
|
//((FL_FORM *)o)->vmode,
|
||||||
((FL_FORM *)o)->deactivated,
|
((FL_FORM *)o)->deactivated,
|
||||||
((FL_FORM *)o)->use_pixmap,
|
((FL_FORM *)o)->use_pixmap,
|
||||||
((FL_FORM *)o)->frozen,
|
((FL_FORM *)o)->frozen,
|
||||||
@ -666,19 +666,29 @@ static char forms_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"forms", /* m_name */
|
||||||
|
forms_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
forms_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initforms()
|
initforms()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("forms", forms_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
forms_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("forms.error");
|
ErrorObject = PyBytes_FromString("forms.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -61,19 +61,29 @@ static char frame_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"frame", /* m_name */
|
||||||
|
frame_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
frame_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initframe()
|
initframe()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("frame", frame_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
frame_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("frame.error");
|
ErrorObject = PyBytes_FromString("frame.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -473,20 +473,28 @@ static struct PyMethodDef goodies_methods[] = {
|
|||||||
static char goodies_module_documentation[] =
|
static char goodies_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"goodies", /* m_name */
|
||||||
|
goodies_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
goodies_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
void
|
void
|
||||||
initgoodies()
|
initgoodies()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("goodies", goodies_methods,
|
|
||||||
goodies_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
|
m = PyModule_Create(&moduledef);
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("goodies.error");
|
ErrorObject = PyBytes_FromString("goodies.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -220,19 +220,29 @@ static char input_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"input", /* m_name */
|
||||||
|
input_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
input_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initinput()
|
initinput()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("input", input_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
input_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("input.error");
|
ErrorObject = PyBytes_FromString("input.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -280,19 +280,28 @@ static char menu_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"menu", /* m_name */
|
||||||
|
menu_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
menu_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
void
|
void
|
||||||
initmenu()
|
initmenu()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("menu", menu_methods,
|
|
||||||
menu_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
|
m = PyModule_Create(&moduledef);
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("menu.error");
|
ErrorObject = PyBytes_FromString("menu.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -206,23 +206,6 @@ obj_set_lalign(self, args)
|
|||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char obj_scale__doc__[] =
|
|
||||||
"Scales the object"
|
|
||||||
;
|
|
||||||
|
|
||||||
static PyObject *
|
|
||||||
obj_scale(self, args)
|
|
||||||
PyObject *self; /* Not used */
|
|
||||||
PyObject *args;
|
|
||||||
{
|
|
||||||
long o;
|
|
||||||
double x,y;
|
|
||||||
if (!PyArg_ParseTuple(args, "ldd",&o,&x,&y))
|
|
||||||
return NULL;
|
|
||||||
fl_scale_object((FL_OBJECT *)o,x,y);
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
return Py_None;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char obj_set_callback__doc__[] =
|
static char obj_set_callback__doc__[] =
|
||||||
"XXXXXXNot implemented"
|
"XXXXXXNot implemented"
|
||||||
@ -481,7 +464,6 @@ static struct PyMethodDef obj_methods[] = {
|
|||||||
{"set_focus", obj_set_focus, 1, obj_set_focus__doc__},
|
{"set_focus", obj_set_focus, 1, obj_set_focus__doc__},
|
||||||
{"redraw", obj_redraw, 1, obj_redraw__doc__},
|
{"redraw", obj_redraw, 1, obj_redraw__doc__},
|
||||||
{"set_lalign", obj_set_lalign, 1, obj_set_lalign__doc__},
|
{"set_lalign", obj_set_lalign, 1, obj_set_lalign__doc__},
|
||||||
{"scale", obj_scale, 1, obj_scale__doc__},
|
|
||||||
{"set_callback", obj_set_callback, 1, obj_set_callback__doc__},
|
{"set_callback", obj_set_callback, 1, obj_set_callback__doc__},
|
||||||
{"show", obj_show, 1, obj_show__doc__},
|
{"show", obj_show, 1, obj_show__doc__},
|
||||||
{"hide", obj_hide, 1, obj_hide__doc__},
|
{"hide", obj_hide, 1, obj_hide__doc__},
|
||||||
@ -505,6 +487,17 @@ static struct PyMethodDef obj_methods[] = {
|
|||||||
static char objects_module_documentation[] =
|
static char objects_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"objects", /* m_name */
|
||||||
|
objects_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
obj_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initobjects()
|
initobjects()
|
||||||
@ -512,13 +505,11 @@ initobjects()
|
|||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("objects", obj_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
objects_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("objects.error");
|
ErrorObject = PyBytes_FromString("objects.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -104,19 +104,28 @@ static char pixmaps_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"pixmaps", /* m_name */
|
||||||
|
pixmaps_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
pmp_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
void
|
void
|
||||||
initpixmaps()
|
initpixmaps()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("pixmaps", pmp_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
pixmaps_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("pixmaps.error");
|
ErrorObject = PyBytes_FromString("pixmaps.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -347,6 +347,17 @@ static struct PyMethodDef pup_methods[] = {
|
|||||||
static char popups_module_documentation[] =
|
static char popups_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"popups", /* m_name */
|
||||||
|
popups_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
pup_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initpopups()
|
initpopups()
|
||||||
@ -354,13 +365,11 @@ initpopups()
|
|||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("popups", pup_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
popups_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("popups.error");
|
ErrorObject = PyBytes_FromString("popups.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -279,6 +279,17 @@ static struct PyMethodDef posit_methods[] = {
|
|||||||
static char positioner_module_documentation[] =
|
static char positioner_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"positioner", /* m_name */
|
||||||
|
positioner_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
posit_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initpositioner()
|
initpositioner()
|
||||||
@ -286,13 +297,11 @@ initpositioner()
|
|||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("positioner", posit_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
positioner_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("positioner.error");
|
ErrorObject = PyBytes_FromString("positioner.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -240,6 +240,17 @@ static struct PyMethodDef slider_methods[] = {
|
|||||||
static char slider_module_documentation[] =
|
static char slider_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"slider", /* m_name */
|
||||||
|
slider_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
slider_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initslider()
|
initslider()
|
||||||
@ -247,13 +258,11 @@ initslider()
|
|||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("slider", slider_methods,
|
|
||||||
slider_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
|
m = PyModule_Create(&moduledef);
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("slider.error");
|
ErrorObject = PyBytes_FromString("slider.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -59,19 +59,28 @@ static char text_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"text", /* m_name */
|
||||||
|
text_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
text_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
void
|
void
|
||||||
inittext()
|
inittext()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("text", text_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
text_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("text.error");
|
ErrorObject = PyBytes_FromString("text.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -100,19 +100,29 @@ static char timer_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"timer", /* m_name */
|
||||||
|
timer_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
timer_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
inittimer()
|
inittimer()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4("timer", timer_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
timer_module_documentation,
|
|
||||||
(PyObject*)NULL,PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
ErrorObject = PyString_FromString("timer.error");
|
ErrorObject = PyBytes_FromString("timer.error");
|
||||||
PyDict_SetItemString(d, "error", ErrorObject);
|
PyDict_SetItemString(d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -68,9 +68,20 @@ static PyMethodDef xformsMethods [] ={
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"xforms", /* m_name */
|
||||||
|
"", /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
xformsMethods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void initxforms()
|
void initxforms()
|
||||||
{
|
{
|
||||||
|
PyModule_Create(&moduledef);
|
||||||
(void) Py_InitModule("xforms",xformsMethods);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,6 +417,17 @@ static struct PyMethodDef xyplot_methods[] =
|
|||||||
static char xyplot_module_documentation[] =
|
static char xyplot_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
static struct PyModuleDef moduledef = {
|
||||||
|
PyModuleDef_HEAD_INIT,
|
||||||
|
"xyplot", /* m_name */
|
||||||
|
xyplot_module_documentation, /* m_doc */
|
||||||
|
-1, /* m_size */
|
||||||
|
xyplot_methods, /* m_methods */
|
||||||
|
NULL, /* m_reload */
|
||||||
|
NULL, /* m_traverse */
|
||||||
|
NULL, /* m_clear */
|
||||||
|
NULL, /* m_free */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
initxyplot ()
|
initxyplot ()
|
||||||
@ -424,13 +435,11 @@ initxyplot ()
|
|||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
m = Py_InitModule4 ("xyplot", xyplot_methods,
|
m = PyModule_Create(&moduledef);
|
||||||
xyplot_module_documentation,
|
|
||||||
(PyObject *) NULL, PYTHON_API_VERSION);
|
|
||||||
|
|
||||||
/* Add some symbolic constants to the module */
|
/* Add some symbolic constants to the module */
|
||||||
d = PyModule_GetDict (m);
|
d = PyModule_GetDict (m);
|
||||||
ErrorObject = PyString_FromString ("xyplot.error");
|
ErrorObject = PyBytes_FromString ("xyplot.error");
|
||||||
PyDict_SetItemString (d, "error", ErrorObject);
|
PyDict_SetItemString (d, "error", ErrorObject);
|
||||||
|
|
||||||
/* XXXX Add constants here */
|
/* XXXX Add constants here */
|
||||||
|
@ -44,7 +44,7 @@ def runforms():
|
|||||||
# This is the default callback function:
|
# This is the default callback function:
|
||||||
|
|
||||||
def _nocb(args):
|
def _nocb(args):
|
||||||
print "This object has no Callback!"
|
print("This object has no Callback!")
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#This is the Form class
|
#This is the Form class
|
||||||
|
Loading…
x
Reference in New Issue
Block a user