Mercurial > pidgin.yaz
comparison finch/libgnt/pygnt/gnt.override @ 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 | 7389b597a812 |
comparison
equal
deleted
inserted
replaced
18717:d3542cffbb42 | 18718:1ad1a4e8dfea |
---|---|
74 GNT_WIDGET_UNSET_FLAGS(widget->obj, flags); | 74 GNT_WIDGET_UNSET_FLAGS(widget->obj, flags); |
75 | 75 |
76 Py_INCREF(Py_None); | 76 Py_INCREF(Py_None); |
77 return Py_None; | 77 return Py_None; |
78 } | 78 } |
79 %% | |
80 define screen_size noargs | |
81 static PyObject * | |
82 _wrap_screen_size(PyObject *self) | |
83 { | |
84 PyObject *list = PyList_New(0); | |
79 | 85 |
86 if (list == NULL) | |
87 return NULL; | |
80 | 88 |
89 PyList_Append(list, PyInt_FromLong((long)getmaxx(stdscr))); | |
90 PyList_Append(list, PyInt_FromLong((long)getmaxy(stdscr))); | |
91 | |
92 return list; | |
93 } | |
94 |