summaryrefslogtreecommitdiffstats
path: root/Modules/_cursesmodule.c
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2000-06-21 01:41:48 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2000-06-21 01:41:48 (GMT)
commit97311bbb0e2d484026bd982e7833b520d90f5572 (patch)
tree712ed12b3de2ba673bf1d71ceb1bb51c30158d87 /Modules/_cursesmodule.c
parent8eff33b51fff0570fe3a68668073253ec18a2631 (diff)
downloadcpython-97311bbb0e2d484026bd982e7833b520d90f5572.zip
cpython-97311bbb0e2d484026bd982e7833b520d90f5572.tar.gz
cpython-97311bbb0e2d484026bd982e7833b520d90f5572.tar.bz2
Added .timeout() method and .typeahead() function
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r--Modules/_cursesmodule.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 3c1dd08..fe75669 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -226,6 +226,7 @@ Window_NoArgNoReturnVoidFunction(wclear)
Window_OneArgNoReturnVoidFunction(idcok, int, "i;True(1) or False(0)")
Window_OneArgNoReturnVoidFunction(immedok, int, "i;True(1) or False(0)")
+Window_OneArgNoReturnVoidFunction(wtimeout, int, "i;delay")
Window_NoArg2TupleReturnFunction(getyx, int, "(ii)")
Window_NoArg2TupleReturnFunction(getbegyx, int, "(ii)")
@@ -1286,6 +1287,7 @@ static PyMethodDef PyCursesWindow_Methods[] = {
{"syncdown", (PyCFunction)PyCursesWindow_wsyncdown},
{"syncok", (PyCFunction)PyCursesWindow_syncok},
{"syncup", (PyCFunction)PyCursesWindow_wsyncup},
+ {"timeout", (PyCFunction)PyCursesWindow_wtimeout},
{"touchline", (PyCFunction)PyCursesWindow_TouchLine},
{"touchwin", (PyCFunction)PyCursesWindow_touchwin},
{"untouchwin", (PyCFunction)PyCursesWindow_untouchwin},
@@ -2027,6 +2029,22 @@ PyCurses_Start_Color(self,arg)
}
static PyObject *
+PyCurses_TypeAhead(self,arg)
+ PyObject * self;
+ PyObject * arg;
+{
+ int fd, err;
+
+ PyCursesInitialised
+
+ if (!PyArg_Parse(arg,"i;fd",&fd)) return NULL;
+
+ PyCursesCheckERR(typeahead( fd ), "typeahead");
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
PyCurses_UnCtrl(self,arg)
PyObject * self;
PyObject * arg;
@@ -2154,6 +2172,7 @@ static PyMethodDef PyCurses_methods[] = {
{"start_color", (PyCFunction)PyCurses_Start_Color},
{"termattrs", (PyCFunction)PyCurses_termattrs},
{"termname", (PyCFunction)PyCurses_termname},
+ {"typeahead", (PyCFunction)PyCurses_TypeAhead},
{"unctrl", (PyCFunction)PyCurses_UnCtrl},
{"ungetch", (PyCFunction)PyCurses_UngetCh},
{"use_env", (PyCFunction)PyCurses_Use_Env},