Mercurial > pidgin.yaz
changeset 18718:1ad1a4e8dfea
Add function to get the screen size.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 29 Jul 2007 16:45:29 +0000 |
parents | d3542cffbb42 |
children | c3d0b51d6c60 |
files | finch/libgnt/pygnt/gnt.override |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; +} +