# HG changeset patch
# User Sadrul Habib Chowdhury <imadil@gmail.com>
# Date 1185727529 0
# Node ID 1ad1a4e8dfeafa2a89b8d3686597766b5af2393d
# Parent  d3542cffbb421e9a6044e54e827ce82771e00a1e
Add function to get the screen size.

diff -r d3542cffbb42 -r 1ad1a4e8dfea finch/libgnt/pygnt/gnt.override
--- 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;
+}
+