From cc4d94530c6f7ccfc0c127f04ded8b9bde4e39b6 Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury Date: Tue, 23 Oct 2007 20:49:36 -0400 Subject: [PATCH] Wrap gnt_util_get_text_bound. --- gnt.override | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnt.override b/gnt.override index 4026114..9c537c7 100644 --- a/gnt.override +++ b/gnt.override @@ -251,4 +251,27 @@ _wrap_show_menu(PyGObject *self, PyObject *args, PyObject *kwargs) Py_INCREF(Py_None); return Py_None; } +%% +ignore +gnt_util_get_text_bound +%% +define get_text_bound +static PyObject * +_wrap_get_text_bound(PyGObject *self, PyObject *args) +{ + PyObject *list; + int w = 0, h = 0; + char *text; + + if (!PyArg_ParseTuple(args, "s:gnt.get_text_bound", &text)) { + return NULL; + } + + gnt_util_get_text_bound(text, &w, &h); + + list = PyList_New(0); + PyList_Append(list, PyInt_FromLong((long)w)); + PyList_Append(list, PyInt_FromLong((long)h)); + return list; +} -- 2.11.4.GIT