[gtk+] Document @binding-set and the gtk-key-bindings css parser property
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Document @binding-set and the gtk-key-bindings css parser property
- Date: Mon, 31 Jan 2011 04:37:24 +0000 (UTC)
commit c70b65f0eb651cfbb4154f2b1b35cc1359db3e91
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jan 28 10:25:17 2011 +0100
Document @binding-set and the gtk-key-bindings css parser property
gtk/gtkcssprovider.c | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 95e3807..df80587 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -291,6 +291,28 @@
* </programlisting>
* </example>
* <para>
+ * In order to extend key bindings affecting different widgets, GTK+
+ * supports the @binding-set rule to parse a set of bind/unbind
+ * directives, see #GtkBindingSet for the syntax supported
+ * </para>
+ * <example>
+ * <title>Using the @binding rule</title>
+ * <programlisting language="text">
+ * @binding-set binding-set1 {
+ * bind "<alt>Left" { "move-cursor" (visual-positions, -3, 0) };
+ * unbind "End";
+ * };
+ *
+ * @binding-set binding-set1 {
+ * bind "<alt>Right" { "move-cursor" (visual-positions, 3, 0) };
+ * };
+ *
+ * GtkEntry {
+ * gtk-binding-set: binding-set1, binding-set2;
+ * }
+ * </programlisting>
+ * </example>
+ * <para>
* GTK+ also supports an additional @define-color rule, in order
* to define a color name which may be used instead of color numeric
* representations. Also see the #GtkSettings:gtk-color-scheme setting
@@ -666,6 +688,13 @@
* transition: 1s linear loop;</literallayout>
* </entry>
* </row>
+ * <row>
+ * <entry>gtk-key-bindings</entry>
+ * <entry>binding set name list</entry>
+ * <entry>internal use only</entry>
+ * <entry><literallayout>gtk-bindings: binding1, binding2, ...;</literallayout>
+ * </entry>
+ * </row>
* </tbody>
* </tgroup>
* </informaltable>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]