/usr/share/gtk-doc/html/pygtk/class-gtkaccelmap.html is in python-gtk2-doc 2.24.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.AccelMap</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkaccellabel.html" title="gtk.AccelLabel"><link rel="next" href="class-gtkaccessible.html" title="gtk.Accessible"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.AccelMap</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkaccellabel.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkaccessible.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.AccelMap"><a name="class-gtkaccelmap"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.AccelMap</h2><p>gtk.AccelMap — Loadable keyboard accelerator specifications (new in PyGTK
2.10)</p></div><div class="refsect1" title="Synopsis"><a name="id2988969"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.AccelMap</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
</pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-add-entry" title="gtk.accel_map_add_entry">gtk.accel_map_add_entry</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_key</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_mods</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-lookup-entry" title="gtk.accel_map_lookup_entry">gtk.accel_map_lookup_entry</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-change-entry" title="gtk.accel_map_change_entry">gtk.accel_map_change_entry</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_key</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_mods</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>replace</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-foreach" title="gtk.accel_map_foreach">gtk.accel_map_foreach</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreach_func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-foreach-unfiltered" title="gtk.accel_map_foreach_unfiltered">gtk.accel_map_foreach_unfiltered</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreach_func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-get" title="gtk.accel_map_get">gtk.accel_map_get</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-load" title="gtk.accel_map_load">gtk.accel_map_load</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-save" title="gtk.accel_map_save">gtk.accel_map_save</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-load-fd" title="gtk.accel_map_load_fd">gtk.accel_map_load_fd</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-save-fd" title="gtk.accel_map_save_fd">gtk.accel_map_save_fd</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-lock-path" title="gtk.accel_map_lock_path">gtk.accel_map_lock_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-unlock-path" title="gtk.accel_map_unlock_path">gtk.accel_map_unlock_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-add-filter" title="gtk.accel_map_add_filter">gtk.accel_map_add_filter</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_pattern</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkaccelgroup.html#function-gtk--accel-groups-from-object" title="gtk.accel_groups_from_object">gtk.accel_groups_from_object</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>object</code></em></span></span>)</code>
</pre></div><div class="refsect1" title="Ancestry"><a name="id3388961"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkaccelmap.html" title="gtk.AccelMap">gtk.AccelMap</a>
</pre></div><div class="refsect1" title="gtk.AccelMap Signal Prototypes"><a name="signal-prototypes-gtkaccelmap"></a><h2>gtk.AccelMap Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkaccelmap.html#signal-gtkaccelmap--changed" title='The "changed" gtk.AccelMap Signal'>changed</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>object</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>accel_path</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>accel_key</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>accel_mods</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id2863339"></a><h2>Description</h2><p></p></div><div class="refsect1" title="Functions"><a name="id3027067"></a><h2>Functions</h2><div class="refsect2" title="gtk.accel_map_add_entry"><a name="function-gtk--accel-map-add-entry"></a><h3>gtk.accel_map_add_entry</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_add_entry</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_key</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_mods</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accel_path</code></strong> :</span></p></td><td>a valid accelerator path</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>accel_key</code></strong> :</span></p></td><td>the accelerator key</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>accel_mods</code></strong> :</span></p></td><td>the accelerator modifiers</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">gtk.accel_map_add_entry</code>() function
registers a new accelerator specified by <em class="parameter"><code>accel_key</code></em>
and <em class="parameter"><code>accel_mods</code></em> with the global accelerator map. The
accelerator will be associated with the accelerator path specified by
<em class="parameter"><code>accel_path</code></em>. This function should only be called once
per <em class="parameter"><code>accel_path</code></em> with the canonical
<em class="parameter"><code>accel_key</code></em> and <em class="parameter"><code>accel_mods</code></em> for
this path. To change the accelerator during runtime programatically, use the
<a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-change-entry" title="gtk.accel_map_change_entry"><code class="function">gtk.accel_map_change_entry</code>()</a>
function. The accelerator path must consist of
"<WINDOWTYPE>/Category1/Category2/.../Action", where
<WINDOWTYPE> should be a unique application-specific identifier, that
corresponds to the kind of window the accelerator is being used in,
e.g. "Gimp-Image", "Abiword-Document" or "Gnumeric-Settings". The
Category1/.../Action portion is most appropriately chosen by the action the
accelerator triggers, i.e. for accelerators on menu items, choose the item's
menu path, e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All". So a
full valid accelerator path may look like:
"<Gimp-Toolbox>/File/Dialogs/Tool Options...".</p></div><div class="refsect2" title="gtk.accel_map_lookup_entry"><a name="function-gtk--accel-map-lookup-entry"></a><h3>gtk.accel_map_lookup_entry</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_lookup_entry</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accel_path</code></strong> :</span></p></td><td>a valid accelerator path</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2-tuple containing the keyval and modifier
mask corresponding to <em class="parameter"><code>accel_path</code></em> or
<code class="literal">None</code> if not valid</td></tr></tbody></table><p>The <code class="function">gtk.accel_map_lookup_entry</code>() function
returns a 2-tuple containing the keyval and modifier mask corresponding to
the accelerator path specified by <em class="parameter"><code>accel_path</code></em> or
<code class="literal">None</code> if <em class="parameter"><code>accel_path</code></em> is not a valid
accelerator path.</p><p>The accelerator path must consist of
"<WINDOWTYPE>/Category1/Category2/.../Action", where <WINDOWTYPE> should be
a unique application-specific identifier, that corresponds to the kind of
window the accelerator is being used in, e.g. "Gimp-Image",
"Abiword-Document" or "Gnumeric-Settings". The Category1/.../Action portion
is most appropriately chosen by the action the accelerator triggers, i.e.
for accelerators on menu items, choose the item's menu path, e.g. "File/Save
As", "Image/View/Zoom" or "Edit/Select All". So a full valid accelerator
path may look like: "<Gimp-Toolbox>/File/Dialogs/Tool Options...".</p></div><div class="refsect2" title="gtk.accel_map_change_entry"><a name="function-gtk--accel-map-change-entry"></a><h3>gtk.accel_map_change_entry</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_change_entry</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_key</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_mods</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>replace</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accel_path</code></strong> :</span></p></td><td>a valid accelerator path</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>accel_key</code></strong> :</span></p></td><td> the new accelerator key</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>accel_mods</code></strong> :</span></p></td><td> the new accelerator
modifiers</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>replace</code></strong> :</span></p></td><td>if <code class="literal">True</code> other accelerators
may be deleted if conflicting</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the accelerator
could be changed</td></tr></tbody></table><p>The <code class="function">gtk.accel_map_change_entry</code>() function
changes the keyval and modifier mask currently associated with the
accelerator path specified by <em class="parameter"><code>accel_path</code></em> to the
values specified by <em class="parameter"><code>accel_key</code></em> and
<em class="parameter"><code>accel_mods</code></em> respectively. Due to conflicts with other
accelerators, a change may not always be possible. If
<em class="parameter"><code>replace</code></em> is <code class="literal">True</code> the other
accelerators may be deleted to resolve such conflicts. A change will only
occur if all conflicts could be resolved (which might not be the case if
conflicting accelerators are locked). Successful changes are indicated by a
<code class="literal">True</code> return value.</p></div><div class="refsect2" title="gtk.accel_map_foreach"><a name="function-gtk--accel-map-foreach"></a><h3>gtk.accel_map_foreach</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_foreach</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreach_func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>foreach_func</code></strong> :</span></p></td><td>function to be executed for each accel map
entry which is not filtered out</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>data to be passed into
<em class="parameter"><code>foreach_func</code></em></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>Loops over the entries in the accelerator map whose accel path
doesn't match any of the filters added with the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-add-filter" title="gtk.accel_map_add_filter"><code class="function">gtk.accel_map_add_filter</code>()</a>
function, and executes <em class="parameter"><code>foreach_func</code></em> on
each. The signature of <em class="parameter"><code>foreach_func</code></em> is:</p><pre class="programlisting">
def foreach_func(accel_path, accel_key, accel_mode, changed, user_data):
</pre><p>where <em class="parameter"><code>accel_path</code></em>,
<em class="parameter"><code>accel_key</code></em> and <em class="parameter"><code>accel_mode</code></em>
describe the accel map accelerator entry and the
<em class="parameter"><code>changed</code></em> parameter indicates whether this
accelerator was changed during runtime ( and thus, would need saving
during an accelerator map dump). <em class="parameter"><code>user_data</code></em> is
<em class="parameter"><code>data</code></em> if <em class="parameter"><code>data</code></em> was
specified. See the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-add-entry" title="gtk.accel_map_add_entry"><code class="function">gtk.accel_map_add_entry</code>()</a>
function for more information.</p></div><div class="refsect2" title="gtk.accel_map_foreach_unfiltered"><a name="function-gtk--accel-map-foreach-unfiltered"></a><h3>gtk.accel_map_foreach_unfiltered</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_foreach_unfiltered</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreach_func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>foreach_func</code></strong> :</span></p></td><td>function to be executed for each accel map
entry</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>data to be passed into
<em class="parameter"><code>foreach_func</code></em></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>Loops over all entries in the accelerator map, and executes
<em class="parameter"><code>foreach_func</code></em> on each. The signature of
<em class="parameter"><code>foreach_func</code></em> is:</p><pre class="programlisting">
def foreach_func(accel_path, accel_key, accel_mode, changed, user_data):
</pre><p>where <em class="parameter"><code>accel_path</code></em>,
<em class="parameter"><code>accel_key</code></em> and <em class="parameter"><code>accel_mode</code></em>
describe the accel map accelerator entry and the
<em class="parameter"><code>changed</code></em> parameter indicates whether this
accelerator was changed during runtime (thus, would need saving during
an accelerator map dump). <em class="parameter"><code>user_data</code></em> is
<em class="parameter"><code>data</code></em> if <em class="parameter"><code>data</code></em> was
specified. See the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-add-entry" title="gtk.accel_map_add_entry"><code class="function">gtk.accel_map_add_entry</code>()</a>
function for more information.</p></div><div class="refsect2" title="gtk.accel_map_get"><a name="function-gtk--accel-map-get"></a><h3>gtk.accel_map_get</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_get</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the global <a class="link" href="class-gtkaccelmap.html" title="gtk.AccelMap"><code class="classname">gtk.AccelMap</code></a>
object</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>Gets the singleton global <a class="link" href="class-gtkaccelmap.html" title="gtk.AccelMap"><code class="classname">gtk.AccelMap</code></a>
object. This object is useful only for notification of changes to the
accelerator map via the "changed" signal. it has no methods or
properties.</p></div><div class="refsect2" title="gtk.accel_map_load"><a name="function-gtk--accel-map-load"></a><h3>gtk.accel_map_load</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_load</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>file_name</code></strong> :</span></p></td><td>the file containing accelerator
specifications</td></tr></tbody></table><p>The <code class="function">gtk.accel_map_load</code>() function parses
the file (specified by <em class="parameter"><code>file_name</code></em>) previously saved
with the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-save" title="gtk.accel_map_save"><code class="function">gtk.accel_map_save</code>()</a>
function for accelerator specifications, and propagates them
accordingly.</p></div><div class="refsect2" title="gtk.accel_map_save"><a name="function-gtk--accel-map-save"></a><h3>gtk.accel_map_save</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_save</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>file_name</code></strong> :</span></p></td><td>the file to save the accelerator specifications
in</td></tr></tbody></table><p>The <code class="function">gtk.accel_map_save</code>() function saves
current accelerator specifications (accelerator path, key and modifiers) to
the file specified by <em class="parameter"><code>file_name</code></em>. The file is written
in a format suitable to be read back in by the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-load" title="gtk.accel_map_load"><code class="function">gtk.accel_map_load</code>()</a>
function.</p></div><div class="refsect2" title="gtk.accel_map_load_fd"><a name="function-gtk--accel-map-load-fd"></a><h3>gtk.accel_map_load_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_load_fd</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>fd</code></strong> :</span></p></td><td>a Python file object or an integer file
descriptor</td></tr></tbody></table><p>The <code class="function">gtk.accel_map_load_fd</code>() function loads
the accelerator map from the open Python file object specified by
<em class="parameter"><code>fd</code></em>. <em class="parameter"><code>fd</code></em> may also be an integer
file descriptor. See the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-load" title="gtk.accel_map_load"><code class="function">gtk.accel_map_load</code>()</a>
function.</p></div><div class="refsect2" title="gtk.accel_map_save_fd"><a name="function-gtk--accel-map-save-fd"></a><h3>gtk.accel_map_save_fd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_save_fd</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>fd</code></strong> :</span></p></td><td>a Python file object or an integer file
descriptor</td></tr></tbody></table><p>The <code class="function">gtk.accel_map_save_fd</code>() function saves
the accelerator map into the open Python file object specified by fd.
<em class="parameter"><code>fd</code></em> may also be an integer file descriptor. See the
<a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-save" title="gtk.accel_map_save"><code class="function">gtk.accel_map_save</code>()</a>
function.</p></div><div class="refsect2" title="gtk.accel_map_lock_path"><a name="function-gtk--accel-map-lock-path"></a><h3>gtk.accel_map_lock_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_lock_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accel_path</code></strong> :</span></p></td><td>a valid accelerator path</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">gtk.accel_map_lock_path</code>() function
locks the accelerator path specified by
<em class="parameter"><code>accel_path</code></em>. If the accelerator map doesn't yet
contain an entry for <em class="parameter"><code>accel_path</code></em>, a new one is
created.</p><p>Locking an accelerator path prevents its accelerator from being
changed during runtime. A locked accelerator path can be unlocked by
the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-unlock-path" title="gtk.accel_map_unlock_path"><code class="function">gtk.accel_map_unlock_path</code>()</a>
function. Refer to the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-change-entry" title="gtk.accel_map_change_entry"><code class="function">gtk.accel_map_change_entry</code>()</a>
function for information about runtime accelerator changes.</p><p>If called more than once, <em class="parameter"><code>accel_path</code></em>
remains locked until the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-unlock-path" title="gtk.accel_map_unlock_path"><code class="function">gtk.accel_map_unlock_path</code>()</a>
function has been called an equivalent number of times.</p><p>Note that locking of individual accelerator paths is independent
from locking the <a class="link" href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</code></a>
containing them. For runtime accelerator changes to be possible both
the accelerator path and its <a class="link" href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</code></a>
have to be unlocked.</p></div><div class="refsect2" title="gtk.accel_map_unlock_path"><a name="function-gtk--accel-map-unlock-path"></a><h3>gtk.accel_map_unlock_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_unlock_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accel_path</code></strong> :</span></p></td><td>a valid accelerator path</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">gtk.accel_map_unlock_path</code>() function
undoes the last call to the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-lock-path" title="gtk.accel_map_lock_path"><code class="function">gtk.accel_map_lock_path</code>()</a>
function on the accelerator path specified by
<em class="parameter"><code>accel_path</code></em>. Refer to the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-lock-path" title="gtk.accel_map_lock_path"><code class="function">gtk.accel_map_lock_path</code>()</a>
function for information about accelerator path locking.</p></div><div class="refsect2" title="gtk.accel_map_add_filter"><a name="function-gtk--accel-map-add-filter"></a><h3>gtk.accel_map_add_filter</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.accel_map_add_filter</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_pattern</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>filter_pattern</code></strong> :</span></p></td><td>a glob-style pattern</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><p>The <code class="function">gtk.accel_map_add_filter</code>() function
adds the filter pattern specified by
<em class="parameter"><code>filter_pattern</code></em> to the global list of accel path
filters. The pattern specified by
<em class="parameter"><code>filter_pattern</code></em> contain '*' and '?' wildcards
with similar semantics as the Python <code class="filename">glob.py</code> and
<code class="filename">fnmatch.py</code> modules: '*' matches an arbitrary,
possibly empty, string, '?' matches an arbitrary character. Note that
in contrast to <code class="filename">glob.py</code>, the '/' character can be
matched by the wildcards, there are no '[...]' character ranges and
'*' and '?' can not be escaped to include them literally in a
pattern. Accelerator map entries whose accelerator path matches one of
the filters are skipped by the <a class="link" href="class-gtkaccelmap.html#function-gtk--accel-map-foreach" title="gtk.accel_map_foreach"><code class="function">gtk.accel_map_foreach</code>()</a>
function. This function is intended for <code class="literal">PyGTK</code>
modules that create their own menus, but don't want them to be saved
into the applications accelerator map dump.</p></div></div><div class="refsect1" title="Signals"><a name="id3007367"></a><h2>Signals</h2><div class="refsect2" title='The "changed" gtk.AccelMap Signal'><a name="signal-gtkaccelmap--changed"></a><h3>The "changed" gtk.AccelMap Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>object</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>accel_path</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>accel_key</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>accel_mods</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td><td>the global accel map object</td></tr><tr><td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td><td>the path of the accelerator that
changed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>accel_key</code></em> :</span></p></td><td>the key value for the new
accelerator</td></tr><tr><td><p><span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></p></td><td>the modifier mask for the new
accelerator</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This signal is available in GTK+ 2.4 and above.</p></div><p>Notifies of a change in the global accelerator map. The path is
also used as the detail for the signal, so it is possible to connect
to changed::<em class="replaceable"><code>accel_path</code></em>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkaccellabel.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkaccessible.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.AccelLabel </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Accessible</td></tr></table></div></body></html>
|