diff options
author | Sayamindu Dasgupta <sayamindu@gmail.com> | 2009-03-30 06:51:02 (GMT) |
---|---|---|
committer | Sayamindu Dasgupta <sayamindu@gmail.com> | 2009-03-30 06:51:02 (GMT) |
commit | 0e03e5681dc582747d3aa652d4cf57f29b260292 (patch) | |
tree | ca32b4bcbb917e1ebddd393b0c729ebd2c31f681 | |
parent | 340afc723c85317cac6a0f468e3dc6b71f7a3c98 (diff) |
Added method for finding the max number of groups supported simultaneously
-rw-r--r-- | pyxkb.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -54,7 +54,13 @@ append_to_list_withsubitem_cb(XklConfigRegistry * config, subitem->description)); } - +static PyObject * +pyxkbconfig_get_max_num_groups(PyObject *self, PyObject *args) +{ + gint num_groups; + num_groups = xkl_engine_get_max_num_groups(engine); + return Py_BuildValue("i", num_groups); +} static PyObject * pyxkbconfig_get_layouts(PyObject *self, PyObject *args) @@ -374,6 +380,8 @@ pyxkbconfig_lock_prev_group(PyObject *self, PyObject *args) /* Method table */ static PyMethodDef pyxkb_methods[] = { + {"get_max_num_groups", pyxkbconfig_get_max_num_groups, METH_VARARGS, + "Returns maximum number of simultaneously supported groups (layouts)"}, {"get_layouts", pyxkbconfig_get_layouts, METH_VARARGS, "Returns list of available layouts"}, {"get_variants_for_layout", pyxkbconfig_get_variants_for_layout, |