Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,