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__[] = static char bmp_create__doc__[] =
"Creates a bitmap" "Creates a bitmap"
; ;
static PyObject * static PyObject *
bmp_create(self, args) bmp_create(self, args)
PyObject *self; /* Not used */ PyObject *self; /* Not used */
PyObject *args; PyObject *args;
{ {
@ -41,17 +41,17 @@ PyObject *args;
FL_OBJECT *o; FL_OBJECT *o;
if (!PyArg_ParseTuple(args, "iiiiis", &t, &x, &y, &w, &h, &l)) 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); o = fl_create_bitmap(t, x, y, w, h, l);
return Py_BuildValue("l", (long) o); return Py_BuildValue("l", (long) o);
} }
static char bmp_set_data__doc__[] = static char bmp_set_data__doc__[] =
"Sets the bitmap's data" "Sets the bitmap's data"
; ;
static PyObject * static PyObject *
bmp_set_data(self, args) bmp_set_data(self, args)
PyObject *self; /* Not used */ PyObject *self; /* Not used */
PyObject *args; PyObject *args;
{ {
@ -60,7 +60,7 @@ PyObject *args;
unsigned char *b; unsigned char *b;
if (!PyArg_ParseTuple(args, "liis", &o, &w, &h, &b)) if (!PyArg_ParseTuple(args, "liis", &o, &w, &h, &b))
return NULL; return NULL;
fl_set_bitmap_data((FL_OBJECT *) o, w, h, b); fl_set_bitmap_data((FL_OBJECT *) o, w, h, b);
Py_INCREF(Py_None); Py_INCREF(Py_None);
return Py_None; return Py_None;
@ -69,11 +69,11 @@ PyObject *args;
static char bmp_set_file__doc__[] = static char bmp_set_file__doc__[] =
"Loads a file into a bitmap" "Loads a file into a bitmap"
; ;
static PyObject * static PyObject *
bmp_set_file(self, args) bmp_set_file(self, args)
PyObject *self; /* Not used */ PyObject *self; /* Not used */
PyObject *args; PyObject *args;
{ {
@ -81,7 +81,7 @@ PyObject *args;
char *f; char *f;
if (!PyArg_ParseTuple(args, "ls", &o, &f)) if (!PyArg_ParseTuple(args, "ls", &o, &f))
return NULL; return NULL;
fl_set_bitmap_file((FL_OBJECT *) o, f); fl_set_bitmap_file((FL_OBJECT *) o, f);
Py_INCREF(Py_None); Py_INCREF(Py_None);
return Py_None; return Py_None;
@ -103,20 +103,21 @@ static struct PyMethodDef bmp_methods[] =
/* Initialization function for the module (*must* be called initbitmap) */ /* Initialization function for the module (*must* be called initbitmap) */
static char bitmaps_module_documentation[] = static char bitmaps_module_documentation[] =
"" ""
; ;
static struct PyModuleDef moduledef = { static struct PyModuleDef moduledef =
PyModuleDef_HEAD_INIT, {
"bitmaps", PyModuleDef_HEAD_INIT,
bitmaps_module_documentation, "bitmaps",
-1, bitmaps_module_documentation,
bmp_methods, -1,
NULL, bmp_methods,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL,
}; };
PyMODINIT_FUNC PyMODINIT_FUNC
@ -136,5 +137,5 @@ PyInit_bitmaps()
/* Check for errors */ /* Check for errors */
if (PyErr_Occurred()) 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__[] = static char box_create__doc__[] =
"Creates a Box" "Creates a Box"
; ;
static PyObject * static PyObject *
box_create(self, args) box_create(self, args)
PyObject *self; /* Not used */ PyObject *self; /* Not used */
PyObject *args; PyObject *args;
{ {
int t,x,y,w,h; int t,x,y,w,h;
char *l; char *l;
long o; long o;
if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l)) if (!PyArg_ParseTuple(args, "iiiiis",&t,&x,&y,&w,&h,&l))
return NULL; return NULL;
o=(long)fl_create_box(t,x,y,w,h,l); o=(long)fl_create_box(t,x,y,w,h,l);
return Py_BuildValue("l",o); return Py_BuildValue("l",o);
} }
/* List of methods defined in the module */ /* List of methods defined in the module */
static struct PyMethodDef box_methods[] = { static struct PyMethodDef box_methods[] =
{"create", box_create, 1, box_create__doc__}, {
{NULL, NULL} /* sentinel */ {"create", box_create, 1, box_create__doc__},
{NULL, NULL} /* sentinel */
}; };
/* Initialization function for the module (*must* be called initbox) */ /* 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, PyModuleDef_HEAD_INIT,
"box", /* m_name */ "box", /* m_name */
box_module_documentation, /* m_doc */ box_module_documentation, /* m_doc */
@ -73,25 +75,25 @@ static struct PyModuleDef moduledef = {
NULL, /* m_traverse */ NULL, /* m_traverse */
NULL, /* m_clear */ NULL, /* m_clear */
NULL, /* m_free */ NULL, /* m_free */
}; };
PyMODINIT_FUNC PyMODINIT_FUNC
PyInit_box() PyInit_box()
{ {
PyObject *m, *d; PyObject *m, *d;
/* Create the module and add the functions */ /* Create the module and add the functions */
m = PyModule_Create(&moduledef); m = PyModule_Create(&moduledef);
/* Add some symbolic constants to the module */ /* Add some symbolic constants to the module */
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
ErrorObject = PyBytes_FromString("box.error"); ErrorObject = PyBytes_FromString("box.error");
PyDict_SetItemString(d, "error", ErrorObject); PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */ /* XXXX Add constants here */
/* Check for errors */ /* Check for errors */
if (PyErr_Occurred()) if (PyErr_Occurred())
Py_FatalError("can't initialize module box"); Py_FatalError("can't initialize module box");
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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