C formatting using astyle --style=allman

This commit is contained in:
Roberto Alsina 2024-06-03 11:41:35 -03:00
parent d038fcd217
commit 656bb9ebad
22 changed files with 3143 additions and 3101 deletions

View File

@ -28,11 +28,11 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char bmp_create__doc__[] =
"Creates a bitmap"
;
"Creates a bitmap"
;
static PyObject *
bmp_create(self, args)
bmp_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
{
@ -41,17 +41,17 @@ PyObject *args;
FL_OBJECT *o;
if (!PyArg_ParseTuple(args, "iiiiis", &t, &x, &y, &w, &h, &l))
return NULL;
return NULL;
o = fl_create_bitmap(t, x, y, w, h, l);
return Py_BuildValue("l", (long) o);
}
static char bmp_set_data__doc__[] =
"Sets the bitmap's data"
;
"Sets the bitmap's data"
;
static PyObject *
bmp_set_data(self, args)
bmp_set_data(self, args)
PyObject *self; /* Not used */
PyObject *args;
{
@ -60,7 +60,7 @@ PyObject *args;
unsigned char *b;
if (!PyArg_ParseTuple(args, "liis", &o, &w, &h, &b))
return NULL;
return NULL;
fl_set_bitmap_data((FL_OBJECT *) o, w, h, b);
Py_INCREF(Py_None);
return Py_None;
@ -69,11 +69,11 @@ PyObject *args;
static char bmp_set_file__doc__[] =
"Loads a file into a bitmap"
;
"Loads a file into a bitmap"
;
static PyObject *
bmp_set_file(self, args)
bmp_set_file(self, args)
PyObject *self; /* Not used */
PyObject *args;
{
@ -81,7 +81,7 @@ PyObject *args;
char *f;
if (!PyArg_ParseTuple(args, "ls", &o, &f))
return NULL;
return NULL;
fl_set_bitmap_file((FL_OBJECT *) o, f);
Py_INCREF(Py_None);
return Py_None;
@ -103,20 +103,21 @@ static struct PyMethodDef bmp_methods[] =
/* Initialization function for the module (*must* be called initbitmap) */
static char bitmaps_module_documentation[] =
""
;
""
;
static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT,
"bitmaps",
bitmaps_module_documentation,
-1,
bmp_methods,
NULL,
NULL,
NULL,
NULL,
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"bitmaps",
bitmaps_module_documentation,
-1,
bmp_methods,
NULL,
NULL,
NULL,
NULL,
};
PyMODINIT_FUNC
@ -136,5 +137,5 @@ PyInit_bitmaps()
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module bitmaps");
Py_FatalError("can't initialize module bitmaps");
}

View File

@ -29,41 +29,43 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char box_create__doc__[] =
"Creates a Box"
;
"Creates a Box"
;
static PyObject *
box_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_box(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_box(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
/* List of methods defined in the module */
static struct PyMethodDef box_methods[] = {
{"create", box_create, 1, box_create__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef box_methods[] =
{
{"create", box_create, 1, box_create__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initbox) */
static char box_module_documentation[] =
""
;
static char box_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"box", /* m_name */
box_module_documentation, /* m_doc */
@ -73,25 +75,25 @@ static struct PyModuleDef moduledef = {
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_box()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("box.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("box.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module box");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module box");
}

View File

@ -29,387 +29,387 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char browser_create__doc__[] =
"Creates a Browser"
;
"Creates a Browser"
;
static PyObject *
browser_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_browser(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_browser(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char browser_add_line__doc__[] =
"Adds a line to a browser"
;
"Adds a line to a browser"
;
static PyObject *
browser_add_line(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *l;
long o;
char *l;
if (!PyArg_ParseTuple(args, "ls",&o,&l))
return NULL;
fl_add_browser_line ((FL_OBJECT *)o,l);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ls",&o,&l))
return NULL;
fl_add_browser_line ((FL_OBJECT *)o,l);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_addto__doc__[] =
"Adds a line to a browser, and shifts it there"
;
"Adds a line to a browser, and shifts it there"
;
static PyObject *
browser_addto(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *l;
long o;
char *l;
if (!PyArg_ParseTuple(args, "ls",&o,&l))
return NULL;
fl_addto_browser ((FL_OBJECT *)o,l);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ls",&o,&l))
return NULL;
fl_addto_browser ((FL_OBJECT *)o,l);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_insert_line__doc__[] =
""
;
""
;
static PyObject *
browser_insert_line(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n;
char *l;
long o;
int n;
char *l;
if (!PyArg_ParseTuple(args, "lis",&o,&n,&l))
return NULL;
fl_insert_browser_line ((FL_OBJECT *)o,n,l);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lis",&o,&n,&l))
return NULL;
fl_insert_browser_line ((FL_OBJECT *)o,n,l);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_delete_line__doc__[] =
"Deletes a line from a browser"
;
"Deletes a line from a browser"
;
static PyObject *
browser_delete_line(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n;
long o;
int n;
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
fl_delete_browser_line ((FL_OBJECT *)o,n);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
fl_delete_browser_line ((FL_OBJECT *)o,n);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_replace_line__doc__[] =
"Replaces a line of abrowser"
;
"Replaces a line of abrowser"
;
static PyObject *
browser_replace_line(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n;
char *l;
long o;
int n;
char *l;
if (!PyArg_ParseTuple(args, "lis",&o,&n,&l))
return NULL;
fl_replace_browser_line ((FL_OBJECT *)o,n,l);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lis",&o,&n,&l))
return NULL;
fl_replace_browser_line ((FL_OBJECT *)o,n,l);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_get_line__doc__[] =
"Gets a browser's line"
;
"Gets a browser's line"
;
static PyObject *
browser_get_line(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n;
char s[1024];
long o;
int n;
char s[1024];
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
strcpy(s,fl_get_browser_line ((FL_OBJECT *)o,n));
return Py_BuildValue ("s",s);
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
strcpy(s,fl_get_browser_line ((FL_OBJECT *)o,n));
return Py_BuildValue ("s",s);
}
static char browser_load__doc__[] =
"Loads a file into a browser"
;
"Loads a file into a browser"
;
static PyObject *
browser_load(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *s;
int r;
long o;
char *s;
int r;
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
r=fl_load_browser((FL_OBJECT *)o,s);
return Py_BuildValue ("i",r);
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
r=fl_load_browser((FL_OBJECT *)o,s);
return Py_BuildValue ("i",r);
}
static char browser_select_line__doc__[] =
"Selects a browser line"
;
"Selects a browser line"
;
static PyObject *
browser_select_line(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n;
long o;
int n;
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
fl_select_browser_line ((FL_OBJECT *)o,n);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
fl_select_browser_line ((FL_OBJECT *)o,n);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_deselect_line__doc__[] =
"Deselects a browser's line"
;
"Deselects a browser's line"
;
static PyObject *
browser_deselect_line(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n;
long o;
int n;
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
fl_deselect_browser_line ((FL_OBJECT *)o,n);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
fl_deselect_browser_line ((FL_OBJECT *)o,n);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_deselect__doc__[] =
"Deselects all lines in a browser"
;
"Deselects all lines in a browser"
;
static PyObject *
browser_deselect(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_deselect_browser ((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_deselect_browser ((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_isselected_line__doc__[] =
"Is that line selected in the browser?"
;
"Is that line selected in the browser?"
;
static PyObject *
browser_isselected_line(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n,r;
long o;
int n,r;
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
r=fl_isselected_browser_line((FL_OBJECT *)o,n);
return Py_BuildValue ("i",r);
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
r=fl_isselected_browser_line((FL_OBJECT *)o,n);
return Py_BuildValue ("i",r);
}
static char browser_get_topline__doc__[] =
"The number of the 1st visible line in the browser"
;
"The number of the 1st visible line in the browser"
;
static PyObject *
browser_get_topline(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int r;
long o;
int r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_browser_topline((FL_OBJECT *)o);
return Py_BuildValue("i",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_browser_topline((FL_OBJECT *)o);
return Py_BuildValue("i",r);
}
static char browser_get__doc__[] =
"You better read the xforms manual on fl_get_browser for this one..."
;
"You better read the xforms manual on fl_get_browser for this one..."
;
static PyObject *
browser_get(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int r;
long o;
int r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_browser((FL_OBJECT *)o);
return Py_BuildValue("i",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_browser((FL_OBJECT *)o);
return Py_BuildValue("i",r);
}
static char browser_get_maxline__doc__[] =
"Returns the number of lines in the browser"
;
"Returns the number of lines in the browser"
;
static PyObject *
browser_get_maxline(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int r;
long o;
int r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_browser_maxline((FL_OBJECT *)o);
return Py_BuildValue("i",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_browser_maxline((FL_OBJECT *)o);
return Py_BuildValue("i",r);
}
static char browser_get_screenlines__doc__[] =
"Returns the number of visible lines in the browser"
;
"Returns the number of visible lines in the browser"
;
static PyObject *
browser_get_screenlines(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int r;
long o;
int r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_browser_screenlines((FL_OBJECT *)o);
return Py_BuildValue ("i",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_browser_screenlines((FL_OBJECT *)o);
return Py_BuildValue ("i",r);
}
static char browser_set_topline__doc__[] =
"Sets the browser's first visible line"
;
"Sets the browser's first visible line"
;
static PyObject *
browser_set_topline(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n;
long o;
int n;
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
fl_set_browser_topline((FL_OBJECT *)o,n);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&n))
return NULL;
fl_set_browser_topline((FL_OBJECT *)o,n);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_set_fontsize__doc__[] =
"Set the browser's font size"
;
"Set the browser's font size"
;
static PyObject *
browser_set_fontsize(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int s;
long o;
int s;
if (!PyArg_ParseTuple(args, "li",&o,&s))
return NULL;
fl_set_browser_fontsize((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&s))
return NULL;
fl_set_browser_fontsize((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_set_fontstyle__doc__[] =
"Set the browser's font style"
;
"Set the browser's font style"
;
static PyObject *
browser_set_fontstyle(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int s;
long o;
int s;
if (!PyArg_ParseTuple(args, "li",&o,&s))
return NULL;
fl_set_browser_fontstyle((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&s))
return NULL;
fl_set_browser_fontstyle((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char browser_set_specialkey__doc__[] =
"Set the character used to change text formatting in the browser"
;
"Set the character used to change text formatting in the browser"
;
static PyObject *
browser_set_specialkey(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int s;
long o;
int s;
if (!PyArg_ParseTuple(args, "li",&o,&s))
return NULL;
fl_set_browser_specialkey((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&s))
return NULL;
fl_set_browser_specialkey((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
// static char browser_set_leftslider__doc__[] =
// "Set the browser's slider to the left"
// ;
//
//
// static PyObject *
// browser_set_leftslider(self, args)
// PyObject *self; /* Not used */
@ -417,7 +417,7 @@ browser_set_specialkey(self, args)
// {
// long o;
// int s;
//
//
// if (!PyArg_ParseTuple(args, "li",&o,&s))
// return NULL;
// fl_set_browser_leftslider((FL_OBJECT *)o,s);
@ -427,40 +427,42 @@ browser_set_specialkey(self, args)
/* List of methods defined in the module */
static struct PyMethodDef browser_methods[] = {
{"create", browser_create, 1, browser_create__doc__},
{"add_line", browser_add_line, 1, browser_add_line__doc__},
{"addto", browser_addto, 1, browser_addto__doc__},
{"insert_line", browser_insert_line, 1, browser_insert_line__doc__},
{"delete_line", browser_delete_line, 1, browser_delete_line__doc__},
{"replace_line", browser_replace_line, 1, browser_replace_line__doc__},
{"get_line", browser_get_line, 1, browser_get_line__doc__},
{"load", browser_load, 1, browser_load__doc__},
{"select_line", browser_select_line, 1, browser_select_line__doc__},
{"deselect_line", browser_deselect_line, 1, browser_deselect_line__doc__},
{"deselect", browser_deselect, 1, browser_deselect__doc__},
{"isselected_line", browser_isselected_line, 1, browser_isselected_line__doc__},
{"get_topline", browser_get_topline, 1, browser_get_topline__doc__},
{"get", browser_get, 1, browser_get__doc__},
{"get_maxline", browser_get_maxline, 1, browser_get_maxline__doc__},
{"get_screenlines", browser_get_screenlines, 1, browser_get_screenlines__doc__},
{"set_topline", browser_set_topline, 1, browser_set_topline__doc__},
{"set_fontsize", browser_set_fontsize, 1, browser_set_fontsize__doc__},
{"set_fontstyle", browser_set_fontstyle, 1, browser_set_fontstyle__doc__},
{"set_specialkey", browser_set_specialkey, 1, browser_set_specialkey__doc__},
static struct PyMethodDef browser_methods[] =
{
{"create", browser_create, 1, browser_create__doc__},
{"add_line", browser_add_line, 1, browser_add_line__doc__},
{"addto", browser_addto, 1, browser_addto__doc__},
{"insert_line", browser_insert_line, 1, browser_insert_line__doc__},
{"delete_line", browser_delete_line, 1, browser_delete_line__doc__},
{"replace_line", browser_replace_line, 1, browser_replace_line__doc__},
{"get_line", browser_get_line, 1, browser_get_line__doc__},
{"load", browser_load, 1, browser_load__doc__},
{"select_line", browser_select_line, 1, browser_select_line__doc__},
{"deselect_line", browser_deselect_line, 1, browser_deselect_line__doc__},
{"deselect", browser_deselect, 1, browser_deselect__doc__},
{"isselected_line", browser_isselected_line, 1, browser_isselected_line__doc__},
{"get_topline", browser_get_topline, 1, browser_get_topline__doc__},
{"get", browser_get, 1, browser_get__doc__},
{"get_maxline", browser_get_maxline, 1, browser_get_maxline__doc__},
{"get_screenlines", browser_get_screenlines, 1, browser_get_screenlines__doc__},
{"set_topline", browser_set_topline, 1, browser_set_topline__doc__},
{"set_fontsize", browser_set_fontsize, 1, browser_set_fontsize__doc__},
{"set_fontstyle", browser_set_fontstyle, 1, browser_set_fontstyle__doc__},
{"set_specialkey", browser_set_specialkey, 1, browser_set_specialkey__doc__},
// {"set_leftslider", browser_set_leftslider, 1, browser_set_leftslider__doc__},
{NULL, NULL} /* sentinel */
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initbrowser) */
static char browser_module_documentation[] =
""
;
static char browser_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"browser", /* m_name */
browser_module_documentation, /* m_doc */
@ -470,25 +472,25 @@ static char browser_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_browser()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("browser.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("browser.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module browser");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module browser");
}

View File

@ -29,322 +29,324 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char button_create__doc__[] =
"Creates a normal button"
;
"Creates a normal button"
;
static PyObject *
button_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_button(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_button(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char button_create_round__doc__[] =
"Creates a round button"
;
"Creates a round button"
;
static PyObject *
button_create_round(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_roundbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_roundbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char button_create_light__doc__[] =
"Creates a light button"
;
"Creates a light button"
;
static PyObject *
button_create_light(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_lightbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_lightbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char button_create_check__doc__[] =
"Creates a check button"
;
"Creates a check button"
;
static PyObject *
button_create_check(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_checkbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_checkbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char button_create_bitmap__doc__[] =
"Creates a bitmap button"
;
"Creates a bitmap button"
;
static PyObject *
button_create_bitmap(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_bitmapbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_bitmapbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char button_create_pixmap__doc__[] =
"Creates a pixmap button"
;
"Creates a pixmap button"
;
static PyObject *
button_create_pixmap(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_pixmapbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_pixmapbutton(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char button_set_bitmap_data__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
button_set_bitmap_data(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char button_set_bitmap_file__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
button_set_bitmap_file(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char button_set_pixmap_data__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
button_set_pixmap_data(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char button_set_pixmap_file__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
button_set_pixmap_file(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char button_set_pixmap_pixmap__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
button_set_pixmap_pixmap(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char button_get_pixmap_pixmap__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
button_get_pixmap_pixmap(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char button_get__doc__[] =
"Gets the button's value"
;
"Gets the button's value"
;
static PyObject *
button_get(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int r;
long o;
int r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_button((FL_OBJECT *)o);
return Py_BuildValue("i",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_button((FL_OBJECT *)o);
return Py_BuildValue("i",r);
}
static char button_set__doc__[] =
"Sets the button's value"
;
"Sets the button's value"
;
static PyObject *
button_set(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int v;
long o;
int v;
if (!PyArg_ParseTuple(args, "li",&o,&v))
return NULL;
fl_set_button((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&v))
return NULL;
fl_set_button((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
}
static char button_get_numb__doc__[] =
"Get's the number of the mouse button last pressed on the button object"
;
"Get's the number of the mouse button last pressed on the button object"
;
static PyObject *
button_get_numb(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n;
long o;
int n;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
n=fl_get_button_numb((FL_OBJECT *)o);
return Py_BuildValue ("i",n);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
n=fl_get_button_numb((FL_OBJECT *)o);
return Py_BuildValue ("i",n);
}
static char button_create_generic__doc__[] =
"Creates a generic button (useful mainly for extensions)"
;
"Creates a generic button (useful mainly for extensions)"
;
static PyObject *
button_create_generic(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int c,t,x,y,w,h;
char *l;
long o;
int c,t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiiis",&c,&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_generic_button (c,t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiiis",&c,&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_generic_button (c,t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
/* List of methods defined in the module */
static struct PyMethodDef button_methods[] = {
{"create", button_create, 1, button_create__doc__},
{"create_round", button_create_round, 1, button_create_round__doc__},
{"create_light", button_create_light, 1, button_create_light__doc__},
{"create_check", button_create_check, 1, button_create_check__doc__},
{"create_bitmap", button_create_bitmap, 1, button_create_bitmap__doc__},
{"create_pixmap", button_create_pixmap, 1, button_create_pixmap__doc__},
{"set_bitmap_data", button_set_bitmap_data, 1, button_set_bitmap_data__doc__},
{"set_bitmap_file", button_set_bitmap_file, 1, button_set_bitmap_file__doc__},
{"set_pixmap_data", button_set_pixmap_data, 1, button_set_pixmap_data__doc__},
{"set_pixmap_file", button_set_pixmap_file, 1, button_set_pixmap_file__doc__},
{"set_pixmap_pixmap", button_set_pixmap_pixmap, 1, button_set_pixmap_pixmap__doc__},
{"get_pixmap_pixmap", button_get_pixmap_pixmap, 1, button_get_pixmap_pixmap__doc__},
{"get", button_get, 1, button_get__doc__},
{"set", button_set, 1, button_set__doc__},
{"get_numb", button_get_numb, 1, button_get_numb__doc__},
{"create_generic", button_create_generic, 1, button_create_generic__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef button_methods[] =
{
{"create", button_create, 1, button_create__doc__},
{"create_round", button_create_round, 1, button_create_round__doc__},
{"create_light", button_create_light, 1, button_create_light__doc__},
{"create_check", button_create_check, 1, button_create_check__doc__},
{"create_bitmap", button_create_bitmap, 1, button_create_bitmap__doc__},
{"create_pixmap", button_create_pixmap, 1, button_create_pixmap__doc__},
{"set_bitmap_data", button_set_bitmap_data, 1, button_set_bitmap_data__doc__},
{"set_bitmap_file", button_set_bitmap_file, 1, button_set_bitmap_file__doc__},
{"set_pixmap_data", button_set_pixmap_data, 1, button_set_pixmap_data__doc__},
{"set_pixmap_file", button_set_pixmap_file, 1, button_set_pixmap_file__doc__},
{"set_pixmap_pixmap", button_set_pixmap_pixmap, 1, button_set_pixmap_pixmap__doc__},
{"get_pixmap_pixmap", button_get_pixmap_pixmap, 1, button_get_pixmap_pixmap__doc__},
{"get", button_get, 1, button_get__doc__},
{"set", button_set, 1, button_set__doc__},
{"get_numb", button_get_numb, 1, button_get_numb__doc__},
{"create_generic", button_create_generic, 1, button_create_generic__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initbutton) */
static char button_module_documentation[] =
""
;
static char button_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"button", /* m_name */
button_module_documentation, /* m_doc */
@ -354,24 +356,24 @@ static char button_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_button()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("button.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("button.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module button");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module button");
}

View File

@ -30,297 +30,299 @@ static PyObject *ErrorObject;
static char choice_create__doc__[] =
"Creates a choice object"
;
"Creates a choice object"
;
static PyObject *
choice_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_choice(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_choice(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char choice_clear__doc__[] =
"Clears the list of choices"
;
"Clears the list of choices"
;
static PyObject *
choice_clear(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_clear_choice((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_clear_choice((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char choice_addto__doc__[] =
"Adds a line to a choice object"
;
"Adds a line to a choice object"
;
static PyObject *
choice_addto(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *t;
long o;
char *t;
if (!PyArg_ParseTuple(args, "ls",&o,&t))
return NULL;
fl_addto_choice((FL_OBJECT *)o,t);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ls",&o,&t))
return NULL;
fl_addto_choice((FL_OBJECT *)o,t);
Py_INCREF(Py_None);
return Py_None;
}
static char choice_replace__doc__[] =
"Replaces a line in a choice"
;
"Replaces a line in a choice"
;
static PyObject *
choice_replace(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int l;
char *t;
long o;
int l;
char *t;
if (!PyArg_ParseTuple(args, "lis",&o,&l,&t))
return NULL;
fl_replace_choice((FL_OBJECT *)o,l,t);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lis",&o,&l,&t))
return NULL;
fl_replace_choice((FL_OBJECT *)o,l,t);
Py_INCREF(Py_None);
return Py_None;
}
static char choice_delete__doc__[] =
"Deletes a line in a choice"
;
"Deletes a line in a choice"
;
static PyObject *
choice_delete(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int l;
long o;
int l;
if (!PyArg_ParseTuple(args, "li",&o,&l))
return NULL;
fl_delete_choice((FL_OBJECT *)o,l);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&l))
return NULL;
fl_delete_choice((FL_OBJECT *)o,l);
Py_INCREF(Py_None);
return Py_None;
}
static char choice_set__doc__[] =
"Sets the choice"
;
"Sets the choice"
;
static PyObject *
choice_set(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int l;
long o;
int l;
if (!PyArg_ParseTuple(args, "li",&o,&l))
return NULL;
fl_set_choice ((FL_OBJECT *)o,l);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&l))
return NULL;
fl_set_choice ((FL_OBJECT *)o,l);
Py_INCREF(Py_None);
return Py_None;
}
static char choice_set_text__doc__[] =
"Sets the choice at the item with the given text"
;
"Sets the choice at the item with the given text"
;
static PyObject *
choice_set_text(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *t;
long o;
char *t;
if (!PyArg_ParseTuple(args, "ls",&o,&t))
return NULL;
fl_set_choice_text((FL_OBJECT *)o,t);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ls",&o,&t))
return NULL;
fl_set_choice_text((FL_OBJECT *)o,t);
Py_INCREF(Py_None);
return Py_None;
}
static char choice_get__doc__[] =
"Gets the choice's selected option number"
;
"Gets the choice's selected option number"
;
static PyObject *
choice_get(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int r;
long o;
int r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_choice((FL_OBJECT *)o);
return Py_BuildValue("i",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_choice((FL_OBJECT *)o);
return Py_BuildValue("i",r);
}
static char choice_get_maxitems__doc__[] =
"Gets the total number of items in the choice"
;
"Gets the total number of items in the choice"
;
static PyObject *
choice_get_maxitems(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int r;
long o;
int r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_choice_maxitems((FL_OBJECT *)o);
return Py_BuildValue("i",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_choice_maxitems((FL_OBJECT *)o);
return Py_BuildValue("i",r);
}
static char choice_get_text__doc__[] =
"Gets the text of the current choice"
;
"Gets the text of the current choice"
;
static PyObject *
choice_get_text(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char t[2048];
long o;
char t[2048];
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
strcpy (t,fl_get_choice_text((FL_OBJECT *)o));
return Py_BuildValue("s",t);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
strcpy (t,fl_get_choice_text((FL_OBJECT *)o));
return Py_BuildValue("s",t);
}
static char choice_set_fontsize__doc__[] =
"Sets the choice's fontsize"
;
"Sets the choice's fontsize"
;
static PyObject *
choice_set_fontsize(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_choice_fontsize((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_choice_fontsize((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
static char choice_set_align__doc__[] =
"Sets the alignment of the choice"
;
"Sets the alignment of the choice"
;
static PyObject *
choice_set_align(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_choice_align((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_choice_align((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
static char choice_set_item_mode__doc__[] =
"Sets an item's mode ?"
;
"Sets an item's mode ?"
;
static PyObject *
choice_set_item_mode(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int n;
unsigned m;
long o;
int n;
unsigned m;
if (!PyArg_ParseTuple(args, "lil",&o,&n,&m))
return NULL;
fl_set_choice_item_mode((FL_OBJECT *)o,n,m);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lil",&o,&n,&m))
return NULL;
fl_set_choice_item_mode((FL_OBJECT *)o,n,m);
Py_INCREF(Py_None);
return Py_None;
}
static char choice_set_item_shortcut__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
choice_set_item_shortcut(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef choice_methods[] = {
{"create", choice_create, 1, choice_create__doc__},
{"clear", choice_clear, 1, choice_clear__doc__},
{"addto", choice_addto, 1, choice_addto__doc__},
{"replace", choice_replace, 1, choice_replace__doc__},
{"delete", choice_delete, 1, choice_delete__doc__},
{"set", choice_set, 1, choice_set__doc__},
{"set_text", choice_set_text, 1, choice_set_text__doc__},
{"get", choice_get, 1, choice_get__doc__},
{"get_maxitems", choice_get_maxitems, 1, choice_get_maxitems__doc__},
{"get_text", choice_get_text, 1, choice_get_text__doc__},
{"set_fontsize", choice_set_fontsize, 1, choice_set_fontsize__doc__},
{"set_align", choice_set_align, 1, choice_set_align__doc__},
{"set_item_mode", choice_set_item_mode, 1, choice_set_item_mode__doc__},
{"set_item_shortcut", choice_set_item_shortcut, 1, choice_set_item_shortcut__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef choice_methods[] =
{
{"create", choice_create, 1, choice_create__doc__},
{"clear", choice_clear, 1, choice_clear__doc__},
{"addto", choice_addto, 1, choice_addto__doc__},
{"replace", choice_replace, 1, choice_replace__doc__},
{"delete", choice_delete, 1, choice_delete__doc__},
{"set", choice_set, 1, choice_set__doc__},
{"set_text", choice_set_text, 1, choice_set_text__doc__},
{"get", choice_get, 1, choice_get__doc__},
{"get_maxitems", choice_get_maxitems, 1, choice_get_maxitems__doc__},
{"get_text", choice_get_text, 1, choice_get_text__doc__},
{"set_fontsize", choice_set_fontsize, 1, choice_set_fontsize__doc__},
{"set_align", choice_set_align, 1, choice_set_align__doc__},
{"set_item_mode", choice_set_item_mode, 1, choice_set_item_mode__doc__},
{"set_item_shortcut", choice_set_item_shortcut, 1, choice_set_item_shortcut__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initchoice) */
static char choice_module_documentation[] =
""
;
static char choice_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"choice", /* m_name */
choice_module_documentation, /* m_doc */
@ -330,24 +332,24 @@ static char choice_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_choice()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("choice.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("choice.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module choice");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module choice");
}

View File

@ -28,59 +28,61 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char clock_create__doc__[] =
"Creates a clock"
;
"Creates a clock"
;
static PyObject *
clock_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_clock(t,x,y,w,h,l);
return Py_BuildValue ("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_clock(t,x,y,w,h,l);
return Py_BuildValue ("l",o);
}
static char clock_get__doc__[] =
"Gets the current time"
;
"Gets the current time"
;
static PyObject *
clock_get(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int h,m,s;
long o;
int h,m,s;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_clock ((FL_OBJECT *)o,&h,&m,&s);
return Py_BuildValue ("iii",h,m,s);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_clock ((FL_OBJECT *)o,&h,&m,&s);
return Py_BuildValue ("iii",h,m,s);
}
/* List of methods defined in the module */
static struct PyMethodDef clock_methods[] = {
{"create", clock_create, 1, clock_create__doc__},
{"get", clock_get, 1, clock_get__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef clock_methods[] =
{
{"create", clock_create, 1, clock_create__doc__},
{"get", clock_get, 1, clock_get__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initclock) */
static char clock_module_documentation[] =
""
;
static char clock_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"clock", /* m_name */
clock_module_documentation, /* m_doc */
@ -90,25 +92,25 @@ static char clock_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_clock()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("clock.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("clock.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module clock");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module clock");
}

View File

@ -28,158 +28,160 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char counter_create__doc__[] =
"Creates a counter"
;
"Creates a counter"
;
static PyObject *
counter_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_counter(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_counter(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char counter_set_value__doc__[] =
"Sets the value of the counter (Use only on visible counters!)"
;
"Sets the value of the counter (Use only on visible counters!)"
;
static PyObject *
counter_set_value(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double v;
long o;
double v;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_counter_value((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_counter_value((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
}
static char counter_set_bounds__doc__[] =
"Sets the counter's max & min"
;
"Sets the counter's max & min"
;
static PyObject *
counter_set_bounds(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double min,max;
long o;
double min,max;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_counter_bounds((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_counter_bounds((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
}
static char counter_set_step__doc__[] =
"Set the counter's step size (small & large)"
;
"Set the counter's step size (small & large)"
;
static PyObject *
counter_set_step(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double s,l;
long o;
double s,l;
if (!PyArg_ParseTuple(args, "ldd",&o,&s,&l))
return NULL;
fl_set_counter_step((FL_OBJECT *)o,s,l);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ldd",&o,&s,&l))
return NULL;
fl_set_counter_step((FL_OBJECT *)o,s,l);
Py_INCREF(Py_None);
return Py_None;
}
static char counter_set_precision__doc__[] =
"Sets the counter's precision"
;
"Sets the counter's precision"
;
static PyObject *
counter_set_precision(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int p;
long o;
int p;
if (!PyArg_ParseTuple(args, "li",&o,&p))
return NULL;
fl_set_counter_precision ((FL_OBJECT *)o,p);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&p))
return NULL;
fl_set_counter_precision ((FL_OBJECT *)o,p);
Py_INCREF(Py_None);
return Py_None;
}
static char counter_get_value__doc__[] =
"Returns the counter's value"
;
"Returns the counter's value"
;
static PyObject *
counter_get_value(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double r;
long o;
double r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_counter_value((FL_OBJECT *)o);
return Py_BuildValue ("d",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_counter_value((FL_OBJECT *)o);
return Py_BuildValue ("d",r);
}
static char counter_set_return__doc__[] =
"Makes the counter return always or when released"
;
"Makes the counter return always or when released"
;
static PyObject *
counter_set_return(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_counter_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_counter_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef counter_methods[] = {
{"create", counter_create, 1, counter_create__doc__},
{"set_value", counter_set_value, 1, counter_set_value__doc__},
{"set_bounds", counter_set_bounds, 1, counter_set_bounds__doc__},
{"set_step", counter_set_step, 1, counter_set_step__doc__},
{"set_precision", counter_set_precision, 1, counter_set_precision__doc__},
{"get_value", counter_get_value, 1, counter_get_value__doc__},
{"set_return", counter_set_return, 1, counter_set_return__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef counter_methods[] =
{
{"create", counter_create, 1, counter_create__doc__},
{"set_value", counter_set_value, 1, counter_set_value__doc__},
{"set_bounds", counter_set_bounds, 1, counter_set_bounds__doc__},
{"set_step", counter_set_step, 1, counter_set_step__doc__},
{"set_precision", counter_set_precision, 1, counter_set_precision__doc__},
{"get_value", counter_get_value, 1, counter_get_value__doc__},
{"set_return", counter_set_return, 1, counter_set_return__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initcounter) */
static char counter_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static char counter_module_documentation[] =
""
;
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"counter", /* m_name */
counter_module_documentation, /* m_doc */
@ -189,24 +191,24 @@ static char counter_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_counter()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("counter.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("counter.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module counter");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module counter");
}

View File

@ -28,158 +28,160 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char dial_create__doc__[] =
"Creates a dial"
;
"Creates a dial"
;
static PyObject *
dial_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_dial(t,x,y,w,h,l);
return Py_BuildValue ("l",o);;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_dial(t,x,y,w,h,l);
return Py_BuildValue ("l",o);;
}
static char dial_set_value__doc__[] =
"Sets the dial value"
;
"Sets the dial value"
;
static PyObject *
dial_set_value(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double v;
long o;
double v;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_dial_value ((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_dial_value ((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
}
static char dial_get_value__doc__[] =
"Gets the dial's value"
;
"Gets the dial's value"
;
static PyObject *
dial_get_value(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double r;
long o;
double r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_dial_value((FL_OBJECT *)o);
return Py_BuildValue("d",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_dial_value((FL_OBJECT *)o);
return Py_BuildValue("d",r);
}
static char dial_set_bounds__doc__[] =
"Sets the dial bounds"
;
"Sets the dial bounds"
;
static PyObject *
dial_set_bounds(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double min,max;
long o;
double min,max;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_dial_bounds((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_dial_bounds((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
}
static char dial_get_bounds__doc__[] =
"Gets the dial bounds"
;
"Gets the dial bounds"
;
static PyObject *
dial_get_bounds(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double min,max;
long o;
double min,max;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_dial_bounds((FL_OBJECT *)o,&min,&max);
return Py_BuildValue("dd",min,max);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_dial_bounds((FL_OBJECT *)o,&min,&max);
return Py_BuildValue("dd",min,max);
}
static char dial_set_step__doc__[] =
"Sets the dial step"
;
"Sets the dial step"
;
static PyObject *
dial_set_step(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double s;
long o;
double s;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_dial_step ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_dial_step ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char dial_set_return__doc__[] =
"Makes a dial return always or when released"
;
"Makes a dial return always or when released"
;
static PyObject *
dial_set_return(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_dial_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_dial_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef dial_methods[] = {
{"create", dial_create, 1, dial_create__doc__},
{"set_value", dial_set_value, 1, dial_set_value__doc__},
{"get_value", dial_get_value, 1, dial_get_value__doc__},
{"set_bounds", dial_set_bounds, 1, dial_set_bounds__doc__},
{"get_bounds", dial_get_bounds, 1, dial_get_bounds__doc__},
{"set_step", dial_set_step, 1, dial_set_step__doc__},
{"set_return", dial_set_return, 1, dial_set_return__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef dial_methods[] =
{
{"create", dial_create, 1, dial_create__doc__},
{"set_value", dial_set_value, 1, dial_set_value__doc__},
{"get_value", dial_get_value, 1, dial_get_value__doc__},
{"set_bounds", dial_set_bounds, 1, dial_set_bounds__doc__},
{"get_bounds", dial_get_bounds, 1, dial_get_bounds__doc__},
{"set_step", dial_set_step, 1, dial_set_step__doc__},
{"set_return", dial_set_return, 1, dial_set_return__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initdial) */
static char dial_module_documentation[] =
""
;
static char dial_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"dial", /* m_name */
dial_module_documentation, /* m_doc */
@ -189,24 +191,24 @@ static char dial_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_dial()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("dial.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("dial.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module dial");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module dial");
}

File diff suppressed because it is too large Load Diff

View File

@ -28,40 +28,42 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char frame_create__doc__[] =
"Creates a frame"
;
"Creates a frame"
;
static PyObject *
frame_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_frame (t,x,y,w,h,l);
return Py_BuildValue ("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_frame (t,x,y,w,h,l);
return Py_BuildValue ("l",o);
}
/* List of methods defined in the module */
static struct PyMethodDef frame_methods[] = {
{"create", frame_create, 1, frame_create__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef frame_methods[] =
{
{"create", frame_create, 1, frame_create__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initframe) */
static char frame_module_documentation[] =
""
;
static char frame_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"frame", /* m_name */
frame_module_documentation, /* m_doc */
@ -71,25 +73,25 @@ static char frame_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_frame()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("frame.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("frame.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module frame");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module frame");
}

View File

@ -5,475 +5,477 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char goodies_set_font__doc__[] =
"Sets the goodies font XXXXXXBroken?"
;
"Sets the goodies font XXXXXXBroken?"
;
static PyObject *
goodies_set_font(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int i,j;
if (!PyArg_ParseTuple(args, "ii"),&i,&j)
return NULL;
fl_set_goodies_font (i,j);
Py_INCREF(Py_None);
return Py_None;
int i,j;
if (!PyArg_ParseTuple(args, "ii"),&i,&j)
return NULL;
fl_set_goodies_font (i,j);
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_show_message__doc__[] =
"Shows a message (3 lines)"
;
"Shows a message (3 lines)"
;
static PyObject *
goodies_show_message(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char *s1,*s2,*s3;
char *s1,*s2,*s3;
if (!PyArg_ParseTuple(args, "sss",&s1,&s2,&s3))
return NULL;
fl_show_message (s1,s2,s3);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "sss",&s1,&s2,&s3))
return NULL;
fl_show_message (s1,s2,s3);
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_show_alert__doc__[] =
"Shows an alert message"
;
"Shows an alert message"
;
static PyObject *
goodies_show_alert(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char *s1,*s2,*s3;
int i;
char *s1,*s2,*s3;
int i;
if (!PyArg_ParseTuple(args, "sssi",&s1,&s2,&s3,&i))
return NULL;
fl_show_alert (s1,s2,s3,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "sssi",&s1,&s2,&s3,&i))
return NULL;
fl_show_alert (s1,s2,s3,i);
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_show_question__doc__[] =
"Shows a question"
;
"Shows a question"
;
static PyObject *
goodies_show_question(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char *s1;
int v,r;
if (!PyArg_ParseTuple(args, "ss",&s1,&v))
return NULL;
r=fl_show_question (s1,v);
return Py_BuildValue ("i",r);
char *s1;
int v,r;
if (!PyArg_ParseTuple(args, "ss",&s1,&v))
return NULL;
r=fl_show_question (s1,v);
return Py_BuildValue ("i",r);
}
static char goodies_show_input__doc__[] =
"Asks a line of text"
;
"Asks a line of text"
;
static PyObject *
goodies_show_input(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char *s1,*s2,r[2048];
char *s1,*s2,r[2048];
if (!PyArg_ParseTuple(args, "ss",&s1,&s2))
return NULL;
strcpy (r,fl_show_input(s1,s2));
return Py_BuildValue ("s",r);
if (!PyArg_ParseTuple(args, "ss",&s1,&s2))
return NULL;
strcpy (r,fl_show_input(s1,s2));
return Py_BuildValue ("s",r);
}
static char goodies_show_colormap__doc__[] =
"Shows a colormap"
;
"Shows a colormap"
;
static PyObject *
goodies_show_colormap(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int i,r;
int i,r;
if (!PyArg_ParseTuple(args, "i",&i))
return NULL;
r=fl_show_colormap (i);
return Py_BuildValue ("i",r);
if (!PyArg_ParseTuple(args, "i",&i))
return NULL;
r=fl_show_colormap (i);
return Py_BuildValue ("i",r);
}
static char goodies_show_choice__doc__[] =
"Shows a choice"
;
"Shows a choice"
;
static PyObject *
goodies_show_choice(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char *s1,*s2,*s3,*s4,*s5,*s6;
int i1,i2,r;
char *s1,*s2,*s3,*s4,*s5,*s6;
int i1,i2,r;
if (!PyArg_ParseTuple(args, "sssisssi",&s1,&s2,&s3,&i1,&s4,&s5,&s6,&i2))
return NULL;
r=fl_show_choice (s1,s2,s3,i1,s4,s5,s6,i2);
return Py_BuildValue("i",r);
if (!PyArg_ParseTuple(args, "sssisssi",&s1,&s2,&s3,&i1,&s4,&s5,&s6,&i2))
return NULL;
r=fl_show_choice (s1,s2,s3,i1,s4,s5,s6,i2);
return Py_BuildValue("i",r);
}
static char goodies_set_choices_shortcut__doc__[] =
"Sets the choice's shortcuts"
;
"Sets the choice's shortcuts"
;
static PyObject *
goodies_set_choices_shortcut(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char *s1,*s2,*s3;
char *s1,*s2,*s3;
if (!PyArg_ParseTuple(args, "sss",&s1,&s2,&s3))
return NULL;
fl_set_choices_shortcut (s1,s2,s3);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "sss",&s1,&s2,&s3))
return NULL;
fl_set_choices_shortcut (s1,s2,s3);
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_show_oneliner__doc__[] =
"Shows a one-liner"
;
"Shows a one-liner"
;
static PyObject *
goodies_show_oneliner(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char *s1;
int i,j;
char *s1;
int i,j;
if (!PyArg_ParseTuple(args, "sii",&s1,&i,&j))
return NULL;
fl_show_oneliner (s1,i,j);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "sii",&s1,&i,&j))
return NULL;
fl_show_oneliner (s1,i,j);
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_hide_oneliner__doc__[] =
"Hides a oneliner"
;
"Hides a oneliner"
;
static PyObject *
goodies_hide_oneliner(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
fl_hide_oneliner();
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
fl_hide_oneliner();
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_set_oneliner_font__doc__[] =
"Sets the oneliner font"
;
"Sets the oneliner font"
;
static PyObject *
goodies_set_oneliner_font(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int i,j;
int i,j;
if (!PyArg_ParseTuple(args, "ii",&i,&j))
return NULL;
fl_set_oneliner_font(i,j);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ii",&i,&j))
return NULL;
fl_set_oneliner_font(i,j);
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_set_oneliner_color__doc__[] =
"Sets the oneliner color"
;
"Sets the oneliner color"
;
static PyObject *
goodies_set_oneliner_color(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int i,j;
int i,j;
if (!PyArg_ParseTuple(args, "ii",&i,&j))
return NULL;
fl_set_oneliner_color (i,j);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ii",&i,&j))
return NULL;
fl_set_oneliner_color (i,j);
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_use_fselector__doc__[] =
"??"
;
"??"
;
static PyObject *
goodies_use_fselector(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int i;
int i;
if (!PyArg_ParseTuple(args, "i",&i))
return NULL;
fl_use_fselector (i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "i",&i))
return NULL;
fl_use_fselector (i);
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_show_fselector__doc__[] =
"Shows a fselector"
;
"Shows a fselector"
;
static PyObject *
goodies_show_fselector(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char *s1,*s2,*s3,*s4,r[2048];
char *s1,*s2,*s3,*s4,r[2048];
if (!PyArg_ParseTuple(args, "ssss",&s1,&s2,&s3,&s4))
return NULL;
strcpy (r,fl_show_fselector (s1,s2,s3,s4));
return Py_BuildValue ("s",r);
if (!PyArg_ParseTuple(args, "ssss",&s1,&s2,&s3,&s4))
return NULL;
strcpy (r,fl_show_fselector (s1,s2,s3,s4));
return Py_BuildValue ("s",r);
}
static char goodies_set_fselector_placement__doc__[] =
""
;
""
;
static PyObject *
goodies_set_fselector_placement(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int i;
int i;
if (!PyArg_ParseTuple(args, "i",&i))
return NULL;
fl_set_fselector_placement(i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "i",&i))
return NULL;
fl_set_fselector_placement(i);
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_set_fselector_callback__doc__[] =
"XXXXXX Not implemented"
;
"XXXXXX Not implemented"
;
static PyObject *
goodies_set_fselector_callback(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_get_directory__doc__[] =
""
;
""
;
static PyObject *
goodies_get_directory(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char r[2048];
if (!PyArg_ParseTuple(args, ""))
return NULL;
strcpy (r,fl_get_directory());
return Py_BuildValue ("s",r);
char r[2048];
if (!PyArg_ParseTuple(args, ""))
return NULL;
strcpy (r,fl_get_directory());
return Py_BuildValue ("s",r);
}
static char goodies_get_pattern__doc__[] =
""
;
""
;
static PyObject *
goodies_get_pattern(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char r[2048];
char r[2048];
if (!PyArg_ParseTuple(args, ""))
return NULL;
strcpy (r,fl_get_pattern());
return Py_BuildValue ("s",r);
if (!PyArg_ParseTuple(args, ""))
return NULL;
strcpy (r,fl_get_pattern());
return Py_BuildValue ("s",r);
}
static char goodies_get_filename__doc__[] =
""
;
""
;
static PyObject *
goodies_get_filename(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
char r[2048];
char r[2048];
if (!PyArg_ParseTuple(args, ""))
return NULL;
strcpy (r,fl_get_filename());
return Py_BuildValue ("s",r);
if (!PyArg_ParseTuple(args, ""))
return NULL;
strcpy (r,fl_get_filename());
return Py_BuildValue ("s",r);
}
static char goodies_refresh_fselector__doc__[] =
""
;
""
;
static PyObject *
goodies_refresh_fselector(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
fl_refresh_fselector();
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
fl_refresh_fselector();
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_add_fselector_appbutton__doc__[] =
"XXXXXX Not implemented"
;
"XXXXXX Not implemented"
;
static PyObject *
goodies_add_fselector_appbutton(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_disable_fselector_cache__doc__[] =
"XXXXXX Not implemented"
;
"XXXXXX Not implemented"
;
static PyObject *
goodies_disable_fselector_cache(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_invalidate_fselector_cache__doc__[] =
"XXXXXX Not implemented"
;
"XXXXXX Not implemented"
;
static PyObject *
goodies_invalidate_fselector_cache(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_get_fselector_form__doc__[] =
"XXXXXX Not implemented"
;
"XXXXXX Not implemented"
;
static PyObject *
goodies_get_fselector_form(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char goodies_hide_fselector__doc__[] =
"Hides a fselector"
;
"Hides a fselector"
;
static PyObject *
goodies_hide_fselector(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
fl_hide_fselector();
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
fl_hide_fselector();
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef goodies_methods[] = {
{"set_font", goodies_set_font, 1, goodies_set_font__doc__},
{"show_message", goodies_show_message, 1, goodies_show_message__doc__},
{"show_alert", goodies_show_alert, 1, goodies_show_alert__doc__},
{"show_question", goodies_show_question, 1, goodies_show_question__doc__},
{"show_input", goodies_show_input, 1, goodies_show_input__doc__},
{"show_colormap", goodies_show_colormap, 1, goodies_show_colormap__doc__},
{"show_choice", goodies_show_choice, 1, goodies_show_choice__doc__},
{"set_choices_shortcut", goodies_set_choices_shortcut, 1, goodies_set_choices_shortcut__doc__},
{"show_oneliner", goodies_show_oneliner, 1, goodies_show_oneliner__doc__},
{"hide_oneliner", goodies_hide_oneliner, 1, goodies_hide_oneliner__doc__},
{"set_oneliner_font", goodies_set_oneliner_font, 1, goodies_set_oneliner_font__doc__},
{"set_oneliner_color", goodies_set_oneliner_color, 1, goodies_set_oneliner_color__doc__},
{"use_fselector", goodies_use_fselector, 1, goodies_use_fselector__doc__},
{"show_fselector", goodies_show_fselector, 1, goodies_show_fselector__doc__},
{"set_fselector_placement", goodies_set_fselector_placement, 1, goodies_set_fselector_placement__doc__},
{"set_fselector_callback", goodies_set_fselector_callback, 1, goodies_set_fselector_callback__doc__},
{"get_directory", goodies_get_directory, 1, goodies_get_directory__doc__},
{"get_pattern", goodies_get_pattern, 1, goodies_get_pattern__doc__},
{"get_filename", goodies_get_filename, 1, goodies_get_filename__doc__},
{"refresh_fselector", goodies_refresh_fselector, 1, goodies_refresh_fselector__doc__},
{"add_fselector_appbutton", goodies_add_fselector_appbutton, 1, goodies_add_fselector_appbutton__doc__},
{"disable_fselector_cache", goodies_disable_fselector_cache, 1, goodies_disable_fselector_cache__doc__},
{"invalidate_fselector_cache", goodies_invalidate_fselector_cache, 1, goodies_invalidate_fselector_cache__doc__},
{"get_fselector_form", goodies_get_fselector_form, 1, goodies_get_fselector_form__doc__},
{"hide_fselector", goodies_hide_fselector, 1, goodies_hide_fselector__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef goodies_methods[] =
{
{"set_font", goodies_set_font, 1, goodies_set_font__doc__},
{"show_message", goodies_show_message, 1, goodies_show_message__doc__},
{"show_alert", goodies_show_alert, 1, goodies_show_alert__doc__},
{"show_question", goodies_show_question, 1, goodies_show_question__doc__},
{"show_input", goodies_show_input, 1, goodies_show_input__doc__},
{"show_colormap", goodies_show_colormap, 1, goodies_show_colormap__doc__},
{"show_choice", goodies_show_choice, 1, goodies_show_choice__doc__},
{"set_choices_shortcut", goodies_set_choices_shortcut, 1, goodies_set_choices_shortcut__doc__},
{"show_oneliner", goodies_show_oneliner, 1, goodies_show_oneliner__doc__},
{"hide_oneliner", goodies_hide_oneliner, 1, goodies_hide_oneliner__doc__},
{"set_oneliner_font", goodies_set_oneliner_font, 1, goodies_set_oneliner_font__doc__},
{"set_oneliner_color", goodies_set_oneliner_color, 1, goodies_set_oneliner_color__doc__},
{"use_fselector", goodies_use_fselector, 1, goodies_use_fselector__doc__},
{"show_fselector", goodies_show_fselector, 1, goodies_show_fselector__doc__},
{"set_fselector_placement", goodies_set_fselector_placement, 1, goodies_set_fselector_placement__doc__},
{"set_fselector_callback", goodies_set_fselector_callback, 1, goodies_set_fselector_callback__doc__},
{"get_directory", goodies_get_directory, 1, goodies_get_directory__doc__},
{"get_pattern", goodies_get_pattern, 1, goodies_get_pattern__doc__},
{"get_filename", goodies_get_filename, 1, goodies_get_filename__doc__},
{"refresh_fselector", goodies_refresh_fselector, 1, goodies_refresh_fselector__doc__},
{"add_fselector_appbutton", goodies_add_fselector_appbutton, 1, goodies_add_fselector_appbutton__doc__},
{"disable_fselector_cache", goodies_disable_fselector_cache, 1, goodies_disable_fselector_cache__doc__},
{"invalidate_fselector_cache", goodies_invalidate_fselector_cache, 1, goodies_invalidate_fselector_cache__doc__},
{"get_fselector_form", goodies_get_fselector_form, 1, goodies_get_fselector_form__doc__},
{"hide_fselector", goodies_hide_fselector, 1, goodies_hide_fselector__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initgoodies) */
static char goodies_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static char goodies_module_documentation[] =
""
;
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"goodies", /* m_name */
goodies_module_documentation, /* m_doc */
@ -483,25 +485,25 @@ static char goodies_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_goodies()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("goodies.error");
PyDict_SetItemString(d, "error", ErrorObject);
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("goodies.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module goodies");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module goodies");
}

View File

@ -28,199 +28,201 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char input_create__doc__[] =
"Creates an Input object"
;
"Creates an Input object"
;
static PyObject *
input_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_input (t,x,y,w,h,l);
return Py_BuildValue ("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_input (t,x,y,w,h,l);
return Py_BuildValue ("l",o);
}
static char input_set__doc__[] =
"Sets the contents of an input object"
;
"Sets the contents of an input object"
;
static PyObject *
input_set(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *s;
long o;
char *s;
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
fl_set_input((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
fl_set_input((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char input_set_color__doc__[] =
"Sets the color of the input object's text"
;
"Sets the color of the input object's text"
;
static PyObject *
input_set_color(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int c1,c2;
long o;
int c1,c2;
if (!PyArg_ParseTuple(args, "lii",&o,&c1,&c2))
return NULL;
fl_set_input_color ((FL_OBJECT *)o,c1,c2);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lii",&o,&c1,&c2))
return NULL;
fl_set_input_color ((FL_OBJECT *)o,c1,c2);
Py_INCREF(Py_None);
return Py_None;
}
static char input_get__doc__[] =
"Gets the input's value"
;
"Gets the input's value"
;
static PyObject *
input_get(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char r[2048];
long o;
char r[2048];
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
strcpy (r,fl_get_input((FL_OBJECT *)o));
return Py_BuildValue ("s",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
strcpy (r,fl_get_input((FL_OBJECT *)o));
return Py_BuildValue ("s",r);
}
static char input_set_return__doc__[] =
"Makes the input return always or when released"
;
"Makes the input return always or when released"
;
static PyObject *
input_set_return(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_input_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_input_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
static char input_set_scroll__doc__[] =
"Makes the input scrollable"
;
"Makes the input scrollable"
;
static PyObject *
input_set_scroll(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_input_scroll((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_input_scroll((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
static char input_set_cursorpos__doc__[] =
"Sets the input's cursor position"
;
"Sets the input's cursor position"
;
static PyObject *
input_set_cursorpos(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i,j;
long o;
int i,j;
if (!PyArg_ParseTuple(args, "lii",&o,&i,&j))
return NULL;
fl_set_input_cursorpos ((FL_OBJECT *)o,i,j);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lii",&o,&i,&j))
return NULL;
fl_set_input_cursorpos ((FL_OBJECT *)o,i,j);
Py_INCREF(Py_None);
return Py_None;
}
static char input_set_selected__doc__[] =
"Sets the input as selected"
;
"Sets the input as selected"
;
static PyObject *
input_set_selected(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_input_selected((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_input_selected((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
static char input_set_selected_range__doc__[] =
"Sets a range of the input object as selected"
;
"Sets a range of the input object as selected"
;
static PyObject *
input_set_selected_range(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i,j;
long o;
int i,j;
if (!PyArg_ParseTuple(args, "lii",&o,&i,&j))
return NULL;
fl_set_input_selected_range((FL_OBJECT *)o,i,j);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lii",&o,&i,&j))
return NULL;
fl_set_input_selected_range((FL_OBJECT *)o,i,j);
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef input_methods[] = {
{"create", input_create, 1, input_create__doc__},
{"set", input_set, 1, input_set__doc__},
{"set_color", input_set_color, 1, input_set_color__doc__},
{"get", input_get, 1, input_get__doc__},
{"set_return", input_set_return, 1, input_set_return__doc__},
{"set_scroll", input_set_scroll, 1, input_set_scroll__doc__},
{"set_cursorpos", input_set_cursorpos, 1, input_set_cursorpos__doc__},
{"set_selected", input_set_selected, 1, input_set_selected__doc__},
{"set_selected_range", input_set_selected_range, 1, input_set_selected_range__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef input_methods[] =
{
{"create", input_create, 1, input_create__doc__},
{"set", input_set, 1, input_set__doc__},
{"set_color", input_set_color, 1, input_set_color__doc__},
{"get", input_get, 1, input_get__doc__},
{"set_return", input_set_return, 1, input_set_return__doc__},
{"set_scroll", input_set_scroll, 1, input_set_scroll__doc__},
{"set_cursorpos", input_set_cursorpos, 1, input_set_cursorpos__doc__},
{"set_selected", input_set_selected, 1, input_set_selected__doc__},
{"set_selected_range", input_set_selected_range, 1, input_set_selected_range__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initinput) */
static char input_module_documentation[] =
""
;
static char input_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"input", /* m_name */
input_module_documentation, /* m_doc */
@ -230,25 +232,25 @@ static char input_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_input()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("input.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("input.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module input");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module input");
}

View File

@ -28,259 +28,261 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char menu_create__doc__[] =
"Creates a menu"
;
"Creates a menu"
;
static PyObject *
menu_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_menu(t,x,y,w,h,l);
return Py_BuildValue ("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_menu(t,x,y,w,h,l);
return Py_BuildValue ("l",o);
}
static char menu_clear__doc__[] =
"Removes all the menu's options"
;
"Removes all the menu's options"
;
static PyObject *
menu_clear(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_clear_menu ((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_clear_menu ((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char menu_set__doc__[] =
"Sets the menu contents"
;
"Sets the menu contents"
;
static PyObject *
menu_set(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *s;
long o;
char *s;
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
fl_set_menu ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
fl_set_menu ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char menu_addto__doc__[] =
"Adds an option to an existing menu"
;
"Adds an option to an existing menu"
;
static PyObject *
menu_addto(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *s;
long o;
char *s;
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
fl_addto_menu ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
fl_addto_menu ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char menu_replace_item__doc__[] =
"Replaces an item from the menu"
;
"Replaces an item from the menu"
;
static PyObject *
menu_replace_item(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
char *s;
long o;
int i;
char *s;
if (!PyArg_ParseTuple(args, "lis",&o,&i,&s))
return NULL;
fl_replace_menu_item((FL_OBJECT *)o,i,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lis",&o,&i,&s))
return NULL;
fl_replace_menu_item((FL_OBJECT *)o,i,s);
Py_INCREF(Py_None);
return Py_None;
}
static char menu_delete_item__doc__[] =
"Deletes an option from a menu"
;
"Deletes an option from a menu"
;
static PyObject *
menu_delete_item(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_delete_menu_item((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_delete_menu_item((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
static char menu_set_item_shortcut__doc__[] =
"Sets a menu item's shortcut"
;
"Sets a menu item's shortcut"
;
static PyObject *
menu_set_item_shortcut(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
char *s;
long o;
int i;
char *s;
if (!PyArg_ParseTuple(args, "lis",&o,&i,&s))
return NULL;
fl_set_menu_item_shortcut((FL_OBJECT *)o,i,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lis",&o,&i,&s))
return NULL;
fl_set_menu_item_shortcut((FL_OBJECT *)o,i,s);
Py_INCREF(Py_None);
return Py_None;
}
static char menu_set_item_mode__doc__[] =
"Sets the item mode (unselectable, etc)"
;
"Sets the item mode (unselectable, etc)"
;
static PyObject *
menu_set_item_mode(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
unsigned long m;
long o;
int i;
unsigned long m;
if (!PyArg_ParseTuple(args, "lil",&o,&i,&m))
return NULL;
fl_set_menu_item_mode((FL_OBJECT *)o,i,m);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lil",&o,&i,&m))
return NULL;
fl_set_menu_item_mode((FL_OBJECT *)o,i,m);
Py_INCREF(Py_None);
return Py_None;
}
static char menu_show_symbol__doc__[] =
"Shows a simbol menu with the label"
;
"Shows a simbol menu with the label"
;
static PyObject *
menu_show_symbol(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_show_menu_symbol ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_show_menu_symbol ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
static char menu_get__doc__[] =
"Gets the last selected item's number"
;
"Gets the last selected item's number"
;
static PyObject *
menu_get(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int r;
long o;
int r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_menu((FL_OBJECT *)o);
return Py_BuildValue ("i",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_menu((FL_OBJECT *)o);
return Py_BuildValue ("i",r);
}
static char menu_get_maxitems__doc__[] =
"returns the number of items in a menu"
;
"returns the number of items in a menu"
;
static PyObject *
menu_get_maxitems(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int r;
long o;
int r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_menu_maxitems((FL_OBJECT *)o);
return Py_BuildValue ("i",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_menu_maxitems((FL_OBJECT *)o);
return Py_BuildValue ("i",r);
}
static char menu_get_text__doc__[] =
"Returns the text of the menu last selected choice"
;
"Returns the text of the menu last selected choice"
;
static PyObject *
menu_get_text(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char s[2048];
long o;
char s[2048];
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
strcpy (s,fl_get_menu_text((FL_OBJECT *)o));
return Py_BuildValue ("s",s);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
strcpy (s,fl_get_menu_text((FL_OBJECT *)o));
return Py_BuildValue ("s",s);
}
/* List of methods defined in the module */
static struct PyMethodDef menu_methods[] = {
{"create", menu_create, 1, menu_create__doc__},
{"clear", menu_clear, 1, menu_clear__doc__},
{"set", menu_set, 1, menu_set__doc__},
{"addto", menu_addto, 1, menu_addto__doc__},
{"replace_item", menu_replace_item, 1, menu_replace_item__doc__},
{"delete_item", menu_delete_item, 1, menu_delete_item__doc__},
{"set_item_shortcut", menu_set_item_shortcut, 1, menu_set_item_shortcut__doc__},
{"set_item_mode", menu_set_item_mode, 1, menu_set_item_mode__doc__},
{"show_symbol", menu_show_symbol, 1, menu_show_symbol__doc__},
{"get", menu_get, 1, menu_get__doc__},
{"get_maxitems", menu_get_maxitems, 1, menu_get_maxitems__doc__},
{"get_text", menu_get_text, 1, menu_get_text__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef menu_methods[] =
{
{"create", menu_create, 1, menu_create__doc__},
{"clear", menu_clear, 1, menu_clear__doc__},
{"set", menu_set, 1, menu_set__doc__},
{"addto", menu_addto, 1, menu_addto__doc__},
{"replace_item", menu_replace_item, 1, menu_replace_item__doc__},
{"delete_item", menu_delete_item, 1, menu_delete_item__doc__},
{"set_item_shortcut", menu_set_item_shortcut, 1, menu_set_item_shortcut__doc__},
{"set_item_mode", menu_set_item_mode, 1, menu_set_item_mode__doc__},
{"show_symbol", menu_show_symbol, 1, menu_show_symbol__doc__},
{"get", menu_get, 1, menu_get__doc__},
{"get_maxitems", menu_get_maxitems, 1, menu_get_maxitems__doc__},
{"get_text", menu_get_text, 1, menu_get_text__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initmenu) */
static char menu_module_documentation[] =
""
;
static char menu_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"menu", /* m_name */
menu_module_documentation, /* m_doc */
@ -290,25 +292,25 @@ static char menu_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_menu()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("menu.error");
PyDict_SetItemString(d, "error", ErrorObject);
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("menu.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module menu");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module menu");
}

View File

@ -5,489 +5,491 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char obj_set_boxtype__doc__[] =
"Sets the objects Boxtype"
;
"Sets the objects Boxtype"
;
static PyObject *
obj_set_boxtype(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long object;
int type;
long object;
int type;
if (!PyArg_ParseTuple(args, "li",&object,&type))
return NULL;
fl_set_object_boxtype ((FL_OBJECT *)object,type);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&object,&type))
return NULL;
fl_set_object_boxtype ((FL_OBJECT *)object,type);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_bw__doc__[] =
"Sets the object's Border Width"
;
"Sets the object's Border Width"
;
static PyObject *
obj_set_bw(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long object;
int bw;
long object;
int bw;
if (!PyArg_ParseTuple(args, "li",&object,&bw))
return NULL;
fl_set_object_bw ((FL_OBJECT *)object,bw);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&object,&bw))
return NULL;
fl_set_object_bw ((FL_OBJECT *)object,bw);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_resize__doc__[] =
"Sets the objects \"Resize policy\""
;
"Sets the objects \"Resize policy\""
;
static PyObject *
obj_set_resize(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long object;
unsigned a;
long object;
unsigned a;
if (!PyArg_ParseTuple(args, "ll",&object,&a))
return NULL;
fl_set_object_resize ((FL_OBJECT *)object,a);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ll",&object,&a))
return NULL;
fl_set_object_resize ((FL_OBJECT *)object,a);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_gravity__doc__[] =
"Sets the objects gravity"
;
"Sets the objects gravity"
;
static PyObject *
obj_set_gravity(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long object;
unsigned a,b,c;
long object;
unsigned a,b,c;
if (!PyArg_ParseTuple(args, "lll",&object,&a,&b))
return NULL;
fl_set_object_gravity ((FL_OBJECT *)object,a,b);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lll",&object,&a,&b))
return NULL;
fl_set_object_gravity ((FL_OBJECT *)object,a,b);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_lsize__doc__[] =
"Sets the object's label size"
;
"Sets the object's label size"
;
static PyObject *
obj_set_lsize(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long object;
int size;
long object;
int size;
if (!PyArg_ParseTuple(args, "li",&object,&size))
return NULL;
fl_set_object_lsize((FL_OBJECT *)object,size);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&object,&size))
return NULL;
fl_set_object_lsize((FL_OBJECT *)object,size);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_lstyle__doc__[] =
"Sets the object's label style"
;
"Sets the object's label style"
;
static PyObject *
obj_set_lstyle(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long object;
int style;
long object;
int style;
if (!PyArg_ParseTuple(args, "li",&object,&style))
return NULL;
fl_set_object_lstyle((FL_OBJECT *)object,style);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&object,&style))
return NULL;
fl_set_object_lstyle((FL_OBJECT *)object,style);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_lcol__doc__[] =
"Sets the object's label color"
;
"Sets the object's label color"
;
static PyObject *
obj_set_lcol(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int c;
if (!PyArg_ParseTuple(args, "li",&o,&c))
return NULL;
fl_set_object_lcol((FL_OBJECT *)o,c);
Py_INCREF(Py_None);
return Py_None;
long o;
int c;
if (!PyArg_ParseTuple(args, "li",&o,&c))
return NULL;
fl_set_object_lcol((FL_OBJECT *)o,c);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_dragndrop__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
obj_set_dragndrop(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_focus__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
obj_set_focus(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char obj_redraw__doc__[] =
"Redraws the object"
;
"Redraws the object"
;
static PyObject *
obj_redraw(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_redraw_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_redraw_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_lalign__doc__[] =
"Sets the label alignment"
;
"Sets the label alignment"
;
static PyObject *
obj_set_lalign(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int a;
if (!PyArg_ParseTuple(args, "li",&o,&a))
return NULL;
fl_set_object_lalign((FL_OBJECT *)o,a);
Py_INCREF(Py_None);
return Py_None;
long o;
int a;
if (!PyArg_ParseTuple(args, "li",&o,&a))
return NULL;
fl_set_object_lalign((FL_OBJECT *)o,a);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_callback__doc__[] =
"XXXXXXNot implemented"
;
"XXXXXXNot implemented"
;
static PyObject *
obj_set_callback(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char obj_show__doc__[] =
"Shows the object"
;
"Shows the object"
;
static PyObject *
obj_show(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_show_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_show_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_hide__doc__[] =
"Hides the object"
;
"Hides the object"
;
static PyObject *
obj_hide(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_hide_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_hide_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_free__doc__[] =
"Releases the object's memory"
;
"Releases the object's memory"
;
static PyObject *
obj_free(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_free_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_free_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_delete__doc__[] =
"Deletes the object from it's form"
;
"Deletes the object from it's form"
;
static PyObject *
obj_delete(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_delete_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_delete_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_color__doc__[] =
"Sets the object color"
;
"Sets the object color"
;
static PyObject *
obj_set_color(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
float a,b;
if (!PyArg_ParseTuple(args, "lff",&o,&a,&b))
return NULL;
fl_set_object_color((FL_OBJECT *)o,(int)a,(int)b);
Py_INCREF(Py_None);
return Py_None;
long o;
float a,b;
if (!PyArg_ParseTuple(args, "lff",&o,&a,&b))
return NULL;
fl_set_object_color((FL_OBJECT *)o,(int)a,(int)b);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_label__doc__[] =
"Sets the label"
;
"Sets the label"
;
static PyObject *
obj_set_label(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *s;
long o;
char *s;
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
fl_set_object_label((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ls",&o,&s))
return NULL;
fl_set_object_label((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_activate__doc__[] =
"Activates the object"
;
"Activates the object"
;
static PyObject *
obj_activate(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_activate_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_activate_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_deactivate__doc__[] =
"Activates the object"
;
"Activates the object"
;
static PyObject *
obj_deactivate(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
long o;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_deactivate_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_deactivate_object((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_shortcut__doc__[] =
"Sets the shortcut to the object"
;
"Sets the shortcut to the object"
;
static PyObject *
obj_set_shortcut(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *s;
int i;
long o;
char *s;
int i;
if (!PyArg_ParseTuple(args, "lsi",&o,&s,&i))
return NULL;
fl_set_object_shortcut ((FL_OBJECT *)o,s,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "lsi",&o,&s,&i))
return NULL;
fl_set_object_shortcut ((FL_OBJECT *)o,s,i);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_dblbuffer__doc__[] =
"Sets the object as double buffered"
;
"Sets the object as double buffered"
;
static PyObject *
obj_set_dblbuffer(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int c;
long o;
int c;
if (!PyArg_ParseTuple(args, "li",&o,&c))
return NULL;
fl_set_object_dblbuffer((FL_OBJECT *)o,c);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&c))
return NULL;
fl_set_object_dblbuffer((FL_OBJECT *)o,c);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_set_geometry__doc__[] =
"Sets the object's geometry"
;
"Sets the object's geometry"
;
static PyObject *
obj_set_geometry(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int x,y,w,h;
long o;
int x,y,w,h;
if (!PyArg_ParseTuple(args, "liiii",&o,&x,&y,&w,&h))
return NULL;
fl_set_object_geometry ((FL_OBJECT *)o,x,y,w,h);
fl_redraw_object ((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "liiii",&o,&x,&y,&w,&h))
return NULL;
fl_set_object_geometry ((FL_OBJECT *)o,x,y,w,h);
fl_redraw_object ((FL_OBJECT *)o);
Py_INCREF(Py_None);
return Py_None;
}
static char obj_get_geometry__doc__[] =
"Sets the object's geometry"
;
"Sets the object's geometry"
;
static PyObject *
obj_get_geometry(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int x,y,w,h;
long o;
int x,y,w,h;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
x=((FL_OBJECT *)o)->x;
y=((FL_OBJECT *)o)->y;
w=((FL_OBJECT *)o)->w;
h=((FL_OBJECT *)o)->h;
fl_redraw_object ((FL_OBJECT *)o);
return Py_BuildValue ("iiii",x,y,w,h);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
x=((FL_OBJECT *)o)->x;
y=((FL_OBJECT *)o)->y;
w=((FL_OBJECT *)o)->w;
h=((FL_OBJECT *)o)->h;
fl_redraw_object ((FL_OBJECT *)o);
return Py_BuildValue ("iiii",x,y,w,h);
}
/* List of methods defined in the module */
static struct PyMethodDef obj_methods[] = {
{"set_boxtype", obj_set_boxtype, 1, obj_set_boxtype__doc__},
{"set_bw", obj_set_bw, 1, obj_set_bw__doc__},
{"set_resize", obj_set_resize, 1, obj_set_resize__doc__},
{"set_gravity", obj_set_gravity, 1, obj_set_gravity__doc__},
{"set_lsize", obj_set_lsize, 1, obj_set_lsize__doc__},
{"set_lstyle", obj_set_lstyle, 1, obj_set_lstyle__doc__},
{"set_lcol", obj_set_lcol, 1, obj_set_lcol__doc__},
{"set_dragndrop", obj_set_dragndrop, 1, obj_set_dragndrop__doc__},
{"set_focus", obj_set_focus, 1, obj_set_focus__doc__},
{"redraw", obj_redraw, 1, obj_redraw__doc__},
{"set_lalign", obj_set_lalign, 1, obj_set_lalign__doc__},
{"set_callback", obj_set_callback, 1, obj_set_callback__doc__},
{"show", obj_show, 1, obj_show__doc__},
{"hide", obj_hide, 1, obj_hide__doc__},
{"free", obj_free, 1, obj_free__doc__},
{"delete", obj_delete, 1, obj_delete__doc__},
{"set_color", obj_set_color, 1, obj_set_color__doc__},
{"set_label", obj_set_label, 1, obj_set_label__doc__},
{"activate", obj_activate, 1, obj_activate__doc__},
{"deactivate", obj_deactivate, 1, obj_deactivate__doc__},
{"set_shortcut", obj_set_shortcut, 1, obj_set_shortcut__doc__},
{"set_dblbuffer", obj_set_dblbuffer, 1, obj_set_dblbuffer__doc__},
{"set_geometry", obj_set_geometry, 1, obj_set_geometry__doc__},
{"get_geometry", obj_get_geometry, 1, obj_get_geometry__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef obj_methods[] =
{
{"set_boxtype", obj_set_boxtype, 1, obj_set_boxtype__doc__},
{"set_bw", obj_set_bw, 1, obj_set_bw__doc__},
{"set_resize", obj_set_resize, 1, obj_set_resize__doc__},
{"set_gravity", obj_set_gravity, 1, obj_set_gravity__doc__},
{"set_lsize", obj_set_lsize, 1, obj_set_lsize__doc__},
{"set_lstyle", obj_set_lstyle, 1, obj_set_lstyle__doc__},
{"set_lcol", obj_set_lcol, 1, obj_set_lcol__doc__},
{"set_dragndrop", obj_set_dragndrop, 1, obj_set_dragndrop__doc__},
{"set_focus", obj_set_focus, 1, obj_set_focus__doc__},
{"redraw", obj_redraw, 1, obj_redraw__doc__},
{"set_lalign", obj_set_lalign, 1, obj_set_lalign__doc__},
{"set_callback", obj_set_callback, 1, obj_set_callback__doc__},
{"show", obj_show, 1, obj_show__doc__},
{"hide", obj_hide, 1, obj_hide__doc__},
{"free", obj_free, 1, obj_free__doc__},
{"delete", obj_delete, 1, obj_delete__doc__},
{"set_color", obj_set_color, 1, obj_set_color__doc__},
{"set_label", obj_set_label, 1, obj_set_label__doc__},
{"activate", obj_activate, 1, obj_activate__doc__},
{"deactivate", obj_deactivate, 1, obj_deactivate__doc__},
{"set_shortcut", obj_set_shortcut, 1, obj_set_shortcut__doc__},
{"set_dblbuffer", obj_set_dblbuffer, 1, obj_set_dblbuffer__doc__},
{"set_geometry", obj_set_geometry, 1, obj_set_geometry__doc__},
{"get_geometry", obj_get_geometry, 1, obj_get_geometry__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initobjects) */
static char objects_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static char objects_module_documentation[] =
""
;
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"objects", /* m_name */
objects_module_documentation, /* m_doc */
@ -497,25 +499,25 @@ static char objects_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_objects()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("objects.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("objects.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module objects");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module objects");
}

View File

@ -28,83 +28,85 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char pmp_create__doc__[] =
"Creates a pixmap"
;
"Creates a pixmap"
;
static PyObject *
pmp_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
FL_OBJECT *o;
int t,x,y,w,h;
char *l;
FL_OBJECT *o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=fl_create_pixmap(t,x,y,w,h,l);
return Py_BuildValue ("l",(long)o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=fl_create_pixmap(t,x,y,w,h,l);
return Py_BuildValue ("l",(long)o);
}
static char pmp_set_data__doc__[] =
"Sets the pixmap's data"
;
"Sets the pixmap's data"
;
static PyObject *
pmp_set_data(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
long b;
long o;
long b;
if (!PyArg_ParseTuple(args, "ll",&o,&b))
return NULL;
fl_set_pixmap_data((FL_OBJECT *)o,(char **)b);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ll",&o,&b))
return NULL;
fl_set_pixmap_data((FL_OBJECT *)o,(char **)b);
Py_INCREF(Py_None);
return Py_None;
}
static char pmp_set_file__doc__[] =
"Loads a file into a pixmap"
;
"Loads a file into a pixmap"
;
static PyObject *
pmp_set_file(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
char *f;
long o;
char *f;
if (!PyArg_ParseTuple(args, "ls",&o,&f))
return NULL;
fl_set_pixmap_file((FL_OBJECT *)o,f);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ls",&o,&f))
return NULL;
fl_set_pixmap_file((FL_OBJECT *)o,f);
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef pmp_methods[] = {
{"create", pmp_create, 1, pmp_create__doc__},
{"set_data", pmp_set_data, 1, pmp_set_data__doc__},
{"set_file", pmp_set_file, 1, pmp_set_file__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef pmp_methods[] =
{
{"create", pmp_create, 1, pmp_create__doc__},
{"set_data", pmp_set_data, 1, pmp_set_data__doc__},
{"set_file", pmp_set_file, 1, pmp_set_file__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initpixmap) */
static char pixmaps_module_documentation[] =
""
;
static char pixmaps_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"pixmaps", /* m_name */
pixmaps_module_documentation, /* m_doc */
@ -114,25 +116,25 @@ static char pixmaps_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_pixmaps()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("pixmaps.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("pixmaps.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module pixmaps");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module pixmaps");
}

View File

@ -29,325 +29,327 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char pup_new__doc__[] =
""
;
""
;
static PyObject *
pup_new(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_def__doc__[] =
""
;
""
;
static PyObject *
pup_def(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_addto__doc__[] =
""
;
""
;
static PyObject *
pup_addto(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set__doc__[] =
""
;
""
;
static PyObject *
pup_set(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_free__doc__[] =
""
;
""
;
static PyObject *
pup_free(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_do__doc__[] =
""
;
""
;
static PyObject *
pup_do(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_shortcut__doc__[] =
""
;
""
;
static PyObject *
pup_set_shortcut(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_position__doc__[] =
""
;
""
;
static PyObject *
pup_set_position(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_selection__doc__[] =
""
;
""
;
static PyObject *
pup_set_selection(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_fontsize__doc__[] =
""
;
""
;
static PyObject *
pup_set_fontsize(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_fontstyle__doc__[] =
""
;
""
;
static PyObject *
pup_set_fontstyle(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_shadow__doc__[] =
""
;
""
;
static PyObject *
pup_set_shadow(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_softedge__doc__[] =
""
;
""
;
static PyObject *
pup_set_softedge(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_color__doc__[] =
""
;
""
;
static PyObject *
pup_set_color(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_title__doc__[] =
""
;
""
;
static PyObject *
pup_set_title(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_itemcb__doc__[] =
""
;
""
;
static PyObject *
pup_set_itemcb(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_menucb__doc__[] =
""
;
""
;
static PyObject *
pup_set_menucb(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
static char pup_set_submenu__doc__[] =
""
;
""
;
static PyObject *
pup_set_submenu(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef pup_methods[] = {
{"new", pup_new, 1, pup_new__doc__},
{"def", pup_def, 1, pup_def__doc__},
{"addto", pup_addto, 1, pup_addto__doc__},
{"set", pup_set, 1, pup_set__doc__},
{"free", pup_free, 1, pup_free__doc__},
{"do", pup_do, 1, pup_do__doc__},
{"set_shortcut", pup_set_shortcut, 1, pup_set_shortcut__doc__},
{"set_position", pup_set_position, 1, pup_set_position__doc__},
{"set_selection", pup_set_selection, 1, pup_set_selection__doc__},
{"set_fontsize", pup_set_fontsize, 1, pup_set_fontsize__doc__},
{"set_fontstyle", pup_set_fontstyle, 1, pup_set_fontstyle__doc__},
{"set_shadow", pup_set_shadow, 1, pup_set_shadow__doc__},
{"set_softedge", pup_set_softedge, 1, pup_set_softedge__doc__},
{"set_color", pup_set_color, 1, pup_set_color__doc__},
{"set_title", pup_set_title, 1, pup_set_title__doc__},
{"set_itemcb", pup_set_itemcb, 1, pup_set_itemcb__doc__},
{"set_menucb", pup_set_menucb, 1, pup_set_menucb__doc__},
{"set_submenu", pup_set_submenu, 1, pup_set_submenu__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef pup_methods[] =
{
{"new", pup_new, 1, pup_new__doc__},
{"def", pup_def, 1, pup_def__doc__},
{"addto", pup_addto, 1, pup_addto__doc__},
{"set", pup_set, 1, pup_set__doc__},
{"free", pup_free, 1, pup_free__doc__},
{"do", pup_do, 1, pup_do__doc__},
{"set_shortcut", pup_set_shortcut, 1, pup_set_shortcut__doc__},
{"set_position", pup_set_position, 1, pup_set_position__doc__},
{"set_selection", pup_set_selection, 1, pup_set_selection__doc__},
{"set_fontsize", pup_set_fontsize, 1, pup_set_fontsize__doc__},
{"set_fontstyle", pup_set_fontstyle, 1, pup_set_fontstyle__doc__},
{"set_shadow", pup_set_shadow, 1, pup_set_shadow__doc__},
{"set_softedge", pup_set_softedge, 1, pup_set_softedge__doc__},
{"set_color", pup_set_color, 1, pup_set_color__doc__},
{"set_title", pup_set_title, 1, pup_set_title__doc__},
{"set_itemcb", pup_set_itemcb, 1, pup_set_itemcb__doc__},
{"set_menucb", pup_set_menucb, 1, pup_set_menucb__doc__},
{"set_submenu", pup_set_submenu, 1, pup_set_submenu__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initpopups) */
static char popups_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static char popups_module_documentation[] =
""
;
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"popups", /* m_name */
popups_module_documentation, /* m_doc */
@ -357,25 +359,25 @@ static char popups_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_popups()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("popups.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("popups.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module popups");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module popups");
}

View File

@ -28,258 +28,260 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char posit_create__doc__[] =
"Creates a positioner"
;
"Creates a positioner"
;
static PyObject *
posit_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_positioner(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_positioner(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char posit_set_xvalue__doc__[] =
"Sets the x-value of the positioner"
;
"Sets the x-value of the positioner"
;
static PyObject *
posit_set_xvalue(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double v;
long o;
double v;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_positioner_xvalue((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_positioner_xvalue((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
}
static char posit_get_xvalue__doc__[] =
"Gets the x-value of the positioner"
;
"Gets the x-value of the positioner"
;
static PyObject *
posit_get_xvalue(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double r;
long o;
double r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_positioner_xvalue((FL_OBJECT *)o);
return Py_BuildValue ("d",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_positioner_xvalue((FL_OBJECT *)o);
return Py_BuildValue ("d",r);
}
static char posit_set_xbounds__doc__[] =
"Sets the positioner's x min/max"
;
"Sets the positioner's x min/max"
;
static PyObject *
posit_set_xbounds(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double min,max;
long o;
double min,max;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_positioner_xbounds ((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_positioner_xbounds ((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
}
static char posit_get_xbounds__doc__[] =
"Gets the positioner's x min/max"
;
"Gets the positioner's x min/max"
;
static PyObject *
posit_get_xbounds(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double min,max;
long o;
double min,max;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_positioner_xbounds ((FL_OBJECT *)o,&min,&max);
return Py_BuildValue ("dd",min,max);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_positioner_xbounds ((FL_OBJECT *)o,&min,&max);
return Py_BuildValue ("dd",min,max);
}
static char posit_set_yvalue__doc__[] =
"Sets the y-value of the positioner"
;
"Sets the y-value of the positioner"
;
static PyObject *
posit_set_yvalue(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double v;
long o;
double v;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_positioner_yvalue((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_positioner_yvalue((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
}
static char posit_get_yvalue__doc__[] =
"Gets the y-value of the positioner"
;
"Gets the y-value of the positioner"
;
static PyObject *
posit_get_yvalue(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double r;
long o;
double r;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_positioner_yvalue((FL_OBJECT *)o);
return Py_BuildValue ("d",r);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
r=fl_get_positioner_yvalue((FL_OBJECT *)o);
return Py_BuildValue ("d",r);
}
static char posit_set_ybounds__doc__[] =
"Sets the positioner's y min/max"
;
"Sets the positioner's y min/max"
;
static PyObject *
posit_set_ybounds(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double min,max;
long o;
double min,max;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_positioner_ybounds ((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_positioner_ybounds ((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
}
static char posit_get_ybounds__doc__[] =
"Gets the positioner's y min/max"
;
"Gets the positioner's y min/max"
;
static PyObject *
posit_get_ybounds(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double min,max;
long o;
double min,max;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_positioner_ybounds ((FL_OBJECT *)o,&min,&max);
return Py_BuildValue ("dd",min,max);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_positioner_ybounds ((FL_OBJECT *)o,&min,&max);
return Py_BuildValue ("dd",min,max);
}
static char posit_set_xstep__doc__[] =
"Sets the positioner x-step"
;
"Sets the positioner x-step"
;
static PyObject *
posit_set_xstep(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double s;
long o;
double s;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_positioner_xstep ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_positioner_xstep ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char posit_set_ystep__doc__[] =
"Sets the positioner y-step"
;
"Sets the positioner y-step"
;
static PyObject *
posit_set_ystep(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double s;
long o;
double s;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_positioner_ystep ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_positioner_ystep ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char posit_set_return__doc__[] =
"Makes the positioner return always or when released"
;
"Makes the positioner return always or when released"
;
static PyObject *
posit_set_return(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_positioner_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_positioner_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef posit_methods[] = {
{"create", posit_create, 1, posit_create__doc__},
{"set_xvalue", posit_set_xvalue, 1, posit_set_xvalue__doc__},
{"get_xvalue", posit_get_xvalue, 1, posit_get_xvalue__doc__},
{"set_xbounds", posit_set_xbounds, 1, posit_set_xbounds__doc__},
{"get_xbounds", posit_get_xbounds, 1, posit_get_xbounds__doc__},
{"set_yvalue", posit_set_yvalue, 1, posit_set_yvalue__doc__},
{"get_yvalue", posit_get_yvalue, 1, posit_get_yvalue__doc__},
{"set_ybounds", posit_set_ybounds, 1, posit_set_ybounds__doc__},
{"get_ybounds", posit_get_ybounds, 1, posit_get_ybounds__doc__},
{"set_xstep", posit_set_xstep, 1, posit_set_xstep__doc__},
{"set_ystep", posit_set_ystep, 1, posit_set_ystep__doc__},
{"set_return", posit_set_return, 1, posit_set_return__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef posit_methods[] =
{
{"create", posit_create, 1, posit_create__doc__},
{"set_xvalue", posit_set_xvalue, 1, posit_set_xvalue__doc__},
{"get_xvalue", posit_get_xvalue, 1, posit_get_xvalue__doc__},
{"set_xbounds", posit_set_xbounds, 1, posit_set_xbounds__doc__},
{"get_xbounds", posit_get_xbounds, 1, posit_get_xbounds__doc__},
{"set_yvalue", posit_set_yvalue, 1, posit_set_yvalue__doc__},
{"get_yvalue", posit_get_yvalue, 1, posit_get_yvalue__doc__},
{"set_ybounds", posit_set_ybounds, 1, posit_set_ybounds__doc__},
{"get_ybounds", posit_get_ybounds, 1, posit_get_ybounds__doc__},
{"set_xstep", posit_set_xstep, 1, posit_set_xstep__doc__},
{"set_ystep", posit_set_ystep, 1, posit_set_ystep__doc__},
{"set_return", posit_set_return, 1, posit_set_return__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initpositioner) */
static char positioner_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static char positioner_module_documentation[] =
""
;
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"positioner", /* m_name */
positioner_module_documentation, /* m_doc */
@ -289,25 +291,25 @@ static char positioner_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_positioner()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("positioner.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("positioner.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module positioner");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module positioner");
}

View File

@ -29,218 +29,220 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char slider_create__doc__[] =
""
;
""
;
static PyObject *
slider_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_slider(t,x,y,w,h,l);
return Py_BuildValue ("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_slider(t,x,y,w,h,l);
return Py_BuildValue ("l",o);
}
static char slider_create_val__doc__[] =
"Creates a val_slider"
;
"Creates a val_slider"
;
static PyObject *
slider_create_val(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_valslider(t,x,y,w,h,l);
return Py_BuildValue ("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_valslider(t,x,y,w,h,l);
return Py_BuildValue ("l",o);
}
static char slider_set_value__doc__[] =
"Sets the slider's value"
;
"Sets the slider's value"
;
static PyObject *
slider_set_value(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double v;
long o;
double v;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_slider_value ((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_slider_value ((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
}
static char slider_get_value__doc__[] =
"Gets the slider value"
;
"Gets the slider value"
;
static PyObject *
slider_get_value(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double v;
long o;
double v;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
v=fl_get_slider_value ((FL_OBJECT *)o);
return Py_BuildValue ("d",v);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
v=fl_get_slider_value ((FL_OBJECT *)o);
return Py_BuildValue ("d",v);
}
static char slider_set_bounds__doc__[] =
"Sets the slider's min/max"
;
"Sets the slider's min/max"
;
static PyObject *
slider_set_bounds(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double min,max;
long o;
double min,max;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_slider_bounds((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ldd",&o,&min,&max))
return NULL;
fl_set_slider_bounds((FL_OBJECT *)o,min,max);
Py_INCREF(Py_None);
return Py_None;
}
static char slider_get_bounds__doc__[] =
""
;
""
;
static PyObject *
slider_get_bounds(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double min,max;
long o;
double min,max;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_slider_bounds((FL_OBJECT *)o,&min,&max);
return Py_BuildValue ("dd",min,max);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
fl_get_slider_bounds((FL_OBJECT *)o,&min,&max);
return Py_BuildValue ("dd",min,max);
}
static char slider_set_return__doc__[] =
"Makes the slider return always or when released"
;
"Makes the slider return always or when released"
;
static PyObject *
slider_set_return(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_slider_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_slider_return ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
static char slider_set_step__doc__[] =
"Sets the slider's step"
;
"Sets the slider's step"
;
static PyObject *
slider_set_step(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double s;
long o;
double s;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_slider_step ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_slider_step ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char slider_set_size__doc__[] =
"Sets the slider's thingy size"
;
"Sets the slider's thingy size"
;
static PyObject *
slider_set_size(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double s;
long o;
double s;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_slider_size ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&s))
return NULL;
fl_set_slider_size ((FL_OBJECT *)o,s);
Py_INCREF(Py_None);
return Py_None;
}
static char slider_set_precision__doc__[] =
"Sets the valslider's precision"
;
"Sets the valslider's precision"
;
static PyObject *
slider_set_precision(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_slider_precision ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "li",&o,&i))
return NULL;
fl_set_slider_precision ((FL_OBJECT *)o,i);
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef slider_methods[] = {
{"create", slider_create, 1, slider_create__doc__},
{"create_val", slider_create_val, 1, slider_create_val__doc__},
{"set_value", slider_set_value, 1, slider_set_value__doc__},
{"get_value", slider_get_value, 1, slider_get_value__doc__},
{"set_bounds", slider_set_bounds, 1, slider_set_bounds__doc__},
{"get_bounds", slider_get_bounds, 1, slider_get_bounds__doc__},
{"set_return", slider_set_return, 1, slider_set_return__doc__},
{"set_step", slider_set_step, 1, slider_set_step__doc__},
{"set_size", slider_set_size, 1, slider_set_size__doc__},
{"set_precision", slider_set_precision, 1, slider_set_precision__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef slider_methods[] =
{
{"create", slider_create, 1, slider_create__doc__},
{"create_val", slider_create_val, 1, slider_create_val__doc__},
{"set_value", slider_set_value, 1, slider_set_value__doc__},
{"get_value", slider_get_value, 1, slider_get_value__doc__},
{"set_bounds", slider_set_bounds, 1, slider_set_bounds__doc__},
{"get_bounds", slider_get_bounds, 1, slider_get_bounds__doc__},
{"set_return", slider_set_return, 1, slider_set_return__doc__},
{"set_step", slider_set_step, 1, slider_set_step__doc__},
{"set_size", slider_set_size, 1, slider_set_size__doc__},
{"set_precision", slider_set_precision, 1, slider_set_precision__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initslider) */
static char slider_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static char slider_module_documentation[] =
""
;
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"slider", /* m_name */
slider_module_documentation, /* m_doc */
@ -250,25 +252,25 @@ static char slider_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_slider()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("slider.error");
PyDict_SetItemString(d, "error", ErrorObject);
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("slider.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module slider");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module slider");
}

View File

@ -29,37 +29,39 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char text_create__doc__[] =
""
;
""
;
static PyObject *
text_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef text_methods[] = {
{"create", text_create, 1, text_create__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef text_methods[] =
{
{"create", text_create, 1, text_create__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called inittext) */
static char text_module_documentation[] =
""
;
static char text_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"text", /* m_name */
text_module_documentation, /* m_doc */
@ -69,25 +71,25 @@ static char text_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_text()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("text.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("text.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module text");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module text");
}

View File

@ -28,79 +28,81 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char timer_create__doc__[] =
"Creates a timer"
;
"Creates a timer"
;
static PyObject *
fl_timer_create(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int t,x,y,w,h;
char *l;
long o;
int t,x,y,w,h;
char *l;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_timer(t,x,y,w,h,l);
return Py_BuildValue("l",o);
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL;
o=(long)fl_create_timer(t,x,y,w,h,l);
return Py_BuildValue("l",o);
}
static char timer_set__doc__[] =
"Set the time remaining in a timer object"
;
"Set the time remaining in a timer object"
;
static PyObject *
timer_set(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double v;
long o;
double v;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_timer((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
if (!PyArg_ParseTuple(args, "ld",&o,&v))
return NULL;
fl_set_timer((FL_OBJECT *)o,v);
Py_INCREF(Py_None);
return Py_None;
}
static char timer_get__doc__[] =
"Get the time remaining in a timer object"
;
"Get the time remaining in a timer object"
;
static PyObject *
timer_get(self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double v;
long o;
double v;
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
v=fl_get_timer((FL_OBJECT *)o);
return Py_BuildValue ("d",v);
if (!PyArg_ParseTuple(args, "l",&o))
return NULL;
v=fl_get_timer((FL_OBJECT *)o);
return Py_BuildValue ("d",v);
}
/* List of methods defined in the module */
static struct PyMethodDef timer_methods[] = {
{"create", fl_timer_create, 1, timer_create__doc__},
{"set", timer_set, 1, timer_set__doc__},
{"get", timer_get, 1, timer_get__doc__},
{NULL, NULL} /* sentinel */
static struct PyMethodDef timer_methods[] =
{
{"create", fl_timer_create, 1, timer_create__doc__},
{"set", timer_set, 1, timer_set__doc__},
{"get", timer_get, 1, timer_get__doc__},
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called inittimer) */
static char timer_module_documentation[] =
""
;
static char timer_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"timer", /* m_name */
timer_module_documentation, /* m_doc */
@ -110,25 +112,25 @@ static char timer_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_timer()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("timer.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("timer.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module timer");
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module timer");
}

View File

@ -25,20 +25,20 @@ Returns:
static PyObject *
pyxforms_init(self,args)
PyObject *self;
PyObject *args;
PyObject *self;
PyObject *args;
{
int sts;
char *appname;
char *appclass;
char *argv0;
int sts;
char *appname;
char *appclass;
char *argv0;
sts=1;
sts=1;
if (!PyArg_ParseTuple (args,"sss",&appname,&appclass,&argv0))
return NULL;
fl_initialize (&sts,&argv0,appname,0,0);
return Py_BuildValue("");
if (!PyArg_ParseTuple (args,"sss",&appname,&appclass,&argv0))
return NULL;
fl_initialize (&sts,&argv0,appname,0,0);
return Py_BuildValue("");
}
/**************************************************************
Function to let the library run the forms at will
@ -50,39 +50,41 @@ Returns: NULL on error
static PyObject *
pyxforms_do_forms(self,args)
PyObject *self;
PyObject *args;
PyObject *self;
PyObject *args;
{
FL_OBJECT *obj;
obj=fl_do_only_forms (); /* XXXXX not do_forms, until EVENTS get done */
return Py_BuildValue("l",(long)obj);
FL_OBJECT *obj;
obj=fl_do_only_forms (); /* XXXXX not do_forms, until EVENTS get done */
return Py_BuildValue("l",(long)obj);
}
static PyMethodDef xformsMethods [] ={
/* XForms specifics */
{"init",pyxforms_init,1},
{"do_forms",pyxforms_do_forms,1},
/* FENCE */
{NULL,NULL}
static PyMethodDef xformsMethods [] =
{
/* XForms specifics */
{"init",pyxforms_init,1},
{"do_forms",pyxforms_do_forms,1},
/* FENCE */
{NULL,NULL}
};
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 */
};
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 */
};
PyMODINIT_FUNC
PyInit_xforms()
{
PyModule_Create(&moduledef);
PyModule_Create(&moduledef);
}

View File

@ -28,396 +28,397 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
static char xyplot_set_return__doc__[] =
"Makes the XyPlot return always or when released"
;
"Makes the XyPlot return always or when released"
;
static PyObject *
xyplot_set_return (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i;
long o;
int i;
if (!PyArg_ParseTuple (args, "li", &o, &i))
return NULL;
fl_set_xyplot_return ((FL_OBJECT *) o, i);
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, "li", &o, &i))
return NULL;
fl_set_xyplot_return ((FL_OBJECT *) o, i);
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_xtics__doc__[] =
"Changes the number of xtics (major and minor) in a xyplot"
;
"Changes the number of xtics (major and minor) in a xyplot"
;
static PyObject *
xyplot_set_xtics (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i, j;
long o;
int i, j;
if (!PyArg_ParseTuple (args, "lii", &o, &i, &j))
return NULL;
fl_set_xyplot_xtics ((FL_OBJECT *) o, i, j);
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, "lii", &o, &i, &j))
return NULL;
fl_set_xyplot_xtics ((FL_OBJECT *) o, i, j);
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_ytics__doc__[] =
"Changes the number of ytics (major and minor) in a xyplot"
;
"Changes the number of ytics (major and minor) in a xyplot"
;
static PyObject *
xyplot_set_ytics (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
int i, j;
long o;
int i, j;
if (!PyArg_ParseTuple (args, "lii", &o, &i, &j))
return NULL;
fl_set_xyplot_ytics ((FL_OBJECT *) o, i, j);
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, "lii", &o, &i, &j))
return NULL;
fl_set_xyplot_ytics ((FL_OBJECT *) o, i, j);
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_xbounds__doc__[] =
"Sets the xmin and xmax in a xyplot"
;
"Sets the xmin and xmax in a xyplot"
;
static PyObject *
xyplot_set_xbounds (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double u, v;
long o;
double u, v;
if (!PyArg_ParseTuple (args, "ldd", &o, &u, &v))
return NULL;
fl_set_xyplot_xbounds ((FL_OBJECT *) o, u, v);
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, "ldd", &o, &u, &v))
return NULL;
fl_set_xyplot_xbounds ((FL_OBJECT *) o, u, v);
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_ybounds__doc__[] =
"Sets the xmin and xmax in a xyplot"
;
"Sets the xmin and xmax in a xyplot"
;
static PyObject *
xyplot_set_ybounds (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
double u, v;
long o;
double u, v;
if (!PyArg_ParseTuple (args, "ldd", &o, &u, &v))
return NULL;
fl_set_xyplot_ybounds ((FL_OBJECT *) o, u, v);
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, "ldd", &o, &u, &v))
return NULL;
fl_set_xyplot_ybounds ((FL_OBJECT *) o, u, v);
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_get__doc__[] =
"Gets the current value of the point that changed"
;
"Gets the current value of the point that changed"
;
static PyObject *
xyplot_get (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
long o;
float x, y;
int i;
long o;
float x, y;
int i;
if (!PyArg_ParseTuple (args, "l", &o))
return NULL;
fl_get_xyplot ((FL_OBJECT *) o, &x, &y, &i);
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, "l", &o))
return NULL;
fl_get_xyplot ((FL_OBJECT *) o, &x, &y, &i);
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_get_data__doc__[] =
""
;
""
;
static PyObject *
xyplot_get_data (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_create__doc__[] =
""
;
""
;
static PyObject *
xyplot_create (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_data__doc__[] =
""
;
""
;
static PyObject *
xyplot_set_data (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_file__doc__[] =
""
;
""
;
static PyObject *
xyplot_set_file (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_add_text__doc__[] =
""
;
""
;
static PyObject *
xyplot_add_text (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_delete_text__doc__[] =
""
;
""
;
static PyObject *
xyplot_delete_text (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_add_overlay__doc__[] =
""
;
""
;
static PyObject *
xyplot_add_overlay (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_overlay_type__doc__[] =
""
;
""
;
static PyObject *
xyplot_set_overlay_type (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_delete_overlay__doc__[] =
""
;
""
;
static PyObject *
xyplot_delete_overlay (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_interpolate__doc__[] =
""
;
""
;
static PyObject *
xyplot_set_interpolate (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_fontsize__doc__[] =
""
;
""
;
static PyObject *
xyplot_set_fontsize (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_fontstyle__doc__[] =
""
;
""
;
static PyObject *
xyplot_set_fontstyle (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_inspect__doc__[] =
""
;
""
;
static PyObject *
xyplot_set_inspect (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_set_symbolsize__doc__[] =
""
;
""
;
static PyObject *
xyplot_set_symbolsize (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
static char xyplot_replace_point__doc__[] =
""
;
""
;
static PyObject *
xyplot_replace_point (self, args)
PyObject *self; /* Not used */
PyObject *args;
PyObject *self; /* Not used */
PyObject *args;
{
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
if (!PyArg_ParseTuple (args, ""))
return NULL;
Py_INCREF (Py_None);
return Py_None;
}
/* List of methods defined in the module */
static struct PyMethodDef xyplot_methods[] =
{
{"set_return", xyplot_set_return, 1, xyplot_set_return__doc__},
{"set_xtics", xyplot_set_xtics, 1, xyplot_set_xtics__doc__},
{"set_ytics", xyplot_set_ytics, 1, xyplot_set_ytics__doc__},
{"set_xbounds", xyplot_set_xbounds, 1, xyplot_set_xbounds__doc__},
{"set_ybounds", xyplot_set_ybounds, 1, xyplot_set_ybounds__doc__},
{"get", xyplot_get, 1, xyplot_get__doc__},
{"get_data", xyplot_get_data, 1, xyplot_get_data__doc__},
{"create", xyplot_create, 1, xyplot_create__doc__},
{"set_data", xyplot_set_data, 1, xyplot_set_data__doc__},
{"set_file", xyplot_set_file, 1, xyplot_set_file__doc__},
{"add_text", xyplot_add_text, 1, xyplot_add_text__doc__},
{"delete_text", xyplot_delete_text, 1, xyplot_delete_text__doc__},
{"add_overlay", xyplot_add_overlay, 1, xyplot_add_overlay__doc__},
{"set_overlay_type", xyplot_set_overlay_type, 1, xyplot_set_overlay_type__doc__},
{"delete_overlay", xyplot_delete_overlay, 1, xyplot_delete_overlay__doc__},
{"set_interpolate", xyplot_set_interpolate, 1, xyplot_set_interpolate__doc__},
{"set_fontsize", xyplot_set_fontsize, 1, xyplot_set_fontsize__doc__},
{"set_fontstyle", xyplot_set_fontstyle, 1, xyplot_set_fontstyle__doc__},
{"set_inspect", xyplot_set_inspect, 1, xyplot_set_inspect__doc__},
{"set_symbolsize", xyplot_set_symbolsize, 1, xyplot_set_symbolsize__doc__},
{"replace_point", xyplot_replace_point, 1, xyplot_replace_point__doc__},
{"set_return", xyplot_set_return, 1, xyplot_set_return__doc__},
{"set_xtics", xyplot_set_xtics, 1, xyplot_set_xtics__doc__},
{"set_ytics", xyplot_set_ytics, 1, xyplot_set_ytics__doc__},
{"set_xbounds", xyplot_set_xbounds, 1, xyplot_set_xbounds__doc__},
{"set_ybounds", xyplot_set_ybounds, 1, xyplot_set_ybounds__doc__},
{"get", xyplot_get, 1, xyplot_get__doc__},
{"get_data", xyplot_get_data, 1, xyplot_get_data__doc__},
{"create", xyplot_create, 1, xyplot_create__doc__},
{"set_data", xyplot_set_data, 1, xyplot_set_data__doc__},
{"set_file", xyplot_set_file, 1, xyplot_set_file__doc__},
{"add_text", xyplot_add_text, 1, xyplot_add_text__doc__},
{"delete_text", xyplot_delete_text, 1, xyplot_delete_text__doc__},
{"add_overlay", xyplot_add_overlay, 1, xyplot_add_overlay__doc__},
{"set_overlay_type", xyplot_set_overlay_type, 1, xyplot_set_overlay_type__doc__},
{"delete_overlay", xyplot_delete_overlay, 1, xyplot_delete_overlay__doc__},
{"set_interpolate", xyplot_set_interpolate, 1, xyplot_set_interpolate__doc__},
{"set_fontsize", xyplot_set_fontsize, 1, xyplot_set_fontsize__doc__},
{"set_fontstyle", xyplot_set_fontstyle, 1, xyplot_set_fontstyle__doc__},
{"set_inspect", xyplot_set_inspect, 1, xyplot_set_inspect__doc__},
{"set_symbolsize", xyplot_set_symbolsize, 1, xyplot_set_symbolsize__doc__},
{"replace_point", xyplot_replace_point, 1, xyplot_replace_point__doc__},
{NULL, NULL} /* sentinel */
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initxyplot) */
static char xyplot_module_documentation[] =
""
;
static struct PyModuleDef moduledef = {
""
;
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
"xyplot", /* m_name */
xyplot_module_documentation, /* m_doc */
@ -427,24 +428,24 @@ static char xyplot_module_documentation[] =
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
};
PyMODINIT_FUNC
PyInit_xyplot ()
{
PyObject *m, *d;
PyObject *m, *d;
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Create the module and add the functions */
m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */
d = PyModule_GetDict (m);
ErrorObject = PyBytes_FromString ("xyplot.error");
PyDict_SetItemString (d, "error", ErrorObject);
/* Add some symbolic constants to the module */
d = PyModule_GetDict (m);
ErrorObject = PyBytes_FromString ("xyplot.error");
PyDict_SetItemString (d, "error", ErrorObject);
/* XXXX Add constants here */
/* XXXX Add constants here */
/* Check for errors */
if (PyErr_Occurred ())
Py_FatalError ("can't initialize module xyplot");
/* Check for errors */
if (PyErr_Occurred ())
Py_FatalError ("can't initialize module xyplot");
}