[gtk] Remove docs for css keybindings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] Remove docs for css keybindings
- Date: Thu, 21 Feb 2019 18:57:26 +0000 (UTC)
commit b64f852d60fad33d04e183df312a0d41c3f1b599
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 21 13:56:07 2019 -0500
Remove docs for css keybindings
This functionality has been removed.
docs/reference/gtk/css-overview.xml | 49 -------------------
docs/reference/gtk/css-properties.xml | 26 -----------
gtk/gtkbindings.c | 88 -----------------------------------
3 files changed, 163 deletions(-)
---
diff --git a/docs/reference/gtk/css-overview.xml b/docs/reference/gtk/css-overview.xml
index f53cd00e40..9c942e72d2 100644
--- a/docs/reference/gtk/css-overview.xml
+++ b/docs/reference/gtk/css-overview.xml
@@ -906,54 +906,5 @@ spinner {
</refsect2>
- <refsect2>
- <title>Key bindings</title>
-
- <para>
- In order to extend key bindings affecting different widgets,
- GTK supports the @binding-set rule to parse a set of bind/unbind
- directives. Note that in order to take effect, the binding sets
- defined in this way must be associated with rule sets by setting
- the -gtk-key-bindings property.
- </para>
-
- <para>
- The syntax for @binding-set rules is as follows:
- </para>
-
-<literallayout><code>〈binding set rule〉 = @binding-set 〈binding name〉 { [ [ 〈binding〉 | 〈unbinding〉 ] ; ]*
}</code>
-<code>〈binding〉 = bind "〈accelerator〉" { 〈signal emission〉* }</code>
-<code>〈signal emission〉 = "〈signal name〉" ( [ 〈argument〉 [ , 〈argument〉 ]* ]? }</code>
-<code>〈unbinding〉 = unbind "〈accelerator〉"</code>
-</literallayout>
-
- <para>
- where 〈accelerator〉 is a string that can be parsed by gtk_accelerator_parse(),
- 〈signal name〉 is the name of a keybinding signal of the widget in question,
- and the 〈argument〉 list must be according to the signals declaration.
- </para>
-
- <example>
- <title>An example for using the @binding-set rule</title>
- <programlisting><![CDATA[
-@binding-set binding-set1 {
- bind "<alt>Left" { "move-cursor" (visual-positions, -3, 0) };
- unbind "End";
-};
-
-@binding-set binding-set2 {
- bind "<alt>Right" { "move-cursor" (visual-positions, 3, 0) };
- bind "<alt>KP_space" { "delete-from-cursor" (whitespace, 1)
- "insert-at-cursor" (" ") };
-};
-
-entry {
- -gtk-key-bindings: binding-set1, binding-set2;
-}
-]]></programlisting>
- </example>
-
- </refsect2>
-
</refsect1>
</refentry>
diff --git a/docs/reference/gtk/css-properties.xml b/docs/reference/gtk/css-properties.xml
index cfca161678..beadcfa880 100644
--- a/docs/reference/gtk/css-properties.xml
+++ b/docs/reference/gtk/css-properties.xml
@@ -1485,32 +1485,6 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<code> 〈single-animation-play-state〉 || 〈single-animation-fill-mode〉</code>
</literallayout>
- <table pgwide="1">
- <title>Key binding properties</title>
- <tgroup cols="7">
- <colspec colnum="4" align="center"/>
- <colspec colnum="5" align="center"/>
- <thead>
-
<row><entry>Name</entry><entry>Value</entry><entry>Initial</entry><entry>Inh.</entry><entry>Ani.</entry><entry>Reference</entry><entry>Notes</entry></row>
- </thead>
- <tbody>
- <row>
- <entry><phrase role="nowrap">-gtk-key-bindings</phrase></entry>
- <entry><code>none | 〈binding name〉 [ , 〈binding name〉 ]*</code></entry>
- <entry><code>none</code></entry>
- <entry></entry>
- <entry></entry>
- <entry></entry>
- <entry></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <para>
- 〈binding name〉 must have been assigned to a binding set with a @binding-set rule.
- </para>
-
<table pgwide="1">
<title>Table-related properties</title>
<tgroup cols="7">
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index f9b58c702d..eb38394a08 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -52,94 +52,6 @@
* must both be true. For example, by calling gtk_widget_set_can_focus()
* in the widget’s initialisation function; and by calling
* gtk_widget_grab_focus() when the widget is clicked.
- *
- * # Installing a key binding
- *
- * A CSS file binding consists of a “binding-set” definition and a match
- * statement to apply the binding set to specific widget types. Details
- * on the matching mechanism are described under
- * [Selectors][gtkcssprovider-selectors]
- * in the #GtkCssProvider documentation. Inside the binding set
- * definition, key combinations are bound to one or more specific
- * signal emissions on the target widget. Key combinations are strings
- * consisting of an optional #GdkModifierType name and
- * [key names][gdk3-Keyboard-Handling]
- * such as those defined in `gdk/gdkkeysyms.h`
- * or returned from gdk_keyval_name(), they have to be parsable by
- * gtk_accelerator_parse(). Specifications of signal emissions consist
- * of a string identifying the signal name, and a list of signal specific
- * arguments in parenthesis.
- *
- * For example for binding Control and the left or right cursor keys
- * of a #GtkEntry widget to the #GtkEntry::move-cursor signal (so
- * movement occurs in 3-character steps), the following binding can be
- * used:
- *
- * |[ <!-- language="CSS" -->
- * @binding-set MoveCursor3
- * {
- * bind "<Control>Right" { "move-cursor" (visual-positions, 3, 0) };
- * bind "<Control>Left" { "move-cursor" (visual-positions, -3, 0) };
- * }
- *
- * entry
- * {
- * -gtk-key-bindings: MoveCursor3;
- * }
- * ]|
- *
- * # Unbinding existing key bindings
- *
- * GTK+ already defines a number of useful bindings for the widgets
- * it provides. Because custom bindings set up in CSS files take
- * precedence over the default bindings shipped with GTK+, overriding
- * existing bindings as demonstrated in
- * [Installing a key binding][gtk-bindings-install]
- * works as expected. The same mechanism can not be used to “unbind”
- * existing bindings, however.
- *
- * |[ <!-- language="CSS" -->
- * @binding-set MoveCursor3
- * {
- * bind "<Control>Right" { };
- * bind "<Control>Left" { };
- * }
- *
- * entry
- * {
- * -gtk-key-bindings: MoveCursor3;
- * }
- * ]|
- *
- * The above example will not have the desired effect of causing
- * “<Control>Right” and “<Control>Left” key presses to be ignored by GTK+.
- * Instead, it just causes any existing bindings from the bindings set
- * “MoveCursor3” to be deleted, so when “<Control>Right” or
- * “<Control>Left” are pressed, no binding for these keys is found in
- * binding set “MoveCursor3”. GTK+ will thus continue to search for
- * matching key bindings, and will eventually lookup and find the default
- * GTK+ bindings for entries which implement word movement. To keep GTK+
- * from activating its default bindings, the “unbind” keyword can be used
- * like this:
- *
- * |[ <!-- language="CSS" -->
- * @binding-set MoveCursor3
- * {
- * unbind "<Control>Right";
- * unbind "<Control>Left";
- * }
- *
- * entry
- * {
- * -gtk-key-bindings: MoveCursor3;
- * }
- * ]|
- *
- * Now, GTK+ will find a match when looking up “<Control>Right” and
- * “<Control>Left” key presses before it resorts to its default bindings,
- * and the match instructs it to abort (“unbind”) the search, so the key
- * presses are not consumed by this widget. As usual, further processing
- * of the key presses, e.g. by an entry’s parent widget, is now possible.
*/
/* --- defines --- */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]