]> Pileus Git - ~andy/gtk/blobdiff - docs/reference/gtk/tmpl/gtkbindings.sgml
Make 3.0 parallel-installable to 2.x
[~andy/gtk] / docs / reference / gtk / tmpl / gtkbindings.sgml
index b282cfff068c00dde0bc1cc794814381f4b33791..61961adab06e465a1117bbd3c14ffc722db8380a 100644 (file)
@@ -6,10 +6,10 @@ Key bindings for individual widgets
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-GtkBinding provides a mechanism for configuring Gtk+ key bindings through RC files.
-This eases key binding adjustments for application developers as well as users and
-provides Gtk+ users or administrators with high key binding configurability which
-requires no application or toolkit side changes.
+GtkBinding provides a mechanism for configuring GTK+ key bindings through 
+RC files. This eases key binding adjustments for application developers as 
+well as users and provides GTK+ users or administrators with high key 
+binding configurability which requires no application or toolkit side changes.
 </para>
 
 <refsect2>
@@ -17,20 +17,23 @@ requires no application or toolkit side changes.
 <title>Installing a key binding</title>
 
 <para>
-A resource file binding consists of a 'binding' definition and a match statement to
-apply the binding to specific widget types. Details on the matching mechanism are
-described under <link linkend="gtkrc-pathnames-and-patterns">Pathnames and patterns</link>.
-Inside the binding definition, key combinations are bound to specific signal emissions
-on the target widget. Key combinations are strings consisting of an optional #GdkModifierType
-name and <link linkend="gdk-Keyboard-Handling">key names</link> such as those defined in
-<filename>&lt;gdk/gdkkeysyms.h&gt;</filename> 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 letter steps,
-the following binding can be used:
+A resource file binding consists of a 'binding' definition and a match 
+statement to apply the binding to specific widget types. Details on the 
+matching mechanism are described under 
+<link linkend="gtkrc-pathnames-and-patterns">Pathnames and patterns</link>.
+Inside the binding definition, key combinations are bound to specific signal 
+emissions on the target widget. Key combinations are strings consisting of 
+an optional #GdkModifierType name and 
+<link linkend="gdk-Keyboard-Handling">key names</link> such as those defined 
+in <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> 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.
+</para>
+<para>
+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 letter steps, the following binding can be used:
 
 <informalexample><programlisting>
 binding "MoveCursor3" {
@@ -49,12 +52,12 @@ class "GtkEntry" binding "MoveCursor3"
 <anchor id="gtk-bindings-unbind"/>
 <title>Unbinding existing key bindings</title>
 <para>
-Gtk+ already defines a number of useful bindings for the widgets it provides.
-Because custom bindings set up in RC files take precedence over the default bindings
-shipped with Gtk+, overriding existing bindings as demonstrated in 
+GTK+ already defines a number of useful bindings for the widgets it provides.
+Because custom bindings set up in RC files take precedence over the default 
+bindings shipped with GTK+, overriding existing bindings as demonstrated in 
 <link linkend="gtk-bindings-install">Installing a key binding</link>
-works as expected. The same mechanism can not be used to "unbind" existing bindings,
-however.
+works as expected. The same mechanism can not be used to "unbind" existing 
+bindings, however.
 
 <informalexample><programlisting>
 binding "MoveCursor3" {
@@ -64,14 +67,15 @@ binding "MoveCursor3" {
 class "GtkEntry" binding "MoveCursor3"
 </programlisting></informalexample>
 
-The above example will not have the desired effect of causing "&lt;Control&gt;Right"
-and "&lt;Control&gt;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
-"&lt;Control&gt;Right" or "&lt;Control&gt;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:
+The above example will not have the desired effect of causing 
+"&lt;Control&gt;Right" and "&lt;Control&gt;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 "&lt;Control&gt;Right" or 
+"&lt;Control&gt;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:
 
 <informalexample><programlisting>
 binding "MoveCursor3" {
@@ -81,12 +85,15 @@ binding "MoveCursor3" {
 class "GtkEntry" binding "MoveCursor3"
 </programlisting></informalexample>
 
-Now, Gtk+ will find a match when looking up "&lt;Control&gt;Right" and "&lt;Control&gt;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 entries parent widget,
-is now possible.
+Now, GTK+ will find a match when looking up "&lt;Control&gt;Right" and 
+"&lt;Control&gt;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.
+</para>
 
+<para>
+The "unbind" functionality has been introduced in GTK+ 2.12.
 </para>
 
 </refsect2>
@@ -104,7 +111,7 @@ is now possible.
 <varlistentry>
 <term><link linkend="Resource-Files">Resource Files</link>
 </term>
-<listitem><para>Gtk+ Resource Files - behavior and style definitions.</para></listitem>
+<listitem><para>GTK+ Resource Files - behavior and style definitions.</para></listitem>
 </varlistentry>
 
 </variablelist>
@@ -113,13 +120,17 @@ is now possible.
 <!-- ##### SECTION Stability_Level ##### -->
 
 
+<!-- ##### SECTION Image ##### -->
+
+
 <!-- ##### STRUCT GtkBindingSet ##### -->
 <para>
 A binding set maintains a list of activatable key bindings.
 A single binding set can match multiple types of widgets.
-Similar to styles, widgets can be mapped by widget name paths, widget class paths or widget class types.
-When a binding within a set is matched upon activation, an action signal is emitted on
-the target widget to carry out the actual activation.
+Similar to styles, widgets can be mapped by widget name paths, widget 
+class paths or widget class types.  When a binding within a set is 
+matched upon activation, an action signal is emitted on the target 
+widget to carry out the actual activation.
 </para>
 
 @set_name:             unique binding set name
@@ -133,7 +144,8 @@ the target widget to carry out the actual activation.
 
 <!-- ##### STRUCT GtkBindingEntry ##### -->
 <para>
-Each key binding element of a binding sets binding list is represented by a #GtkBindingEntry.
+Each key binding element of a binding sets binding list is represented by 
+a #GtkBindingEntry.
 </para>
 
 @keyval:       key value to match
@@ -141,12 +153,13 @@ Each key binding element of a binding sets binding list is represented by a #Gtk
 @binding_set:  binding set this entry belongs to
 @destroyed:    implementation detail
 @in_emission:  implementation detail
-@marks_unbound: 
+@marks_unbound: implementation detail
 @set_next:     linked list of entries maintained by binding set
 @hash_next:    implementation detail
 @signals:      action signals of this entry
 
 <!-- ##### STRUCT GtkBindingSignal ##### -->
+<anchor id="keybinding-signals"/>
 <para>
 A #GtkBindingSignal stores the necessary information to activate a widget
 in response to a key press via a signal emission.
@@ -165,6 +178,18 @@ key binding signal emission as stored in #GtkBindingSignal.
 
 @arg_type: implementation detail
 
+<!-- ##### FUNCTION gtk_binding_entry_add_signall ##### -->
+<para>
+
+</para>
+
+@binding_set: 
+@keyval: 
+@modifiers: 
+@signal_name: 
+@binding_args: 
+
+
 <!-- ##### FUNCTION gtk_binding_set_new ##### -->
 <para>
 
@@ -205,7 +230,7 @@ key binding signal emission as stored in #GtkBindingSignal.
 
 <!-- ##### FUNCTION gtk_bindings_activate_event ##### -->
 <para>
-<!-- documented inline -->
+
 </para>
 
 @object: