static PyObject * pushHelpLine(PyObject * s, PyObject * args);
static snackWidget * radioButtonWidget(PyObject * s, PyObject * args);
static PyObject * refreshScreen(PyObject * s, PyObject * args);
+static PyObject * screenSize(PyObject * s, PyObject * args);
static PyObject * reflowText(PyObject * s, PyObject * args);
static snackWidget * textWidget(PyObject * s, PyObject * args);
static PyObject * ternaryWindow(PyObject * s, PyObject * args);
{ "radiobutton", (PyCFunction) radioButtonWidget, METH_VARARGS, NULL },
{ "reflow", (PyCFunction) reflowText, METH_VARARGS, NULL },
{ "refresh", refreshScreen, METH_VARARGS, NULL },
+ { "size", screenSize, METH_VARARGS, NULL },
{ "ternary", ternaryWindow, METH_VARARGS, NULL },
{ "textbox", (PyCFunction) textWidget, METH_VARARGS, NULL },
{ NULL }
return Py_None;
}
+static PyObject * screenSize(PyObject * s, PyObject * args) {
+ int width, height;
+
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+
+ newtGetScreenSize(&width, &height);
+
+ return Py_BuildValue("(ii)", width, height);
+}
+
static PyObject * drawRootText(PyObject * s, PyObject * args) {
int left, top;
char * text;