Sun, 29 Jul 2007 16:45:29 +0000
Add function to get the screen size.
| finch/libgnt/pygnt/gnt.override | file | annotate | diff | comparison | revisions |
--- a/finch/libgnt/pygnt/gnt.override Sun Jul 29 16:36:05 2007 +0000 +++ b/finch/libgnt/pygnt/gnt.override Sun Jul 29 16:45:29 2007 +0000 @@ -76,5 +76,19 @@ Py_INCREF(Py_None); return Py_None; } +%% +define screen_size noargs +static PyObject * +_wrap_screen_size(PyObject *self) +{ + PyObject *list = PyList_New(0); + if (list == NULL) + return NULL; + PyList_Append(list, PyInt_FromLong((long)getmaxx(stdscr))); + PyList_Append(list, PyInt_FromLong((long)getmaxy(stdscr))); + + return list; +} +