Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSayamindu Dasgupta <sayamindu@gmail.com>2009-03-30 06:51:02 (GMT)
committer Sayamindu Dasgupta <sayamindu@gmail.com>2009-03-30 06:51:02 (GMT)
commit0e03e5681dc582747d3aa652d4cf57f29b260292 (patch)
treeca32b4bcbb917e1ebddd393b0c729ebd2c31f681
parent340afc723c85317cac6a0f468e3dc6b71f7a3c98 (diff)
Added method for finding the max number of groups supported simultaneously
-rw-r--r--pyxkb.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/pyxkb.c b/pyxkb.c
index 5d1c5f4..9a54b6f 100644
--- a/pyxkb.c
+++ b/pyxkb.c
@@ -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,