summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-04-22 14:36:27 -0400
committerSergey V. Udaltsov <svu@gnome.org>2013-04-23 01:51:31 +0100
commit115a22dfff5ea59cdcf8a5a7f8e15ffd71164c1c (patch)
tree43e5963226a1d9a2e132cb48693ae69d65c078c1
parentc9da95fd0cc1b86633701fa410c6ecb38c278ef2 (diff)
downloadlibxklavier-115a22dfff5ea59cdcf8a5a7f8e15ffd71164c1c.tar.gz
XklConfigItem: Add accessors for name, short_description, description
The interpretation of fixed-size arrays of gchar changed in pygobject; these accessors should provide a predictable way to get these values as strings. See: https://bugzilla.gnome.org/show_bug.cgi?id=698416 See: https://bugzilla.redhat.com/show_bug.cgi?id=920595
-rw-r--r--configure.ac2
-rw-r--r--libxklavier/libxklavier.public3
-rw-r--r--libxklavier/xkl_config_item.h27
-rw-r--r--libxklavier/xklavier_props.c18
4 files changed, 49 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index cdb9fd5..0f28147 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl for DLL
dnl http://sources.redhat.com/autobook/autobook/autobook_91.html
-VERSION_INFO=19:0:3
+VERSION_INFO=20:0:4
AC_SUBST(VERSION_INFO)
# Check for programs
diff --git a/libxklavier/libxklavier.public b/libxklavier/libxklavier.public
index baf6db1..11f27d5 100644
--- a/libxklavier/libxklavier.public
+++ b/libxklavier/libxklavier.public
@@ -1,7 +1,10 @@
xkl_config_item_get_type
xkl_config_item_new
+xkl_config_item_get_description
xkl_config_item_set_description
+xkl_config_item_get_name
xkl_config_item_set_name
+xkl_config_item_get_short_description
xkl_config_item_set_short_description
xkl_config_rec_activate
xkl_config_rec_dump
diff --git a/libxklavier/xkl_config_item.h b/libxklavier/xkl_config_item.h
index 0aa90ed..46eff0e 100644
--- a/libxklavier/xkl_config_item.h
+++ b/libxklavier/xkl_config_item.h
@@ -132,6 +132,15 @@ extern "C" {
extern XklConfigItem *xkl_config_item_new(void);
/**
+ * xkl_config_item_get_name:
+ * @item: the XklConfigItem object
+ *
+ * Returns: The @name field of a XklConfigItem. This is mostly useful for
+ * language bindings, in C you can manipulate the member directly.
+ */
+extern const gchar * xkl_config_item_get_name(XklConfigItem * item);
+
+/**
* xkl_config_item_set_name:
* @item: the XklConfigItem object to be changed
* @name: (transfer none) (allow-none): Name (max. 32 characters); can be NULL.
@@ -143,6 +152,15 @@ extern "C" {
const gchar * name);
/**
+ * xkl_config_item_get_short_description:
+ * @item: the XklConfigItem object
+ *
+ * Returns: The @short_description field of a XklConfigItem. This is mostly useful for
+ * language bindings, in C you can manipulate the member directly.
+ */
+extern const gchar * xkl_config_item_get_short_description(XklConfigItem * item);
+
+/**
* xkl_config_item_set_short_description:
* @item: the XklConfigItem object to be changed
* @short_description: (transfer none) (allow-none): Short Description (max. 10
@@ -154,6 +172,15 @@ extern "C" {
extern void xkl_config_item_set_short_description(XklConfigItem * item,
const gchar * short_description);
/**
+ * xkl_config_item_get_description:
+ * @item: the XklConfigItem object
+ *
+ * Returns: The @description field of a XklConfigItem. This is mostly useful for
+ * language bindings, in C you can manipulate the member directly.
+ */
+extern const gchar * xkl_config_item_get_description(XklConfigItem * item);
+
+/**
* xkl_config_item_set_description:
* @item: the XklConfigItem object to be changed
* @description: (transfer none) (allow-none): Description (max. 192
diff --git a/libxklavier/xklavier_props.c b/libxklavier/xklavier_props.c
index 8827200..95f38e2 100644
--- a/libxklavier/xklavier_props.c
+++ b/libxklavier/xklavier_props.c
@@ -54,6 +54,12 @@ xkl_config_item_new(void)
(xkl_config_item_get_type(), NULL));
}
+const gchar *
+xkl_config_item_get_name(XklConfigItem * item)
+{
+ return item->name;
+}
+
void
xkl_config_item_set_name(XklConfigItem * item,
const gchar * name)
@@ -64,6 +70,12 @@ xkl_config_item_set_name(XklConfigItem * item,
item->name[0] = '\0';
}
+const gchar *
+xkl_config_item_get_short_description(XklConfigItem * item)
+{
+ return item->short_description;
+}
+
void
xkl_config_item_set_short_description(XklConfigItem * item,
const gchar * short_description)
@@ -74,6 +86,12 @@ xkl_config_item_set_short_description(XklConfigItem * item,
item->short_description[0] = '\0';
}
+const gchar *
+xkl_config_item_get_description(XklConfigItem * item)
+{
+ return item->description;
+}
+
void
xkl_config_item_set_description(XklConfigItem * item,
const gchar * description)