From 5eaed0dbf78fca2bcf185da0abf1dbf41722deb2 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Fri, 14 Jul 2006 10:02:13 +0000 Subject: finished up themes. time for textui stuff git-svn-id: http://svn.irssi.org/repos/irssi-python@4297 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- pymodule.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'pymodule.c') diff --git a/pymodule.c b/pymodule.c index d0d17f7..34413a5 100644 --- a/pymodule.c +++ b/pymodule.c @@ -1353,6 +1353,26 @@ error: } #endif +PyDoc_STRVAR(py_themes_reload_doc, + "themes_reload() -> None\n" +); +static PyObject *py_themes_reload(PyObject *self, PyObject *args) +{ + themes_reload(); + Py_RETURN_NONE; +} + +PyDoc_STRVAR(py_current_theme_doc, + "current_theme() -> Theme object\n" +); +static PyObject *py_current_theme(PyObject *self, PyObject *args) +{ + if (current_theme) + return pytheme_new(current_theme); + + Py_RETURN_NONE; +} + static PyMethodDef ModuleMethods[] = { {"prnt", (PyCFunction)py_prnt, METH_VARARGS | METH_KEYWORDS, py_prnt_doc}, @@ -1506,6 +1526,10 @@ static PyMethodDef ModuleMethods[] = { py_strip_codes_doc}, /*{"format_get_text", (PyCFunction)py_format_get_text, METH_VARARGS, py_format_get_text_doc},*/ + {"themes_reload", (PyCFunction)py_themes_reload, METH_NOARGS, + py_themes_reload_doc}, + {"current_theme", (PyCFunction)py_current_theme, METH_NOARGS, + py_current_theme_doc}, {NULL, NULL, 0, NULL} /* Sentinel */ }; -- cgit