Mercurial > cpython-lru_cache-weakref
annotate Modules/flmodule.c @ 80661:94de77bd0b4b 2.7
Issue #16194: document imp.load_dynamic problems
when read several extension modules from the same binary object file.
| author | Andrew Svetlov <andrew.svetlov@gmail.com> |
|---|---|
| date | Thu, 29 Nov 2012 19:51:28 +0200 |
| parents | fd25030223b0 |
| children |
| rev | line source |
|---|---|
| 328 | 1 /* FL module -- interface to Mark Overmars' FORMS Library. */ |
| 2 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
3 /* This code works with FORMS version 2.2 (if you defined |
|
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
4 OBSOLETE_FORMS_CALLS), and 2.3. |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
5 FORMS can be ftp'ed from ftp.cs.ruu.nl (131.211.80.17), directory |
|
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
6 /pub/SGI/FORMS. */ |
| 469 | 7 |
|
947
260d96db112f
Modified to allow other threads to run in a multithreaded environment.
Jack Jansen <jack.jansen@cwi.nl>
parents:
926
diff
changeset
|
8 /* A half-hearted attempt has been made to allow programs using this |
|
260d96db112f
Modified to allow other threads to run in a multithreaded environment.
Jack Jansen <jack.jansen@cwi.nl>
parents:
926
diff
changeset
|
9 * module to exploit parallelism (through the threads module). No provisions |
|
260d96db112f
Modified to allow other threads to run in a multithreaded environment.
Jack Jansen <jack.jansen@cwi.nl>
parents:
926
diff
changeset
|
10 * have been made for multiple threads to use this module at the same time, |
|
260d96db112f
Modified to allow other threads to run in a multithreaded environment.
Jack Jansen <jack.jansen@cwi.nl>
parents:
926
diff
changeset
|
11 * though. So, a program with a forms thread and a non-forms thread will work |
|
260d96db112f
Modified to allow other threads to run in a multithreaded environment.
Jack Jansen <jack.jansen@cwi.nl>
parents:
926
diff
changeset
|
12 * fine but a program with two threads using forms will probably crash (unless |
|
260d96db112f
Modified to allow other threads to run in a multithreaded environment.
Jack Jansen <jack.jansen@cwi.nl>
parents:
926
diff
changeset
|
13 * the program takes precaution to ensure that only one thread can be in |
|
260d96db112f
Modified to allow other threads to run in a multithreaded environment.
Jack Jansen <jack.jansen@cwi.nl>
parents:
926
diff
changeset
|
14 * this module at any time). This will have to be fixed some time. |
|
13620
5b727ab37092
Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
Thomas Wouters <thomas@python.org>
parents:
13572
diff
changeset
|
15 * (A fix will probably also have to synchronize with the gl module). |
|
947
260d96db112f
Modified to allow other threads to run in a multithreaded environment.
Jack Jansen <jack.jansen@cwi.nl>
parents:
926
diff
changeset
|
16 */ |
|
260d96db112f
Modified to allow other threads to run in a multithreaded environment.
Jack Jansen <jack.jansen@cwi.nl>
parents:
926
diff
changeset
|
17 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
18 #include "Python.h" |
| 328 | 19 #include "forms.h" |
| 20 #include "structmember.h" | |
| 21 | |
| 22 /* Generic Forms Objects */ | |
| 23 | |
| 24 typedef struct { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
25 PyObject_HEAD |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
26 FL_OBJECT *ob_generic; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
27 PyMethodDef *ob_methods; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
28 PyObject *ob_callback; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
29 PyObject *ob_callback_arg; |
| 328 | 30 } genericobject; |
| 31 | |
|
24280
1598a1e473e2
staticforward bites the dust.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
22712
diff
changeset
|
32 static PyTypeObject GenericObjecttype; |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
33 |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
34 #define is_genericobject(g) ((g)->ob_type == &GenericObjecttype) |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
35 |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
36 /* List of all objects (XXX this should be a hash table on address...) */ |
| 328 | 37 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
38 static PyObject *allgenerics = NULL; |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
39 static int nfreeslots = 0; |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
40 |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
41 /* Add an object to the list of known objects */ |
| 328 | 42 |
| 43 static void | |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
44 knowgeneric(genericobject *g) |
| 328 | 45 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
46 int i, n; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
47 /* Create the list if it doesn't already exist */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
48 if (allgenerics == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
49 allgenerics = PyList_New(0); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
50 if (allgenerics == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
51 PyErr_Clear(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
52 return; /* Too bad, live without allgenerics... */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
53 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
54 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
55 if (nfreeslots > 0) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
56 /* Search the list for reusable slots (NULL items) */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
57 /* XXX This can be made faster! */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
58 n = PyList_Size(allgenerics); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
59 for (i = 0; i < n; i++) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
60 if (PyList_GetItem(allgenerics, i) == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
61 Py_INCREF(g); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
62 PyList_SetItem(allgenerics, i, (PyObject *)g); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
63 nfreeslots--; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
64 return; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
65 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
66 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
67 /* Strange... no free slots found... */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
68 nfreeslots = 0; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
69 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
70 /* No free entries, append new item to the end */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
71 PyList_Append(allgenerics, (PyObject *)g); |
| 328 | 72 } |
| 73 | |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
74 /* Find an object in the list of known objects */ |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
75 |
| 328 | 76 static genericobject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
77 findgeneric(FL_OBJECT *generic) |
| 328 | 78 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
79 int i, n; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
80 genericobject *g; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
81 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
82 if (allgenerics == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
83 return NULL; /* No objects known yet */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
84 n = PyList_Size(allgenerics); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
85 for (i = 0; i < n; i++) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
86 g = (genericobject *)PyList_GetItem(allgenerics, i); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
87 if (g != NULL && g->ob_generic == generic) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
88 return g; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
89 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
90 return NULL; /* Unknown object */ |
| 328 | 91 } |
| 92 | |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
93 /* Remove an object from the list of known objects */ |
|
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
94 |
|
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
95 static void |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
96 forgetgeneric(genericobject *g) |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
97 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
98 int i, n; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
99 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
100 Py_XDECREF(g->ob_callback); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
101 g->ob_callback = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
102 Py_XDECREF(g->ob_callback_arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
103 g->ob_callback_arg = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
104 if (allgenerics == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
105 return; /* No objects known yet */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
106 n = PyList_Size(allgenerics); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
107 for (i = 0; i < n; i++) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
108 if (g == (genericobject *)PyList_GetItem(allgenerics, i)) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
109 PyList_SetItem(allgenerics, i, (PyObject *)NULL); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
110 nfreeslots++; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
111 break; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
112 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
113 } |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
114 } |
|
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
115 |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
116 /* Called when a form is about to be freed -- |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
117 remove all the objects that we know about from it. */ |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
118 |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
119 static void |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
120 releaseobjects(FL_FORM *form) |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
121 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
122 int i, n; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
123 genericobject *g; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
124 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
125 if (allgenerics == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
126 return; /* No objects known yet */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
127 n = PyList_Size(allgenerics); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
128 for (i = 0; i < n; i++) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
129 g = (genericobject *)PyList_GetItem(allgenerics, i); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
130 if (g != NULL && g->ob_generic->form == form) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
131 fl_delete_object(g->ob_generic); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
132 /* The object is now unreachable for |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
133 do_forms and check_forms, so |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
134 delete it from the list of known objects */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
135 Py_XDECREF(g->ob_callback); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
136 g->ob_callback = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
137 Py_XDECREF(g->ob_callback_arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
138 g->ob_callback_arg = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
139 PyList_SetItem(allgenerics, i, (PyObject *)NULL); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
140 nfreeslots++; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
141 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
142 } |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
143 } |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
144 |
| 328 | 145 |
| 146 /* Methods of generic objects */ | |
| 147 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
148 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
149 generic_set_call_back(genericobject *g, PyObject *args) |
| 328 | 150 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
151 if (PyTuple_GET_SIZE(args) == 0) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
152 Py_XDECREF(g->ob_callback); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
153 Py_XDECREF(g->ob_callback_arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
154 g->ob_callback = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
155 g->ob_callback_arg = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
156 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
157 else { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
158 PyObject *a, *b; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
159 if (!PyArg_UnpackTuple(args, "set_call_back", 2, 2, &a, &b)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
160 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
161 Py_XDECREF(g->ob_callback); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
162 Py_XDECREF(g->ob_callback_arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
163 g->ob_callback = a; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
164 Py_INCREF(g->ob_callback); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
165 g->ob_callback_arg = b; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
166 Py_INCREF(g->ob_callback_arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
167 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
168 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
169 return Py_None; |
| 328 | 170 } |
| 171 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
172 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
173 generic_call(genericobject *g, void (*func)(FL_OBJECT *)) |
| 328 | 174 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
175 (*func)(g->ob_generic); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
176 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
177 return Py_None; |
| 328 | 178 } |
| 179 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
180 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
181 generic_delete_object(genericobject *g) |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
182 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
183 PyObject *res; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
184 res = generic_call(g, fl_delete_object); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
185 if (res != NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
186 forgetgeneric(g); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
187 return res; |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
188 } |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
189 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
190 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
191 generic_show_object(genericobject *g) |
| 328 | 192 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
193 return generic_call(g, fl_show_object); |
| 328 | 194 } |
| 195 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
196 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
197 generic_hide_object(genericobject *g) |
| 328 | 198 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
199 return generic_call(g, fl_hide_object); |
| 328 | 200 } |
| 201 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
202 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
203 generic_redraw_object(genericobject *g) |
| 328 | 204 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
205 return generic_call(g, fl_redraw_object); |
| 328 | 206 } |
| 207 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
208 #ifdef OBSOLETE_FORMS_CALLS |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
209 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
210 /* (un)freeze_object() are obsolete in FORMS 2.2 and unsupported |
|
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
211 in 2.3. Since there's no foolproof way to tell which version we're |
|
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
212 using, we omit them unconditionally. */ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
213 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
214 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
215 generic_freeze_object(genericobject *g) |
| 328 | 216 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
217 return generic_call(g, fl_freeze_object); |
| 328 | 218 } |
| 219 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
220 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
221 generic_unfreeze_object(genericobject *g) |
| 328 | 222 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
223 return generic_call(g, fl_unfreeze_object); |
| 328 | 224 } |
| 225 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
226 #endif /* OBSOLETE_FORMS_CALLS */ |
|
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
227 |
|
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
228 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
229 generic_activate_object(genericobject *g) |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
230 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
231 return generic_call(g, fl_activate_object); |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
232 } |
|
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
233 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
234 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
235 generic_deactivate_object(genericobject *g) |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
236 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
237 return generic_call(g, fl_deactivate_object); |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
238 } |
|
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
239 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
240 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
241 generic_set_object_shortcut(genericobject *g, PyObject *args) |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
242 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
243 char *str; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
244 if (!PyArg_ParseTuple(args, "s:set_object_shortcut", &str)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
245 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
246 fl_set_object_shortcut(g->ob_generic, str); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
247 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
248 return Py_None; |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
249 } |
|
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
250 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
251 static PyMethodDef generic_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
252 {"set_call_back", (PyCFunction)generic_set_call_back, METH_VARARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
253 {"delete_object", (PyCFunction)generic_delete_object, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
254 {"show_object", (PyCFunction)generic_show_object, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
255 {"hide_object", (PyCFunction)generic_hide_object, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
256 {"redraw_object", (PyCFunction)generic_redraw_object, METH_NOARGS}, |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
257 #ifdef OBSOLETE_FORMS_CALLS |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
258 {"freeze_object", (PyCFunction)generic_freeze_object, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
259 {"unfreeze_object", (PyCFunction)generic_unfreeze_object, METH_NOARGS}, |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
260 #endif |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
261 {"activate_object", (PyCFunction)generic_activate_object, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
262 {"deactivate_object", (PyCFunction)generic_deactivate_object, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
263 {"set_object_shortcut", (PyCFunction)generic_set_object_shortcut, METH_VARARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
264 {NULL, NULL} /* sentinel */ |
| 328 | 265 }; |
| 266 | |
| 267 static void | |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
268 generic_dealloc(genericobject *g) |
| 328 | 269 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
270 fl_free_object(g->ob_generic); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
271 Py_XDECREF(g->ob_callback); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
272 Py_XDECREF(g->ob_callback_arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
273 PyObject_Del(g); |
| 328 | 274 } |
| 275 | |
| 276 #define OFF(x) offsetof(FL_OBJECT, x) | |
| 277 | |
| 278 static struct memberlist generic_memberlist[] = { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
279 {"objclass", T_INT, OFF(objclass), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
280 {"type", T_INT, OFF(type), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
281 {"boxtype", T_INT, OFF(boxtype)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
282 {"x", T_FLOAT, OFF(x)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
283 {"y", T_FLOAT, OFF(y)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
284 {"w", T_FLOAT, OFF(w)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
285 {"h", T_FLOAT, OFF(h)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
286 {"col1", T_INT, OFF(col1)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
287 {"col2", T_INT, OFF(col2)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
288 {"align", T_INT, OFF(align)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
289 {"lcol", T_INT, OFF(lcol)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
290 {"lsize", T_FLOAT, OFF(lsize)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
291 /* "label" is treated specially! */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
292 {"lstyle", T_INT, OFF(lstyle)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
293 {"pushed", T_INT, OFF(pushed), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
294 {"focus", T_INT, OFF(focus), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
295 {"belowmouse", T_INT, OFF(belowmouse),RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
296 /* {"frozen", T_INT, OFF(frozen), RO}, */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
297 {"active", T_INT, OFF(active)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
298 {"input", T_INT, OFF(input)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
299 {"visible", T_INT, OFF(visible), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
300 {"radio", T_INT, OFF(radio)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
301 {"automatic", T_INT, OFF(automatic)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
302 {NULL} /* Sentinel */ |
| 328 | 303 }; |
| 304 | |
|
442
17f4cdf28959
Fixed duplicate use of OFF macro.
Guido van Rossum <guido@python.org>
parents:
437
diff
changeset
|
305 #undef OFF |
|
17f4cdf28959
Fixed duplicate use of OFF macro.
Guido van Rossum <guido@python.org>
parents:
437
diff
changeset
|
306 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
307 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
308 generic_getattr(genericobject *g, char *name) |
| 328 | 309 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
310 PyObject *meth; |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
311 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
312 /* XXX Ought to special-case name "__methods__" */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
313 if (g-> ob_methods) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
314 meth = Py_FindMethod(g->ob_methods, (PyObject *)g, name); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
315 if (meth != NULL) return meth; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
316 PyErr_Clear(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
317 } |
| 328 | 318 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
319 meth = Py_FindMethod(generic_methods, (PyObject *)g, name); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
320 if (meth != NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
321 return meth; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
322 PyErr_Clear(); |
| 328 | 323 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
324 /* "label" is an exception, getmember only works for char pointers, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
325 not for char arrays */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
326 if (strcmp(name, "label") == 0) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
327 return PyString_FromString(g->ob_generic->label); |
| 328 | 328 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
329 return PyMember_Get((char *)g->ob_generic, generic_memberlist, name); |
| 328 | 330 } |
| 331 | |
| 332 static int | |
|
13572
e417d9528fd6
Fixed up some ANSIfications.
Sjoerd Mullender <sjoerd@acm.org>
parents:
13514
diff
changeset
|
333 generic_setattr(genericobject *g, char *name, PyObject *v) |
| 328 | 334 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
335 int ret; |
| 328 | 336 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
337 if (v == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
338 PyErr_SetString(PyExc_TypeError, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
339 "can't delete forms object attributes"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
340 return -1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
341 } |
| 328 | 342 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
343 /* "label" is an exception: setmember doesn't set strings; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
344 and FORMS wants you to call a function to set the label */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
345 if (strcmp(name, "label") == 0) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
346 if (!PyString_Check(v)) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
347 PyErr_SetString(PyExc_TypeError, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
348 "label attr must be string"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
349 return -1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
350 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
351 fl_set_object_label(g->ob_generic, PyString_AsString(v)); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
352 return 0; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
353 } |
| 328 | 354 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
355 ret = PyMember_Set((char *)g->ob_generic, generic_memberlist, name, v); |
| 328 | 356 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
357 /* Rather than calling all the various set_object_* functions, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
358 we call fl_redraw_object here. This is sometimes redundant |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
359 but I doubt that's a big problem */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
360 if (ret == 0) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
361 fl_redraw_object(g->ob_generic); |
| 328 | 362 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
363 return ret; |
| 328 | 364 } |
| 365 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
366 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
367 generic_repr(genericobject *g) |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
368 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
369 char buf[100]; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
370 PyOS_snprintf(buf, sizeof(buf), "<FORMS_object at %p, objclass=%d>", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
371 g, g->ob_generic->objclass); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
372 return PyString_FromString(buf); |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
373 } |
|
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
374 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
375 static PyTypeObject GenericObjecttype = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
376 PyObject_HEAD_INIT(&PyType_Type) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
377 0, /*ob_size*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
378 "fl.FORMS_object", /*tp_name*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
379 sizeof(genericobject), /*tp_size*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
380 0, /*tp_itemsize*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
381 /* methods */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
382 (destructor)generic_dealloc, /*tp_dealloc*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
383 0, /*tp_print*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
384 (getattrfunc)generic_getattr, /*tp_getattr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
385 (setattrfunc)generic_setattr, /*tp_setattr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
386 0, /*tp_compare*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
387 (reprfunc)generic_repr, /*tp_repr*/ |
| 328 | 388 }; |
| 389 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
390 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
391 newgenericobject(FL_OBJECT *generic, PyMethodDef *methods) |
| 328 | 392 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
393 genericobject *g; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
394 g = PyObject_New(genericobject, &GenericObjecttype); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
395 if (g == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
396 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
397 g-> ob_generic = generic; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
398 g->ob_methods = methods; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
399 g->ob_callback = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
400 g->ob_callback_arg = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
401 knowgeneric(g); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
402 return (PyObject *)g; |
| 328 | 403 } |
| 404 | |
| 405 /**********************************************************************/ | |
| 406 /* Some common calling sequences */ | |
| 407 | |
| 408 /* void func (object, float) */ | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
409 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
410 call_forms_INf (void (*func)(FL_OBJECT *, float), FL_OBJECT *obj, PyObject *args) |
| 328 | 411 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
412 float parameter; |
| 328 | 413 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
414 if (!PyArg_Parse(args, "f", ¶meter)) return NULL; |
| 328 | 415 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
416 (*func) (obj, parameter); |
| 328 | 417 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
418 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
419 return Py_None; |
| 328 | 420 } |
| 421 | |
| 422 /* void func (object, float) */ | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
423 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
424 call_forms_INfINf (void (*func)(FL_OBJECT *, float, float), FL_OBJECT *obj, PyObject *args) |
| 328 | 425 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
426 float par1, par2; |
| 328 | 427 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
428 if (!PyArg_Parse(args, "(ff)", &par1, &par2)) return NULL; |
| 328 | 429 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
430 (*func) (obj, par1, par2); |
| 328 | 431 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
432 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
433 return Py_None; |
| 328 | 434 } |
| 435 | |
| 436 /* void func (object, int) */ | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
437 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
438 call_forms_INi (void (*func)(FL_OBJECT *, int), FL_OBJECT *obj, PyObject *args) |
| 328 | 439 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
440 int parameter; |
| 328 | 441 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
442 if (!PyArg_Parse(args, "i", ¶meter)) return NULL; |
| 328 | 443 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
444 (*func) (obj, parameter); |
| 328 | 445 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
446 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
447 return Py_None; |
| 328 | 448 } |
| 449 | |
| 469 | 450 /* void func (object, char) */ |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
451 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
452 call_forms_INc (void (*func)(FL_OBJECT *, int), FL_OBJECT *obj, PyObject *args) |
| 469 | 453 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
454 char *a; |
| 469 | 455 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
456 if (!PyArg_Parse(args, "s", &a)) return NULL; |
| 469 | 457 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
458 (*func) (obj, a[0]); |
| 469 | 459 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
460 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
461 return Py_None; |
| 469 | 462 } |
| 463 | |
| 328 | 464 /* void func (object, string) */ |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
465 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
466 call_forms_INstr (void (*func)(FL_OBJECT *, char *), FL_OBJECT *obj, PyObject *args) |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
467 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
468 char *a; |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
469 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
470 if (!PyArg_Parse(args, "s", &a)) return NULL; |
| 328 | 471 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
472 (*func) (obj, a); |
| 328 | 473 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
474 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
475 return Py_None; |
| 328 | 476 } |
| 477 | |
| 478 | |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
479 /* void func (object, int, string) */ |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
480 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
481 call_forms_INiINstr (void (*func)(FL_OBJECT *, int, char *), FL_OBJECT *obj, PyObject *args) |
| 328 | 482 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
483 char *b; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
484 int a; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
485 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
486 if (!PyArg_Parse(args, "(is)", &a, &b)) return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
487 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
488 (*func) (obj, a, b); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
489 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
490 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
491 return Py_None; |
| 328 | 492 } |
| 493 | |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
494 #ifdef UNUSED |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
495 /* void func (object, int, int) */ |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
496 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
497 call_forms_INiINi (void (*func)(FL_OBJECT *, int, int), FL_OBJECT *obj, PyObject *args) |
| 328 | 498 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
499 int par1, par2; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
500 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
501 if (!PyArg_Parse(args, "(ii)", &par1, &par2)) return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
502 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
503 (*func) (obj, par1, par2); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
504 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
505 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
506 return Py_None; |
| 328 | 507 } |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
508 #endif |
| 328 | 509 |
| 510 /* int func (object) */ | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
511 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
512 call_forms_Ri (int (*func)(FL_OBJECT *), FL_OBJECT *obj) |
| 328 | 513 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
514 int retval; |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
515 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
516 retval = (*func) (obj); |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
517 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
518 return PyInt_FromLong ((long) retval); |
| 328 | 519 } |
| 520 | |
| 521 /* char * func (object) */ | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
522 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
523 call_forms_Rstr (char * (*func)(FL_OBJECT *), FL_OBJECT *obj) |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
524 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
525 char *str; |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
526 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
527 str = (*func) (obj); |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
528 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
529 if (str == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
530 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
531 return Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
532 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
533 return PyString_FromString (str); |
| 328 | 534 } |
| 535 | |
| 536 /* int func (object) */ | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
537 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
538 call_forms_Rf (float (*func)(FL_OBJECT *), FL_OBJECT *obj) |
| 328 | 539 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
540 float retval; |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
541 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
542 retval = (*func) (obj); |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
543 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
544 return PyFloat_FromDouble (retval); |
| 328 | 545 } |
| 546 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
547 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
548 call_forms_OUTfOUTf (void (*func)(FL_OBJECT *, float *, float *), FL_OBJECT *obj) |
| 328 | 549 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
550 float f1, f2; |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
551 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
552 (*func) (obj, &f1, &f2); |
| 328 | 553 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
554 return Py_BuildValue("(ff)", f1, f2); |
| 328 | 555 } |
| 556 | |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
557 #ifdef UNUSED |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
558 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
559 call_forms_OUTf (void (*func)(FL_OBJECT *, float *), FL_OBJECT *obj) |
| 328 | 560 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
561 float f; |
| 328 | 562 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
563 (*func) (obj, &f); |
| 328 | 564 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
565 return PyFloat_FromDouble (f); |
| 328 | 566 } |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
567 #endif |
| 328 | 568 |
| 569 /**********************************************************************/ | |
| 570 /* Class : browser */ | |
| 571 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
572 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
573 set_browser_topline(genericobject *g, PyObject *args) |
| 328 | 574 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
575 return call_forms_INi (fl_set_browser_topline, g-> ob_generic, args); |
| 328 | 576 } |
| 577 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
578 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
579 clear_browser(genericobject *g) |
| 328 | 580 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
581 return generic_call (g, fl_clear_browser); |
| 328 | 582 } |
| 583 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
584 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
585 add_browser_line (genericobject *g, PyObject *args) |
| 328 | 586 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
587 return call_forms_INstr (fl_add_browser_line, g-> ob_generic, args); |
| 328 | 588 } |
| 589 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
590 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
591 addto_browser (genericobject *g, PyObject *args) |
| 328 | 592 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
593 return call_forms_INstr (fl_addto_browser, g-> ob_generic, args); |
| 328 | 594 } |
| 595 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
596 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
597 insert_browser_line (genericobject *g, PyObject *args) |
| 328 | 598 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
599 return call_forms_INiINstr (fl_insert_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
600 g-> ob_generic, args); |
| 328 | 601 } |
| 602 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
603 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
604 delete_browser_line (genericobject *g, PyObject *args) |
| 328 | 605 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
606 return call_forms_INi (fl_delete_browser_line, g-> ob_generic, args); |
| 328 | 607 } |
| 608 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
609 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
610 replace_browser_line (genericobject *g, PyObject *args) |
| 328 | 611 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
612 return call_forms_INiINstr (fl_replace_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
613 g-> ob_generic, args); |
| 328 | 614 } |
| 615 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
616 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
617 get_browser_line(genericobject *g, PyObject *args) |
| 328 | 618 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
619 int i; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
620 char *str; |
| 328 | 621 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
622 if (!PyArg_Parse(args, "i", &i)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
623 return NULL; |
| 328 | 624 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
625 str = fl_get_browser_line (g->ob_generic, i); |
| 328 | 626 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
627 if (str == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
628 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
629 return Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
630 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
631 return PyString_FromString (str); |
| 328 | 632 } |
| 633 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
634 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
635 load_browser (genericobject *g, PyObject *args) |
| 328 | 636 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
637 /* XXX strictly speaking this is wrong since fl_load_browser |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
638 XXX returns int, not void */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
639 return call_forms_INstr (fl_load_browser, g-> ob_generic, args); |
| 328 | 640 } |
| 641 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
642 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
643 get_browser_maxline(genericobject *g) |
| 328 | 644 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
645 return call_forms_Ri (fl_get_browser_maxline, g-> ob_generic); |
| 328 | 646 } |
| 647 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
648 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
649 select_browser_line (genericobject *g, PyObject *args) |
| 328 | 650 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
651 return call_forms_INi (fl_select_browser_line, g-> ob_generic, args); |
| 328 | 652 } |
| 653 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
654 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
655 deselect_browser_line (genericobject *g, PyObject *args) |
| 328 | 656 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
657 return call_forms_INi (fl_deselect_browser_line, g-> ob_generic, args); |
| 328 | 658 } |
| 659 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
660 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
661 deselect_browser (genericobject *g) |
| 328 | 662 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
663 return generic_call (g, fl_deselect_browser); |
| 328 | 664 } |
| 665 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
666 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
667 isselected_browser_line (genericobject *g, PyObject *args) |
| 328 | 668 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
669 int i, j; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
670 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
671 if (!PyArg_Parse(args, "i", &i)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
672 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
673 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
674 j = fl_isselected_browser_line (g->ob_generic, i); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
675 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
676 return PyInt_FromLong (j); |
| 328 | 677 } |
| 678 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
679 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
680 get_browser (genericobject *g) |
| 328 | 681 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
682 return call_forms_Ri (fl_get_browser, g-> ob_generic); |
| 328 | 683 } |
| 684 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
685 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
686 set_browser_fontsize (genericobject *g, PyObject *args) |
| 328 | 687 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
688 return call_forms_INf (fl_set_browser_fontsize, g-> ob_generic, args); |
| 328 | 689 } |
| 690 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
691 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
692 set_browser_fontstyle (genericobject *g, PyObject *args) |
| 328 | 693 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
694 return call_forms_INi (fl_set_browser_fontstyle, g-> ob_generic, args); |
| 328 | 695 } |
| 696 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
697 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
698 set_browser_specialkey (genericobject *g, PyObject *args) |
| 469 | 699 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
700 return call_forms_INc(fl_set_browser_specialkey, g-> ob_generic, args); |
| 469 | 701 } |
| 702 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
703 static PyMethodDef browser_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
704 {"set_browser_topline", (PyCFunction)set_browser_topline, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
705 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
706 {"clear_browser", (PyCFunction)clear_browser, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
707 METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
708 {"add_browser_line", (PyCFunction)add_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
709 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
710 {"addto_browser", (PyCFunction)addto_browser, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
711 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
712 {"insert_browser_line", (PyCFunction)insert_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
713 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
714 {"delete_browser_line", (PyCFunction)delete_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
715 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
716 {"replace_browser_line", (PyCFunction)replace_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
717 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
718 {"get_browser_line", (PyCFunction)get_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
719 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
720 {"load_browser", (PyCFunction)load_browser, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
721 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
722 {"get_browser_maxline", (PyCFunction)get_browser_maxline, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
723 METH_NOARGS,} |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
724 {"select_browser_line", (PyCFunction)select_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
725 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
726 {"deselect_browser_line", (PyCFunction)deselect_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
727 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
728 {"deselect_browser", (PyCFunction)deselect_browser, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
729 METH_NOARGS,} |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
730 {"isselected_browser_line", (PyCFunction)isselected_browser_line, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
731 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
732 {"get_browser", (PyCFunction)get_browser, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
733 METH_NOARGS,} |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
734 {"set_browser_fontsize", (PyCFunction)set_browser_fontsize, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
735 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
736 {"set_browser_fontstyle", (PyCFunction)set_browser_fontstyle, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
737 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
738 {"set_browser_specialkey", (PyCFunction)set_browser_specialkey, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
739 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
740 {NULL, NULL} /* sentinel */ |
| 328 | 741 }; |
| 742 | |
| 743 /* Class: button */ | |
| 744 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
745 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
746 set_button(genericobject *g, PyObject *args) |
| 328 | 747 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
748 return call_forms_INi (fl_set_button, g-> ob_generic, args); |
| 328 | 749 } |
| 750 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
751 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
752 get_button(genericobject *g) |
| 328 | 753 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
754 return call_forms_Ri (fl_get_button, g-> ob_generic); |
| 328 | 755 } |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
756 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
757 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
758 get_button_numb(genericobject *g) |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
759 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
760 return call_forms_Ri (fl_get_button_numb, g-> ob_generic); |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
761 } |
|
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
762 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
763 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
764 set_button_shortcut(genericobject *g, PyObject *args) |
| 469 | 765 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
766 return call_forms_INstr (fl_set_button_shortcut, g-> ob_generic, args); |
| 469 | 767 } |
| 328 | 768 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
769 static PyMethodDef button_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
770 {"set_button", (PyCFunction)set_button, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
771 {"get_button", (PyCFunction)get_button, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
772 {"get_button_numb", (PyCFunction)get_button_numb, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
773 {"set_button_shortcut", (PyCFunction)set_button_shortcut, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
774 {NULL, NULL} /* sentinel */ |
| 328 | 775 }; |
| 776 | |
| 777 /* Class: choice */ | |
| 778 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
779 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
780 set_choice(genericobject *g, PyObject *args) |
| 328 | 781 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
782 return call_forms_INi (fl_set_choice, g-> ob_generic, args); |
| 328 | 783 } |
| 784 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
785 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
786 get_choice(genericobject *g) |
| 328 | 787 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
788 return call_forms_Ri (fl_get_choice, g-> ob_generic); |
| 328 | 789 } |
| 790 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
791 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
792 clear_choice (genericobject *g) |
| 328 | 793 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
794 return generic_call (g, fl_clear_choice); |
| 328 | 795 } |
| 796 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
797 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
798 addto_choice (genericobject *g, PyObject *args) |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
799 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
800 return call_forms_INstr (fl_addto_choice, g-> ob_generic, args); |
| 328 | 801 } |
| 802 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
803 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
804 replace_choice (genericobject *g, PyObject *args) |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
805 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
806 return call_forms_INiINstr (fl_replace_choice, g-> ob_generic, args); |
| 328 | 807 } |
| 808 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
809 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
810 delete_choice (genericobject *g, PyObject *args) |
| 328 | 811 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
812 return call_forms_INi (fl_delete_choice, g-> ob_generic, args); |
| 328 | 813 } |
| 814 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
815 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
816 get_choice_text (genericobject *g) |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
817 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
818 return call_forms_Rstr (fl_get_choice_text, g-> ob_generic); |
| 328 | 819 } |
| 820 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
821 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
822 set_choice_fontsize (genericobject *g, PyObject *args) |
| 328 | 823 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
824 return call_forms_INf (fl_set_choice_fontsize, g-> ob_generic, args); |
| 328 | 825 } |
| 826 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
827 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
828 set_choice_fontstyle (genericobject *g, PyObject *args) |
| 328 | 829 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
830 return call_forms_INi (fl_set_choice_fontstyle, g-> ob_generic, args); |
| 328 | 831 } |
| 832 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
833 static PyMethodDef choice_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
834 {"set_choice", (PyCFunction)set_choice, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
835 {"get_choice", (PyCFunction)get_choice, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
836 {"clear_choice", (PyCFunction)clear_choice, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
837 {"addto_choice", (PyCFunction)addto_choice, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
838 {"replace_choice", (PyCFunction)replace_choice, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
839 {"delete_choice", (PyCFunction)delete_choice, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
840 {"get_choice_text", (PyCFunction)get_choice_text, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
841 {"set_choice_fontsize", (PyCFunction)set_choice_fontsize, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
842 {"set_choice_fontstyle",(PyCFunction)set_choice_fontstyle, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
843 {NULL, NULL} /* sentinel */ |
| 328 | 844 }; |
| 845 | |
| 846 /* Class : Clock */ | |
| 847 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
848 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
849 get_clock(genericobject *g) |
| 328 | 850 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
851 int i0, i1, i2; |
| 328 | 852 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
853 fl_get_clock (g->ob_generic, &i0, &i1, &i2); |
| 328 | 854 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
855 return Py_BuildValue("(iii)", i0, i1, i2); |
| 328 | 856 } |
| 857 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
858 static PyMethodDef clock_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
859 {"get_clock", (PyCFunction)get_clock, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
860 {NULL, NULL} /* sentinel */ |
| 328 | 861 }; |
| 862 | |
| 863 /* CLass : Counters */ | |
| 864 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
865 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
866 get_counter_value(genericobject *g) |
| 328 | 867 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
868 return call_forms_Rf (fl_get_counter_value, g-> ob_generic); |
| 328 | 869 } |
| 870 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
871 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
872 set_counter_value (genericobject *g, PyObject *args) |
| 328 | 873 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
874 return call_forms_INf (fl_set_counter_value, g-> ob_generic, args); |
| 328 | 875 } |
| 876 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
877 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
878 set_counter_precision (genericobject *g, PyObject *args) |
| 328 | 879 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
880 return call_forms_INi (fl_set_counter_precision, g-> ob_generic, args); |
| 328 | 881 } |
| 882 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
883 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
884 set_counter_bounds (genericobject *g, PyObject *args) |
| 328 | 885 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
886 return call_forms_INfINf (fl_set_counter_bounds, g-> ob_generic, args); |
| 328 | 887 } |
| 888 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
889 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
890 set_counter_step (genericobject *g, PyObject *args) |
| 328 | 891 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
892 return call_forms_INfINf (fl_set_counter_step, g-> ob_generic, args); |
| 328 | 893 } |
| 894 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
895 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
896 set_counter_return (genericobject *g, PyObject *args) |
| 328 | 897 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
898 return call_forms_INi (fl_set_counter_return, g-> ob_generic, args); |
| 328 | 899 } |
| 900 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
901 static PyMethodDef counter_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
902 {"set_counter_value", (PyCFunction)set_counter_value, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
903 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
904 {"get_counter_value", (PyCFunction)get_counter_value, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
905 METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
906 {"set_counter_bounds", (PyCFunction)set_counter_bounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
907 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
908 {"set_counter_step", (PyCFunction)set_counter_step, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
909 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
910 {"set_counter_precision", (PyCFunction)set_counter_precision, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
911 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
912 {"set_counter_return", (PyCFunction)set_counter_return, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
913 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
914 {NULL, NULL} /* sentinel */ |
| 328 | 915 }; |
| 916 | |
| 917 | |
| 918 /* Class: Dials */ | |
| 919 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
920 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
921 get_dial_value(genericobject *g) |
| 328 | 922 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
923 return call_forms_Rf (fl_get_dial_value, g-> ob_generic); |
| 328 | 924 } |
| 925 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
926 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
927 set_dial_value (genericobject *g, PyObject *args) |
| 328 | 928 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
929 return call_forms_INf (fl_set_dial_value, g-> ob_generic, args); |
| 328 | 930 } |
| 931 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
932 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
933 set_dial_bounds (genericobject *g, PyObject *args) |
| 328 | 934 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
935 return call_forms_INfINf (fl_set_dial_bounds, g-> ob_generic, args); |
| 328 | 936 } |
| 937 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
938 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
939 get_dial_bounds (genericobject *g) |
| 328 | 940 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
941 return call_forms_OUTfOUTf (fl_get_dial_bounds, g-> ob_generic); |
| 328 | 942 } |
| 943 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
944 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
945 set_dial_step (genericobject *g, PyObject *args) |
| 469 | 946 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
947 return call_forms_INf (fl_set_dial_step, g-> ob_generic, args); |
| 469 | 948 } |
| 949 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
950 static PyMethodDef dial_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
951 {"set_dial_value", (PyCFunction)set_dial_value, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
952 {"get_dial_value", (PyCFunction)get_dial_value, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
953 {"set_dial_bounds", (PyCFunction)set_dial_bounds, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
954 {"get_dial_bounds", (PyCFunction)get_dial_bounds, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
955 {"set_dial_step", (PyCFunction)set_dial_step, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
956 {NULL, NULL} /* sentinel */ |
| 328 | 957 }; |
| 958 | |
| 959 /* Class : Input */ | |
| 960 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
961 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
962 set_input (genericobject *g, PyObject *args) |
| 328 | 963 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
964 return call_forms_INstr (fl_set_input, g-> ob_generic, args); |
| 328 | 965 } |
| 966 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
967 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
968 get_input (genericobject *g) |
| 328 | 969 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
970 return call_forms_Rstr (fl_get_input, g-> ob_generic); |
| 328 | 971 } |
| 972 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
973 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
974 set_input_color (genericobject *g, PyObject *args) |
| 328 | 975 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
976 return call_forms_INfINf (fl_set_input_color, g-> ob_generic, args); |
| 328 | 977 } |
| 978 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
979 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
980 set_input_return (genericobject *g, PyObject *args) |
| 469 | 981 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
982 return call_forms_INi (fl_set_input_return, g-> ob_generic, args); |
| 469 | 983 } |
| 984 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
985 static PyMethodDef input_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
986 {"set_input", (PyCFunction)set_input, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
987 {"get_input", (PyCFunction)get_input, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
988 {"set_input_color", (PyCFunction)set_input_color, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
989 {"set_input_return", (PyCFunction)set_input_return, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
990 {NULL, NULL} /* sentinel */ |
| 328 | 991 }; |
| 992 | |
| 993 | |
| 994 /* Class : Menu */ | |
| 995 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
996 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
997 set_menu (genericobject *g, PyObject *args) |
| 328 | 998 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
999 return call_forms_INstr (fl_set_menu, g-> ob_generic, args); |
| 328 | 1000 } |
| 1001 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1002 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1003 get_menu (genericobject *g) |
| 328 | 1004 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1005 /* XXX strictly speaking this is wrong since fl_get_menu |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1006 XXX returns long, not int */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1007 return call_forms_Ri (fl_get_menu, g-> ob_generic); |
| 328 | 1008 } |
| 1009 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1010 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1011 get_menu_text (genericobject *g) |
|
1262
f820e6917f07
Changes to speed up local variables enormously, by avoiding dictionary
Guido van Rossum <guido@python.org>
parents:
1252
diff
changeset
|
1012 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1013 return call_forms_Rstr (fl_get_menu_text, g-> ob_generic); |
|
1262
f820e6917f07
Changes to speed up local variables enormously, by avoiding dictionary
Guido van Rossum <guido@python.org>
parents:
1252
diff
changeset
|
1014 } |
|
f820e6917f07
Changes to speed up local variables enormously, by avoiding dictionary
Guido van Rossum <guido@python.org>
parents:
1252
diff
changeset
|
1015 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1016 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1017 addto_menu (genericobject *g, PyObject *args) |
| 328 | 1018 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1019 return call_forms_INstr (fl_addto_menu, g-> ob_generic, args); |
| 328 | 1020 } |
| 1021 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1022 static PyMethodDef menu_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1023 {"set_menu", (PyCFunction)set_menu, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1024 {"get_menu", (PyCFunction)get_menu, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1025 {"get_menu_text", (PyCFunction)get_menu_text, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1026 {"addto_menu", (PyCFunction)addto_menu, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1027 {NULL, NULL} /* sentinel */ |
| 328 | 1028 }; |
| 1029 | |
| 1030 | |
| 1031 /* Class: Sliders */ | |
| 1032 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1033 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1034 get_slider_value(genericobject *g) |
| 328 | 1035 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1036 return call_forms_Rf (fl_get_slider_value, g-> ob_generic); |
| 328 | 1037 } |
| 1038 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1039 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1040 set_slider_value (genericobject *g, PyObject *args) |
| 328 | 1041 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1042 return call_forms_INf (fl_set_slider_value, g-> ob_generic, args); |
| 328 | 1043 } |
| 1044 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1045 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1046 set_slider_bounds (genericobject *g, PyObject *args) |
| 328 | 1047 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1048 return call_forms_INfINf (fl_set_slider_bounds, g-> ob_generic, args); |
| 328 | 1049 } |
| 1050 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1051 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1052 get_slider_bounds (genericobject *g) |
| 328 | 1053 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1054 return call_forms_OUTfOUTf(fl_get_slider_bounds, g-> ob_generic); |
| 328 | 1055 } |
| 1056 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1057 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1058 set_slider_return (genericobject *g, PyObject *args) |
| 328 | 1059 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1060 return call_forms_INf (fl_set_slider_return, g-> ob_generic, args); |
| 328 | 1061 } |
| 1062 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1063 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1064 set_slider_size (genericobject *g, PyObject *args) |
| 328 | 1065 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1066 return call_forms_INf (fl_set_slider_size, g-> ob_generic, args); |
| 328 | 1067 } |
| 1068 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1069 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1070 set_slider_precision (genericobject *g, PyObject *args) |
| 328 | 1071 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1072 return call_forms_INi (fl_set_slider_precision, g-> ob_generic, args); |
| 328 | 1073 } |
| 1074 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1075 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1076 set_slider_step (genericobject *g, PyObject *args) |
| 469 | 1077 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1078 return call_forms_INf (fl_set_slider_step, g-> ob_generic, args); |
| 469 | 1079 } |
| 1080 | |
| 1081 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1082 static PyMethodDef slider_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1083 {"set_slider_value", (PyCFunction)set_slider_value, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1084 {"get_slider_value", (PyCFunction)get_slider_value, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1085 {"set_slider_bounds", (PyCFunction)set_slider_bounds, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1086 {"get_slider_bounds", (PyCFunction)get_slider_bounds, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1087 {"set_slider_return", (PyCFunction)set_slider_return, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1088 {"set_slider_size", (PyCFunction)set_slider_size, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1089 {"set_slider_precision",(PyCFunction)set_slider_precision, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1090 {"set_slider_step", (PyCFunction)set_slider_step, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1091 {NULL, NULL} /* sentinel */ |
| 328 | 1092 }; |
| 1093 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1094 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1095 set_positioner_xvalue (genericobject *g, PyObject *args) |
| 328 | 1096 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1097 return call_forms_INf (fl_set_positioner_xvalue, g-> ob_generic, args); |
| 328 | 1098 } |
| 1099 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1100 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1101 set_positioner_xbounds (genericobject *g, PyObject *args) |
| 328 | 1102 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1103 return call_forms_INfINf (fl_set_positioner_xbounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1104 g-> ob_generic, args); |
| 328 | 1105 } |
| 1106 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1107 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1108 set_positioner_yvalue (genericobject *g, PyObject *args) |
| 328 | 1109 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1110 return call_forms_INf (fl_set_positioner_yvalue, g-> ob_generic, args); |
| 328 | 1111 } |
| 1112 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1113 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1114 set_positioner_ybounds (genericobject *g, PyObject *args) |
| 328 | 1115 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1116 return call_forms_INfINf (fl_set_positioner_ybounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1117 g-> ob_generic, args); |
| 328 | 1118 } |
| 1119 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1120 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1121 get_positioner_xvalue (genericobject *g) |
| 328 | 1122 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1123 return call_forms_Rf (fl_get_positioner_xvalue, g-> ob_generic); |
| 328 | 1124 } |
| 1125 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1126 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1127 get_positioner_xbounds (genericobject *g) |
| 328 | 1128 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1129 return call_forms_OUTfOUTf (fl_get_positioner_xbounds, g-> ob_generic); |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1130 } |
|
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1131 |
|
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1132 static PyObject * |
|
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1133 get_positioner_yvalue (genericobject *g) |
|
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1134 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1135 return call_forms_Rf (fl_get_positioner_yvalue, g-> ob_generic); |
| 328 | 1136 } |
| 1137 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1138 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1139 get_positioner_ybounds (genericobject *g) |
| 328 | 1140 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1141 return call_forms_OUTfOUTf (fl_get_positioner_ybounds, g-> ob_generic); |
| 328 | 1142 } |
| 1143 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1144 static PyMethodDef positioner_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1145 {"set_positioner_xvalue", (PyCFunction)set_positioner_xvalue, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1146 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1147 {"set_positioner_yvalue", (PyCFunction)set_positioner_yvalue, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1148 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1149 {"set_positioner_xbounds", (PyCFunction)set_positioner_xbounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1150 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1151 {"set_positioner_ybounds", (PyCFunction)set_positioner_ybounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1152 METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1153 {"get_positioner_xvalue", (PyCFunction)get_positioner_xvalue, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1154 METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1155 {"get_positioner_yvalue", (PyCFunction)get_positioner_yvalue, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1156 METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1157 {"get_positioner_xbounds", (PyCFunction)get_positioner_xbounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1158 METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1159 {"get_positioner_ybounds", (PyCFunction)get_positioner_ybounds, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1160 METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1161 {NULL, NULL} /* sentinel */ |
| 328 | 1162 }; |
| 1163 | |
| 1164 /* Class timer */ | |
| 1165 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1166 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1167 set_timer (genericobject *g, PyObject *args) |
| 328 | 1168 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1169 return call_forms_INf (fl_set_timer, g-> ob_generic, args); |
| 328 | 1170 } |
| 1171 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1172 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1173 get_timer (genericobject *g) |
| 328 | 1174 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1175 return call_forms_Rf (fl_get_timer, g-> ob_generic); |
| 328 | 1176 } |
| 1177 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1178 static PyMethodDef timer_methods[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1179 {"set_timer", (PyCFunction)set_timer, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1180 {"get_timer", (PyCFunction)get_timer, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1181 {NULL, NULL} /* sentinel */ |
| 328 | 1182 }; |
| 1183 | |
| 1184 /* Form objects */ | |
| 1185 | |
| 1186 typedef struct { | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1187 PyObject_HEAD |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1188 FL_FORM *ob_form; |
| 328 | 1189 } formobject; |
| 1190 | |
|
24280
1598a1e473e2
staticforward bites the dust.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
22712
diff
changeset
|
1191 static PyTypeObject Formtype; |
| 328 | 1192 |
| 1193 #define is_formobject(v) ((v)->ob_type == &Formtype) | |
| 1194 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1195 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1196 form_show_form(formobject *f, PyObject *args) |
| 328 | 1197 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1198 int place, border; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1199 char *name; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1200 if (!PyArg_Parse(args, "(iis)", &place, &border, &name)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1201 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1202 fl_show_form(f->ob_form, place, border, name); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1203 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1204 return Py_None; |
| 328 | 1205 } |
| 1206 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1207 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1208 form_call(void (*func)(FL_FORM *), FL_FORM *f) |
| 328 | 1209 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1210 (*func)(f); |
| 328 | 1211 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1212 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1213 return Py_None; |
| 328 | 1214 } |
| 1215 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1216 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1217 form_call_INiINi(void (*func)(FL_FORM *, int, int), FL_FORM *f, PyObject *args) |
| 328 | 1218 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1219 int a, b; |
| 328 | 1220 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1221 if (!PyArg_Parse(args, "(ii)", &a, &b)) return NULL; |
| 328 | 1222 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1223 (*func)(f, a, b); |
| 328 | 1224 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1225 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1226 return Py_None; |
| 328 | 1227 } |
| 1228 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1229 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1230 form_call_INfINf(void (*func)(FL_FORM *, float, float), FL_FORM *f, PyObject *args) |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1231 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1232 float a, b; |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1233 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1234 if (!PyArg_Parse(args, "(ff)", &a, &b)) return NULL; |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1235 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1236 (*func)(f, a, b); |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1237 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1238 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1239 return Py_None; |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1240 } |
|
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1241 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1242 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1243 form_hide_form(formobject *f) |
| 328 | 1244 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1245 return form_call(fl_hide_form, f-> ob_form); |
| 328 | 1246 } |
| 1247 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1248 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1249 form_redraw_form(formobject *f) |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
1250 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1251 return form_call(fl_redraw_form, f-> ob_form); |
| 328 | 1252 } |
| 1253 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1254 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1255 form_set_form_position(formobject *f, PyObject *args) |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1256 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1257 return form_call_INiINi(fl_set_form_position, f-> ob_form, args); |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1258 } |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1259 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1260 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1261 form_set_form_size(formobject *f, PyObject *args) |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1262 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1263 return form_call_INiINi(fl_set_form_size, f-> ob_form, args); |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1264 } |
|
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1265 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1266 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1267 form_scale_form(formobject *f, PyObject *args) |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1268 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1269 return form_call_INfINf(fl_scale_form, f-> ob_form, args); |
|
1319
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1270 } |
|
cd397266dc1c
* Makefile: added all: and default: targets.
Guido van Rossum <guido@python.org>
parents:
1313
diff
changeset
|
1271 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1272 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1273 generic_add_object(formobject *f, PyObject *args, FL_OBJECT *(*func)(int, float, float, float, float, char*), PyMethodDef *internal_methods) |
| 328 | 1274 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1275 int type; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1276 float x, y, w, h; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1277 char *name; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1278 FL_OBJECT *obj; |
| 328 | 1279 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1280 if (!PyArg_Parse(args,"(iffffs)", &type,&x,&y,&w,&h,&name)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1281 return NULL; |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
1282 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1283 fl_addto_form (f-> ob_form); |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
1284 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1285 obj = (*func) (type, x, y, w, h, name); |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1286 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1287 fl_end_form(); |
| 328 | 1288 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1289 if (obj == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1290 PyErr_NoMemory(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1291 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1292 } |
| 328 | 1293 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1294 return newgenericobject (obj, internal_methods); |
| 328 | 1295 } |
| 1296 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1297 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1298 form_add_button(formobject *f, PyObject *args) |
| 328 | 1299 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1300 return generic_add_object(f, args, fl_add_button, button_methods); |
| 328 | 1301 } |
| 1302 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1303 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1304 form_add_lightbutton(formobject *f, PyObject *args) |
| 328 | 1305 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1306 return generic_add_object(f, args, fl_add_lightbutton, button_methods); |
| 328 | 1307 } |
| 1308 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1309 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1310 form_add_roundbutton(formobject *f, PyObject *args) |
| 328 | 1311 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1312 return generic_add_object(f, args, fl_add_roundbutton, button_methods); |
| 328 | 1313 } |
| 1314 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1315 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1316 form_add_menu (formobject *f, PyObject *args) |
| 328 | 1317 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1318 return generic_add_object(f, args, fl_add_menu, menu_methods); |
| 328 | 1319 } |
| 1320 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1321 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1322 form_add_slider(formobject *f, PyObject *args) |
| 328 | 1323 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1324 return generic_add_object(f, args, fl_add_slider, slider_methods); |
| 328 | 1325 } |
| 1326 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1327 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1328 form_add_valslider(formobject *f, PyObject *args) |
| 328 | 1329 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1330 return generic_add_object(f, args, fl_add_valslider, slider_methods); |
| 328 | 1331 } |
| 1332 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1333 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1334 form_add_dial(formobject *f, PyObject *args) |
| 328 | 1335 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1336 return generic_add_object(f, args, fl_add_dial, dial_methods); |
| 328 | 1337 } |
| 1338 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1339 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1340 form_add_counter(formobject *f, PyObject *args) |
| 328 | 1341 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1342 return generic_add_object(f, args, fl_add_counter, counter_methods); |
| 328 | 1343 } |
| 1344 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1345 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1346 form_add_clock(formobject *f, PyObject *args) |
| 328 | 1347 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1348 return generic_add_object(f, args, fl_add_clock, clock_methods); |
| 328 | 1349 } |
| 1350 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1351 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1352 form_add_box(formobject *f, PyObject *args) |
| 328 | 1353 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1354 return generic_add_object(f, args, fl_add_box, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1355 (PyMethodDef *)NULL); |
| 328 | 1356 } |
| 1357 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1358 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1359 form_add_choice(formobject *f, PyObject *args) |
| 328 | 1360 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1361 return generic_add_object(f, args, fl_add_choice, choice_methods); |
| 328 | 1362 } |
| 1363 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1364 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1365 form_add_browser(formobject *f, PyObject *args) |
| 328 | 1366 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1367 return generic_add_object(f, args, fl_add_browser, browser_methods); |
| 328 | 1368 } |
| 1369 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1370 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1371 form_add_positioner(formobject *f, PyObject *args) |
| 328 | 1372 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1373 return generic_add_object(f, args, fl_add_positioner, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1374 positioner_methods); |
| 328 | 1375 } |
| 1376 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1377 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1378 form_add_input(formobject *f, PyObject *args) |
| 328 | 1379 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1380 return generic_add_object(f, args, fl_add_input, input_methods); |
| 328 | 1381 } |
| 1382 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1383 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1384 form_add_text(formobject *f, PyObject *args) |
| 328 | 1385 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1386 return generic_add_object(f, args, fl_add_text, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1387 (PyMethodDef *)NULL); |
| 328 | 1388 } |
| 1389 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1390 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1391 form_add_timer(formobject *f, PyObject *args) |
| 328 | 1392 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1393 return generic_add_object(f, args, fl_add_timer, timer_methods); |
| 328 | 1394 } |
| 1395 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1396 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1397 form_freeze_form(formobject *f) |
| 328 | 1398 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1399 return form_call(fl_freeze_form, f-> ob_form); |
| 328 | 1400 } |
| 1401 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1402 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1403 form_unfreeze_form(formobject *f) |
| 328 | 1404 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1405 return form_call(fl_unfreeze_form, f-> ob_form); |
| 328 | 1406 } |
| 1407 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1408 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1409 form_activate_form(formobject *f) |
| 328 | 1410 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1411 return form_call(fl_activate_form, f-> ob_form); |
| 328 | 1412 } |
| 1413 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1414 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1415 form_deactivate_form(formobject *f) |
| 328 | 1416 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1417 return form_call(fl_deactivate_form, f-> ob_form); |
| 328 | 1418 } |
| 1419 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1420 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1421 form_bgn_group(formobject *f, PyObject *args) |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1422 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1423 FL_OBJECT *obj; |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1424 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1425 fl_addto_form(f-> ob_form); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1426 obj = fl_bgn_group(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1427 fl_end_form(); |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1428 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1429 if (obj == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1430 PyErr_NoMemory(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1431 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1432 } |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1433 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1434 return newgenericobject (obj, (PyMethodDef *) NULL); |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1435 } |
|
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1436 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1437 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1438 form_end_group(formobject *f, PyObject *args) |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1439 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1440 fl_addto_form(f-> ob_form); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1441 fl_end_group(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1442 fl_end_form(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1443 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1444 return Py_None; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1445 } |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1446 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1447 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1448 forms_find_first_or_last(FL_OBJECT *(*func)(FL_FORM *, int, float, float), formobject *f, PyObject *args) |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1449 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1450 int type; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1451 float mx, my; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1452 FL_OBJECT *generic; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1453 genericobject *g; |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1454 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1455 if (!PyArg_Parse(args, "(iff)", &type, &mx, &my)) return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1456 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1457 generic = (*func) (f-> ob_form, type, mx, my); |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1458 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1459 if (generic == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1460 { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1461 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1462 return Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1463 } |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1464 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1465 g = findgeneric(generic); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1466 if (g == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1467 PyErr_SetString(PyExc_RuntimeError, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1468 "forms_find_{first|last} returns unknown object"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1469 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1470 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1471 Py_INCREF(g); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1472 return (PyObject *) g; |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1473 } |
|
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1474 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1475 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1476 form_find_first(formobject *f, PyObject *args) |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1477 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1478 return forms_find_first_or_last(fl_find_first, f, args); |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1479 } |
|
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1480 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1481 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1482 form_find_last(formobject *f, PyObject *args) |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1483 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1484 return forms_find_first_or_last(fl_find_last, f, args); |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1485 } |
|
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1486 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1487 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1488 form_set_object_focus(formobject *f, PyObject *args) |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1489 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1490 genericobject *g; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1491 if (args == NULL || !is_genericobject(args)) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1492 PyErr_BadArgument(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1493 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1494 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1495 g = (genericobject *)args; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1496 fl_set_object_focus(f->ob_form, g->ob_generic); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1497 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1498 return Py_None; |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1499 } |
|
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1500 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1501 static PyMethodDef form_methods[] = { |
| 328 | 1502 /* adm */ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1503 {"show_form", (PyCFunction)form_show_form, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1504 {"hide_form", (PyCFunction)form_hide_form, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1505 {"redraw_form", (PyCFunction)form_redraw_form, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1506 {"set_form_position", (PyCFunction)form_set_form_position, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1507 {"set_form_size", (PyCFunction)form_set_form_size, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1508 {"scale_form", (PyCFunction)form_scale_form, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1509 {"freeze_form", (PyCFunction)form_freeze_form, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1510 {"unfreeze_form", (PyCFunction)form_unfreeze_form, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1511 {"activate_form", (PyCFunction)form_activate_form, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1512 {"deactivate_form", (PyCFunction)form_deactivate_form, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1513 {"bgn_group", (PyCFunction)form_bgn_group, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1514 {"end_group", (PyCFunction)form_end_group, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1515 {"find_first", (PyCFunction)form_find_first, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1516 {"find_last", (PyCFunction)form_find_last, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1517 {"set_object_focus", (PyCFunction)form_set_object_focus, METH_OLDARGS}, |
| 328 | 1518 |
| 1519 /* basic objects */ | |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1520 {"add_button", (PyCFunction)form_add_button, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1521 /* {"add_bitmap", (method)form_add_bitmap, METH_OLDARGS}, */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1522 {"add_lightbutton", (PyCFunction)form_add_lightbutton, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1523 {"add_roundbutton", (PyCFunction)form_add_roundbutton, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1524 {"add_menu", (PyCFunction)form_add_menu, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1525 {"add_slider", (PyCFunction)form_add_slider, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1526 {"add_positioner", (PyCFunction)form_add_positioner, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1527 {"add_valslider", (PyCFunction)form_add_valslider, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1528 {"add_dial", (PyCFunction)form_add_dial, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1529 {"add_counter", (PyCFunction)form_add_counter, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1530 {"add_box", (PyCFunction)form_add_box, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1531 {"add_clock", (PyCFunction)form_add_clock, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1532 {"add_choice", (PyCFunction)form_add_choice, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1533 {"add_browser", (PyCFunction)form_add_browser, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1534 {"add_input", (PyCFunction)form_add_input, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1535 {"add_timer", (PyCFunction)form_add_timer, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1536 {"add_text", (PyCFunction)form_add_text, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1537 {NULL, NULL} /* sentinel */ |
| 328 | 1538 }; |
| 1539 | |
| 1540 static void | |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1541 form_dealloc(formobject *f) |
| 328 | 1542 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1543 releaseobjects(f->ob_form); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1544 if (f->ob_form->visible) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1545 fl_hide_form(f->ob_form); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1546 fl_free_form(f->ob_form); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1547 PyObject_Del(f); |
| 328 | 1548 } |
| 1549 | |
|
442
17f4cdf28959
Fixed duplicate use of OFF macro.
Guido van Rossum <guido@python.org>
parents:
437
diff
changeset
|
1550 #define OFF(x) offsetof(FL_FORM, x) |
|
17f4cdf28959
Fixed duplicate use of OFF macro.
Guido van Rossum <guido@python.org>
parents:
437
diff
changeset
|
1551 |
|
437
402a59ad2493
Finally added form attributes.
Guido van Rossum <guido@python.org>
parents:
392
diff
changeset
|
1552 static struct memberlist form_memberlist[] = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1553 {"window", T_LONG, OFF(window), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1554 {"w", T_FLOAT, OFF(w)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1555 {"h", T_FLOAT, OFF(h)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1556 {"x", T_FLOAT, OFF(x), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1557 {"y", T_FLOAT, OFF(y), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1558 {"deactivated", T_INT, OFF(deactivated)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1559 {"visible", T_INT, OFF(visible), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1560 {"frozen", T_INT, OFF(frozen), RO}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1561 {"doublebuf", T_INT, OFF(doublebuf)}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1562 {NULL} /* Sentinel */ |
|
437
402a59ad2493
Finally added form attributes.
Guido van Rossum <guido@python.org>
parents:
392
diff
changeset
|
1563 }; |
|
402a59ad2493
Finally added form attributes.
Guido van Rossum <guido@python.org>
parents:
392
diff
changeset
|
1564 |
|
442
17f4cdf28959
Fixed duplicate use of OFF macro.
Guido van Rossum <guido@python.org>
parents:
437
diff
changeset
|
1565 #undef OFF |
|
17f4cdf28959
Fixed duplicate use of OFF macro.
Guido van Rossum <guido@python.org>
parents:
437
diff
changeset
|
1566 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1567 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1568 form_getattr(formobject *f, char *name) |
| 328 | 1569 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1570 PyObject *meth; |
|
437
402a59ad2493
Finally added form attributes.
Guido van Rossum <guido@python.org>
parents:
392
diff
changeset
|
1571 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1572 meth = Py_FindMethod(form_methods, (PyObject *)f, name); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1573 if (meth != NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1574 return meth; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1575 PyErr_Clear(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1576 return PyMember_Get((char *)f->ob_form, form_memberlist, name); |
|
437
402a59ad2493
Finally added form attributes.
Guido van Rossum <guido@python.org>
parents:
392
diff
changeset
|
1577 } |
|
402a59ad2493
Finally added form attributes.
Guido van Rossum <guido@python.org>
parents:
392
diff
changeset
|
1578 |
|
402a59ad2493
Finally added form attributes.
Guido van Rossum <guido@python.org>
parents:
392
diff
changeset
|
1579 static int |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1580 form_setattr(formobject *f, char *name, PyObject *v) |
|
437
402a59ad2493
Finally added form attributes.
Guido van Rossum <guido@python.org>
parents:
392
diff
changeset
|
1581 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1582 if (v == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1583 PyErr_SetString(PyExc_TypeError, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1584 "can't delete form attributes"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1585 return -1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1586 } |
|
437
402a59ad2493
Finally added form attributes.
Guido van Rossum <guido@python.org>
parents:
392
diff
changeset
|
1587 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1588 return PyMember_Set((char *)f->ob_form, form_memberlist, name, v); |
| 328 | 1589 } |
| 1590 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1591 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1592 form_repr(formobject *f) |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
1593 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1594 char buf[100]; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1595 PyOS_snprintf(buf, sizeof(buf), "<FORMS_form at %p, window=%ld>", |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1596 f, f->ob_form->window); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1597 return PyString_FromString(buf); |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
1598 } |
|
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
1599 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1600 static PyTypeObject Formtype = { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1601 PyObject_HEAD_INIT(&PyType_Type) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1602 0, /*ob_size*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1603 "fl.FORMS_form", /*tp_name*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1604 sizeof(formobject), /*tp_size*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1605 0, /*tp_itemsize*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1606 /* methods */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1607 (destructor)form_dealloc, /*tp_dealloc*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1608 0, /*tp_print*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1609 (getattrfunc)form_getattr, /*tp_getattr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1610 (setattrfunc)form_setattr, /*tp_setattr*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1611 0, /*tp_compare*/ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1612 (reprfunc)form_repr, /*tp_repr*/ |
| 328 | 1613 }; |
| 1614 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1615 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1616 newformobject(FL_FORM *form) |
| 328 | 1617 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1618 formobject *f; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1619 f = PyObject_New(formobject, &Formtype); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1620 if (f == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1621 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1622 f->ob_form = form; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1623 return (PyObject *)f; |
| 328 | 1624 } |
| 1625 | |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1626 |
| 328 | 1627 /* The "fl" module */ |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
1628 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1629 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1630 forms_make_form(PyObject *dummy, PyObject *args) |
| 328 | 1631 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1632 int type; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1633 float w, h; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1634 FL_FORM *form; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1635 if (!PyArg_Parse(args, "(iff)", &type, &w, &h)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1636 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1637 form = fl_bgn_form(type, w, h); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1638 if (form == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1639 /* XXX Actually, cannot happen! */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1640 PyErr_NoMemory(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1641 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1642 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1643 fl_end_form(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1644 return newformobject(form); |
| 328 | 1645 } |
| 1646 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1647 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1648 forms_activate_all_forms(PyObject *f, PyObject *args) |
|
726
e8c6fa9118eb
Added forms_(de)activate_all_forms functions; minor lay-out fixes.
Guido van Rossum <guido@python.org>
parents:
714
diff
changeset
|
1649 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1650 fl_activate_all_forms(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1651 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1652 return Py_None; |
|
726
e8c6fa9118eb
Added forms_(de)activate_all_forms functions; minor lay-out fixes.
Guido van Rossum <guido@python.org>
parents:
714
diff
changeset
|
1653 } |
|
e8c6fa9118eb
Added forms_(de)activate_all_forms functions; minor lay-out fixes.
Guido van Rossum <guido@python.org>
parents:
714
diff
changeset
|
1654 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1655 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1656 forms_deactivate_all_forms(PyObject *f, PyObject *args) |
|
726
e8c6fa9118eb
Added forms_(de)activate_all_forms functions; minor lay-out fixes.
Guido van Rossum <guido@python.org>
parents:
714
diff
changeset
|
1657 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1658 fl_deactivate_all_forms(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1659 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1660 return Py_None; |
|
726
e8c6fa9118eb
Added forms_(de)activate_all_forms functions; minor lay-out fixes.
Guido van Rossum <guido@python.org>
parents:
714
diff
changeset
|
1661 } |
|
e8c6fa9118eb
Added forms_(de)activate_all_forms functions; minor lay-out fixes.
Guido van Rossum <guido@python.org>
parents:
714
diff
changeset
|
1662 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1663 static PyObject *my_event_callback = NULL; |
| 328 | 1664 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1665 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1666 forms_set_event_call_back(PyObject *dummy, PyObject *args) |
| 328 | 1667 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1668 if (args == Py_None) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1669 args = NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1670 my_event_callback = args; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1671 Py_XINCREF(args); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1672 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1673 return Py_None; |
| 328 | 1674 } |
| 1675 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1676 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1677 forms_do_or_check_forms(PyObject *dummy, FL_OBJECT *(*func)(void)) |
| 328 | 1678 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1679 FL_OBJECT *generic; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1680 genericobject *g; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1681 PyObject *arg, *res; |
| 328 | 1682 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1683 for (;;) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1684 Py_BEGIN_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1685 generic = (*func)(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1686 Py_END_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1687 if (generic == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1688 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1689 return Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1690 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1691 if (generic == FL_EVENT) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1692 int dev; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1693 short val; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1694 if (my_event_callback == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1695 return PyInt_FromLong(-1L); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1696 dev = fl_qread(&val); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1697 arg = Py_BuildValue("(ih)", dev, val); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1698 if (arg == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1699 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1700 res = PyEval_CallObject(my_event_callback, arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1701 Py_XDECREF(res); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1702 Py_DECREF(arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1703 if (res == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1704 return NULL; /* Callback raised exception */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1705 continue; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1706 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1707 g = findgeneric(generic); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1708 if (g == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1709 /* Object not known to us (some dialogs cause this) */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1710 continue; /* Ignore it */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1711 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1712 if (g->ob_callback == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1713 Py_INCREF(g); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1714 return ((PyObject *) g); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1715 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1716 arg = PyTuple_Pack(2, (PyObject *)g, g->ob_callback_arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1717 if (arg == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1718 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1719 res = PyEval_CallObject(g->ob_callback, arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1720 Py_XDECREF(res); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1721 Py_DECREF(arg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1722 if (res == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1723 return NULL; /* Callback raised exception */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1724 } |
| 328 | 1725 } |
| 1726 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1727 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1728 forms_do_forms(PyObject *dummy) |
| 328 | 1729 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1730 return forms_do_or_check_forms(dummy, fl_do_forms); |
| 328 | 1731 } |
| 1732 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1733 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1734 forms_check_forms(PyObject *dummy) |
| 328 | 1735 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1736 return forms_do_or_check_forms(dummy, fl_check_forms); |
| 328 | 1737 } |
| 1738 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1739 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1740 forms_do_only_forms(PyObject *dummy) |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1741 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1742 return forms_do_or_check_forms(dummy, fl_do_only_forms); |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1743 } |
|
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1744 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1745 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1746 forms_check_only_forms(PyObject *dummy) |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1747 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1748 return forms_do_or_check_forms(dummy, fl_check_only_forms); |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1749 } |
|
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1750 |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1751 #ifdef UNUSED |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1752 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1753 fl_call(void (*func)(void)) |
| 328 | 1754 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1755 (*func)(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1756 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1757 return Py_None; |
| 328 | 1758 } |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1759 #endif |
| 328 | 1760 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1761 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1762 forms_set_graphics_mode(PyObject *dummy, PyObject *args) |
| 469 | 1763 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1764 int rgbmode, doublebuf; |
| 469 | 1765 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1766 if (!PyArg_Parse(args, "(ii)", &rgbmode, &doublebuf)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1767 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1768 fl_set_graphics_mode(rgbmode,doublebuf); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1769 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1770 return Py_None; |
| 469 | 1771 } |
| 1772 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1773 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1774 forms_get_rgbmode(PyObject *dummy, PyObject *args) |
| 469 | 1775 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1776 extern int fl_rgbmode; |
| 469 | 1777 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1778 if (args != NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1779 PyErr_BadArgument(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1780 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1781 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1782 return PyInt_FromLong((long)fl_rgbmode); |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1783 } |
|
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1784 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1785 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1786 forms_show_errors(PyObject *dummy, PyObject *args) |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1787 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1788 int show; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1789 if (!PyArg_Parse(args, "i", &show)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1790 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1791 fl_show_errors(show); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1792 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1793 return Py_None; |
| 469 | 1794 } |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1795 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1796 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1797 forms_set_font_name(PyObject *dummy, PyObject *args) |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1798 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1799 int numb; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1800 char *name; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1801 if (!PyArg_Parse(args, "(is)", &numb, &name)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1802 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1803 fl_set_font_name(numb, name); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1804 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1805 return Py_None; |
|
1051
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1806 } |
|
f54e64c8b9b7
* Makefile: added IMGFILE; moved some stuff around.
Guido van Rossum <guido@python.org>
parents:
1020
diff
changeset
|
1807 |
| 469 | 1808 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1809 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1810 forms_qdevice(PyObject *self, PyObject *args) |
| 328 | 1811 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1812 short arg1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1813 if (!PyArg_Parse(args, "h", &arg1)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1814 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1815 fl_qdevice(arg1); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1816 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1817 return Py_None; |
| 328 | 1818 } |
| 1819 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1820 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1821 forms_unqdevice(PyObject *self, PyObject *args) |
| 328 | 1822 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1823 short arg1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1824 if (!PyArg_Parse(args, "h", &arg1)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1825 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1826 fl_unqdevice(arg1); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1827 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1828 return Py_None; |
| 328 | 1829 } |
| 1830 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1831 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1832 forms_isqueued(PyObject *self, PyObject *args) |
| 328 | 1833 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1834 long retval; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1835 short arg1; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1836 if (!PyArg_Parse(args, "h", &arg1)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1837 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1838 retval = fl_isqueued(arg1); |
| 328 | 1839 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1840 return PyInt_FromLong(retval); |
| 328 | 1841 } |
| 1842 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1843 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1844 forms_qtest(PyObject *self, PyObject *args) |
| 328 | 1845 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1846 long retval; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1847 retval = fl_qtest(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1848 return PyInt_FromLong(retval); |
| 328 | 1849 } |
| 1850 | |
| 1851 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1852 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1853 forms_qread(PyObject *self, PyObject *args) |
| 328 | 1854 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1855 int dev; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1856 short val; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1857 Py_BEGIN_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1858 dev = fl_qread(&val); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1859 Py_END_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1860 return Py_BuildValue("(ih)", dev, val); |
| 328 | 1861 } |
| 1862 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1863 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1864 forms_qreset(PyObject *self) |
| 328 | 1865 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1866 fl_qreset(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1867 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1868 return Py_None; |
| 328 | 1869 } |
| 1870 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1871 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1872 forms_qenter(PyObject *self, PyObject *args) |
| 328 | 1873 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1874 short arg1, arg2; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1875 if (!PyArg_Parse(args, "(hh)", &arg1, &arg2)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1876 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1877 fl_qenter(arg1, arg2); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1878 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1879 return Py_None; |
| 328 | 1880 } |
| 1881 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1882 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1883 forms_color(PyObject *self, PyObject *args) |
| 328 | 1884 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1885 int arg; |
| 328 | 1886 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1887 if (!PyArg_Parse(args, "i", &arg)) return NULL; |
| 328 | 1888 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1889 fl_color((short) arg); |
| 328 | 1890 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1891 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1892 return Py_None; |
| 328 | 1893 } |
| 1894 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1895 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1896 forms_mapcolor(PyObject *self, PyObject *args) |
| 328 | 1897 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1898 int arg0, arg1, arg2, arg3; |
| 328 | 1899 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1900 if (!PyArg_Parse(args, "(iiii)", &arg0, &arg1, &arg2, &arg3)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1901 return NULL; |
| 328 | 1902 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1903 fl_mapcolor(arg0, (short) arg1, (short) arg2, (short) arg3); |
| 328 | 1904 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1905 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1906 return Py_None; |
| 328 | 1907 } |
| 1908 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1909 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1910 forms_getmcolor(PyObject *self, PyObject *args) |
| 328 | 1911 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1912 int arg; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1913 short r, g, b; |
| 328 | 1914 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1915 if (!PyArg_Parse(args, "i", &arg)) return NULL; |
| 328 | 1916 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1917 fl_getmcolor(arg, &r, &g, &b); |
| 328 | 1918 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1919 return Py_BuildValue("(hhh)", r, g, b); |
| 328 | 1920 } |
| 1921 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1922 static PyObject * |
|
22712
b383dfe36eee
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Neal Norwitz <nnorwitz@gmail.com>
parents:
21757
diff
changeset
|
1923 forms_get_mouse(PyObject *self) |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1924 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1925 float x, y; |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1926 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1927 fl_get_mouse(&x, &y); |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1928 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1929 return Py_BuildValue("(ff)", x, y); |
|
329
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1930 } |
|
f21cb7b53f6c
Adde get_mouse and find_first/find_last (by robertl)
Guido van Rossum <guido@python.org>
parents:
328
diff
changeset
|
1931 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1932 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1933 forms_tie(PyObject *self, PyObject *args) |
| 328 | 1934 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1935 short arg1, arg2, arg3; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1936 if (!PyArg_Parse(args, "(hhh)", &arg1, &arg2, &arg3)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1937 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1938 fl_tie(arg1, arg2, arg3); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1939 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1940 return Py_None; |
| 328 | 1941 } |
| 1942 | |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1943 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1944 forms_show_message(PyObject *f, PyObject *args) |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1945 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1946 char *a, *b, *c; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1947 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1948 if (!PyArg_Parse(args, "(sss)", &a, &b, &c)) return NULL; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1949 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1950 Py_BEGIN_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1951 fl_show_message(a, b, c); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1952 Py_END_ALLOW_THREADS |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1953 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1954 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1955 return Py_None; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1956 } |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
1957 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1958 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
1959 forms_show_choice(PyObject *f, PyObject *args) |
|
712
00cdb8dedd6f
Implemented show_choice(); moved items around a little bit.
Guido van Rossum <guido@python.org>
parents:
635
diff
changeset
|
1960 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1961 char *m1, *m2, *m3, *b1, *b2, *b3; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1962 int nb; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1963 char *format; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1964 long rv; |
|
712
00cdb8dedd6f
Implemented show_choice(); moved items around a little bit.
Guido van Rossum <guido@python.org>
parents:
635
diff
changeset
|
1965 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1966 if (args == NULL || !PyTuple_Check(args)) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1967 PyErr_BadArgument(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1968 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1969 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1970 nb = PyTuple_Size(args) - 3; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1971 if (nb <= 0) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1972 PyErr_SetString(PyExc_TypeError, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1973 "need at least one button label"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1974 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1975 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1976 if (PyInt_Check(PyTuple_GetItem(args, 3))) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1977 PyErr_SetString(PyExc_TypeError, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1978 "'number-of-buttons' argument not needed"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1979 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1980 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1981 switch (nb) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1982 case 1: format = "(ssss)"; break; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1983 case 2: format = "(sssss)"; break; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1984 case 3: format = "(ssssss)"; break; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1985 default: |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1986 PyErr_SetString(PyExc_TypeError, "too many button labels"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1987 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1988 } |
|
712
00cdb8dedd6f
Implemented show_choice(); moved items around a little bit.
Guido van Rossum <guido@python.org>
parents:
635
diff
changeset
|
1989 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1990 if (!PyArg_Parse(args, format, &m1, &m2, &m3, &b1, &b2, &b3)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1991 return NULL; |
|
712
00cdb8dedd6f
Implemented show_choice(); moved items around a little bit.
Guido van Rossum <guido@python.org>
parents:
635
diff
changeset
|
1992 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1993 Py_BEGIN_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1994 rv = fl_show_choice(m1, m2, m3, nb, b1, b2, b3); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1995 Py_END_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
1996 return PyInt_FromLong(rv); |
|
712
00cdb8dedd6f
Implemented show_choice(); moved items around a little bit.
Guido van Rossum <guido@python.org>
parents:
635
diff
changeset
|
1997 } |
|
00cdb8dedd6f
Implemented show_choice(); moved items around a little bit.
Guido van Rossum <guido@python.org>
parents:
635
diff
changeset
|
1998 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
1999 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
2000 forms_show_question(PyObject *f, PyObject *args) |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2001 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2002 int ret; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2003 char *a, *b, *c; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2004 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2005 if (!PyArg_Parse(args, "(sss)", &a, &b, &c)) return NULL; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2006 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2007 Py_BEGIN_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2008 ret = fl_show_question(a, b, c); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2009 Py_END_ALLOW_THREADS |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
2010 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2011 return PyInt_FromLong((long) ret); |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2012 } |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2013 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2014 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
2015 forms_show_input(PyObject *f, PyObject *args) |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2016 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2017 char *str; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2018 char *a, *b; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2019 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2020 if (!PyArg_Parse(args, "(ss)", &a, &b)) return NULL; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2021 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2022 Py_BEGIN_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2023 str = fl_show_input(a, b); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2024 Py_END_ALLOW_THREADS |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
2025 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2026 if (str == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2027 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2028 return Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2029 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2030 return PyString_FromString(str); |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2031 } |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2032 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2033 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
2034 forms_file_selector(PyObject *f, PyObject *args) |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2035 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2036 char *str; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2037 char *a, *b, *c, *d; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2038 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2039 if (!PyArg_Parse(args, "(ssss)", &a, &b, &c, &d)) return NULL; |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2040 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2041 Py_BEGIN_ALLOW_THREADS |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2042 str = fl_show_file_selector(a, b, c, d); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2043 Py_END_ALLOW_THREADS |
|
1020
7442b20c43fd
Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
Guido van Rossum <guido@python.org>
parents:
947
diff
changeset
|
2044 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2045 if (str == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2046 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2047 return Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2048 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2049 return PyString_FromString(str); |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2050 } |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2051 |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2052 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2053 static PyObject * |
|
13667
a6c7bfdd6777
Even more ANSIfication: fix as many function pointers and declarations as
Thomas Wouters <thomas@python.org>
parents:
13651
diff
changeset
|
2054 forms_file_selector_func(PyObject *args, char *(*func)(void)) |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2055 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2056 char *str; |
|
392
f33a3f69dfcb
Done a little bit about garbage collection.
Guido van Rossum <guido@python.org>
parents:
376
diff
changeset
|
2057 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2058 str = (*func) (); |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2059 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2060 if (str == NULL) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2061 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2062 return Py_None; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2063 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2064 return PyString_FromString(str); |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2065 } |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2066 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2067 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
2068 forms_get_directory(PyObject *f, PyObject *args) |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2069 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2070 return forms_file_selector_func(args, fl_get_directory); |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2071 } |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2072 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2073 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
2074 forms_get_pattern(PyObject *f, PyObject *args) |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2075 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2076 return forms_file_selector_func(args, fl_get_pattern); |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2077 } |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2078 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2079 static PyObject * |
|
13514
5304b88fe3cc
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
13256
diff
changeset
|
2080 forms_get_filename(PyObject *f, PyObject *args) |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2081 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2082 return forms_file_selector_func(args, fl_get_filename); |
|
330
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2083 } |
|
1807d60e6231
Lots of cosmetic changes.
Guido van Rossum <guido@python.org>
parents:
329
diff
changeset
|
2084 |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2085 static PyMethodDef forms_methods[] = { |
| 328 | 2086 /* adm */ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2087 {"make_form", forms_make_form, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2088 {"activate_all_forms", forms_activate_all_forms, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2089 {"deactivate_all_forms",forms_deactivate_all_forms, METH_OLDARGS}, |
| 328 | 2090 /* gl support wrappers */ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2091 {"qdevice", forms_qdevice, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2092 {"unqdevice", forms_unqdevice, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2093 {"isqueued", forms_isqueued, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2094 {"qtest", forms_qtest, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2095 {"qread", forms_qread, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2096 /* {"blkqread", forms_blkqread, METH_OLDARGS}, */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2097 {"qreset", forms_qreset, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2098 {"qenter", forms_qenter, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2099 {"get_mouse", forms_get_mouse, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2100 {"tie", forms_tie, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2101 /* {"new_events", forms_new_events, METH_OLDARGS}, */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2102 {"color", forms_color, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2103 {"mapcolor", forms_mapcolor, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2104 {"getmcolor", forms_getmcolor, METH_OLDARGS}, |
| 328 | 2105 /* interaction */ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2106 {"do_forms", forms_do_forms, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2107 {"do_only_forms", forms_do_only_forms, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2108 {"check_forms", forms_check_forms, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2109 {"check_only_forms", forms_check_only_forms, METH_NOARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2110 {"set_event_call_back", forms_set_event_call_back, METH_OLDARGS}, |
| 328 | 2111 /* goodies */ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2112 {"show_message", forms_show_message, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2113 {"show_question", forms_show_question, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2114 {"show_choice", forms_show_choice, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2115 {"show_input", forms_show_input, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2116 {"show_file_selector", forms_file_selector, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2117 {"file_selector", forms_file_selector, METH_OLDARGS}, /* BW compat */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2118 {"get_directory", forms_get_directory, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2119 {"get_pattern", forms_get_pattern, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2120 {"get_filename", forms_get_filename, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2121 {"set_graphics_mode", forms_set_graphics_mode, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2122 {"get_rgbmode", forms_get_rgbmode, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2123 {"show_errors", forms_show_errors, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2124 {"set_font_name", forms_set_font_name, METH_OLDARGS}, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2125 {NULL, NULL} /* sentinel */ |
| 328 | 2126 }; |
| 2127 | |
|
24471
f66b3a3509c7
Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototype
Mark Hammond <mhammond@skippinet.com.au>
parents:
24280
diff
changeset
|
2128 PyMODINIT_FUNC |
|
13651
8a063423e0b7
Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
Thomas Wouters <thomas@python.org>
parents:
13620
diff
changeset
|
2129 initfl(void) |
| 328 | 2130 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2131 |
|
47023
5e8932991adf
FL, flp, and fl from IRIX have been deprecated for removal in 3.0.
Brett Cannon <bcannon@gmail.com>
parents:
38490
diff
changeset
|
2132 if (PyErr_WarnPy3k("the fl module has been removed in " |
|
5e8932991adf
FL, flp, and fl from IRIX have been deprecated for removal in 3.0.
Brett Cannon <bcannon@gmail.com>
parents:
38490
diff
changeset
|
2133 "Python 3.0", 2) < 0) |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2134 return; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2135 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2136 Py_InitModule("fl", forms_methods); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2137 if (m == NULL) |
|
47023
5e8932991adf
FL, flp, and fl from IRIX have been deprecated for removal in 3.0.
Brett Cannon <bcannon@gmail.com>
parents:
38490
diff
changeset
|
2138 return; |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2139 foreground(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
58036
diff
changeset
|
2140 fl_init(); |
| 328 | 2141 } |
|
4884
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2142 |
|
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2143 |
|
65cb261f7736
Renamed, but untested.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4503
diff
changeset
|
2144 |
