1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Accelerator Maps</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
8
<link rel="up" href="gtkbase.html" title="Part II. GTK+ Core Reference">
9
<link rel="prev" href="gtk2-Keyboard-Accelerators.html" title="Accelerator Groups">
10
<link rel="next" href="gtk2-Clipboards.html" title="Clipboards">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="gtk2-Keyboard-Accelerators.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="gtkbase.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
21
<td><a accesskey="n" href="gtk2-Clipboards.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#gtk2-Accelerator-Maps.synopsis" class="shortcut">Top</a>
26
<a href="#gtk2-Accelerator-Maps.description" class="shortcut">Description</a>
28
<a href="#gtk2-Accelerator-Maps.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#gtk2-Accelerator-Maps.signals" class="shortcut">Signals</a>
33
<div class="refentry">
34
<a name="gtk2-Accelerator-Maps"></a><div class="titlepage"></div>
35
<div class="refnamediv"><table width="100%"><tr>
37
<h2><span class="refentrytitle"><a name="gtk2-Accelerator-Maps.top_of_page"></a>Accelerator Maps</span></h2>
38
<p>Accelerator Maps — Loadable keyboard accelerator specifications</p>
40
<td valign="top" align="right"></td>
42
<div class="refsynopsisdiv">
43
<a name="gtk2-Accelerator-Maps.synopsis"></a><h2>Synopsis</h2>
44
<a name="GtkAccelMap"></a><pre class="synopsis">
45
#include <gtk/gtk.h>
47
<a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap-struct" title="GtkAccelMap">GtkAccelMap</a>;
48
<span class="returnvalue">void</span> (<a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()">*GtkAccelMapForeach</a>) (<em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
49
<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>,
50
<em class="parameter"><code><span class="type">guint</span> accel_key</code></em>,
51
<em class="parameter"><code><a href="../gdk2/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
52
<em class="parameter"><code><span class="type">gboolean</span> changed</code></em>);
53
<span class="returnvalue">void</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-add-entry" title="gtk_accel_map_add_entry ()">gtk_accel_map_add_entry</a> (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>,
54
<em class="parameter"><code><span class="type">guint</span> accel_key</code></em>,
55
<em class="parameter"><code><a href="../gdk2/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>);
56
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-lookup-entry" title="gtk_accel_map_lookup_entry ()">gtk_accel_map_lookup_entry</a> (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>,
57
<em class="parameter"><code><a class="link" href="gtk2-Keyboard-Accelerators.html#GtkAccelKey" title="struct GtkAccelKey"><span class="type">GtkAccelKey</span></a> *key</code></em>);
58
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-change-entry" title="gtk_accel_map_change_entry ()">gtk_accel_map_change_entry</a> (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>,
59
<em class="parameter"><code><span class="type">guint</span> accel_key</code></em>,
60
<em class="parameter"><code><a href="../gdk2/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
61
<em class="parameter"><code><span class="type">gboolean</span> replace</code></em>);
62
#define <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-load" title="gtk_accel_map_load">gtk_accel_map_load</a>
63
#define <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-save" title="gtk_accel_map_save">gtk_accel_map_save</a>
64
<span class="returnvalue">void</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-foreach" title="gtk_accel_map_foreach ()">gtk_accel_map_foreach</a> (<em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
65
<em class="parameter"><code><a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()"><span class="type">GtkAccelMapForeach</span></a> foreach_func</code></em>);
66
<span class="returnvalue">void</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-load-fd" title="gtk_accel_map_load_fd ()">gtk_accel_map_load_fd</a> (<em class="parameter"><code><span class="type">gint</span> fd</code></em>);
67
<span class="returnvalue">void</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-save-fd" title="gtk_accel_map_save_fd ()">gtk_accel_map_save_fd</a> (<em class="parameter"><code><span class="type">gint</span> fd</code></em>);
68
<span class="returnvalue">void</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-load-scanner" title="gtk_accel_map_load_scanner ()">gtk_accel_map_load_scanner</a> (<em class="parameter"><code><span class="type">GScanner</span> *scanner</code></em>);
69
<span class="returnvalue">void</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-add-filter" title="gtk_accel_map_add_filter ()">gtk_accel_map_add_filter</a> (<em class="parameter"><code>const <span class="type">gchar</span> *filter_pattern</code></em>);
70
<span class="returnvalue">void</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-foreach-unfiltered" title="gtk_accel_map_foreach_unfiltered ()">gtk_accel_map_foreach_unfiltered</a> (<em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
71
<em class="parameter"><code><a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()"><span class="type">GtkAccelMapForeach</span></a> foreach_func</code></em>);
72
<a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap"><span class="returnvalue">GtkAccelMap</span></a> * <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-get" title="gtk_accel_map_get ()">gtk_accel_map_get</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
73
<span class="returnvalue">void</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-lock-path" title="gtk_accel_map_lock_path ()">gtk_accel_map_lock_path</a> (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>);
74
<span class="returnvalue">void</span> <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-unlock-path" title="gtk_accel_map_unlock_path ()">gtk_accel_map_unlock_path</a> (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>);
77
<div class="refsect1">
78
<a name="gtk2-Accelerator-Maps.object-hierarchy"></a><h2>Object Hierarchy</h2>
79
<pre class="synopsis">
84
<div class="refsect1">
85
<a name="gtk2-Accelerator-Maps.signals"></a><h2>Signals</h2>
86
<pre class="synopsis">
87
"<a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap-changed" title='The "changed" signal'>changed</a>" : <code class="literal">Has Details</code>
90
<div class="refsect1">
91
<a name="gtk2-Accelerator-Maps.description"></a><h2>Description</h2>
95
<div class="refsect1">
96
<a name="gtk2-Accelerator-Maps.details"></a><h2>Details</h2>
97
<div class="refsect2">
98
<a name="GtkAccelMap-struct"></a><h3>GtkAccelMap</h3>
99
<pre class="programlisting">typedef struct _GtkAccelMap GtkAccelMap;</pre>
104
<div class="refsect2">
105
<a name="GtkAccelMapForeach"></a><h3>GtkAccelMapForeach ()</h3>
106
<pre class="programlisting"><span class="returnvalue">void</span> (*GtkAccelMapForeach) (<em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
107
<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>,
108
<em class="parameter"><code><span class="type">guint</span> accel_key</code></em>,
109
<em class="parameter"><code><a href="../gdk2/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
110
<em class="parameter"><code><span class="type">gboolean</span> changed</code></em>);</pre>
115
<div class="refsect2">
116
<a name="gtk-accel-map-add-entry"></a><h3>gtk_accel_map_add_entry ()</h3>
117
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_map_add_entry (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>,
118
<em class="parameter"><code><span class="type">guint</span> accel_key</code></em>,
119
<em class="parameter"><code><a href="../gdk2/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>);</pre>
121
Registers a new accelerator with the global accelerator map.
122
This function should only be called once per <em class="parameter"><code>accel_path</code></em>
123
with the canonical <em class="parameter"><code>accel_key</code></em> and <em class="parameter"><code>accel_mods</code></em> for this path.
124
To change the accelerator during runtime programatically, use
125
<a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-change-entry" title="gtk_accel_map_change_entry ()"><code class="function">gtk_accel_map_change_entry()</code></a>.
126
The accelerator path must consist of "<WINDOWTYPE>/Category1/Category2/.../Action",
127
where <WINDOWTYPE> should be a unique application-specific identifier, that
128
corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image",
129
"Abiword-Document" or "Gnumeric-Settings".
130
The Category1/.../Action portion is most appropriately chosen by the action the
131
accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path,
132
e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All".
133
So a full valid accelerator path may look like:
134
"<Gimp-Toolbox>/File/Dialogs/Tool Options...".
137
Note that <em class="parameter"><code>accel_path</code></em> string will be stored in a <span class="type">GQuark</span>. Therefore, if you
138
pass a static string, you can save some memory by interning it first with
139
<code class="function">g_intern_static_string()</code>.
141
<div class="variablelist"><table border="0" class="variablelist">
143
<col align="left" valign="top">
148
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
149
<td>valid accelerator path</td>
152
<td><p><span class="term"><em class="parameter"><code>accel_key</code></em> :</span></p></td>
153
<td>the accelerator key</td>
156
<td><p><span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></p></td>
157
<td>the accelerator modifiers</td>
163
<div class="refsect2">
164
<a name="gtk-accel-map-lookup-entry"></a><h3>gtk_accel_map_lookup_entry ()</h3>
165
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_accel_map_lookup_entry (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>,
166
<em class="parameter"><code><a class="link" href="gtk2-Keyboard-Accelerators.html#GtkAccelKey" title="struct GtkAccelKey"><span class="type">GtkAccelKey</span></a> *key</code></em>);</pre>
168
Looks up the accelerator entry for <em class="parameter"><code>accel_path</code></em> and fills in <em class="parameter"><code>key</code></em>.
170
<div class="variablelist"><table border="0" class="variablelist">
172
<col align="left" valign="top">
177
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
178
<td>a valid accelerator path</td>
181
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
182
<td>the accelerator key to be filled in (optional)</td>
185
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
187
<code class="literal">TRUE</code> if <em class="parameter"><code>accel_path</code></em> is known, <code class="literal">FALSE</code> otherwise</td>
193
<div class="refsect2">
194
<a name="gtk-accel-map-change-entry"></a><h3>gtk_accel_map_change_entry ()</h3>
195
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_accel_map_change_entry (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>,
196
<em class="parameter"><code><span class="type">guint</span> accel_key</code></em>,
197
<em class="parameter"><code><a href="../gdk2/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
198
<em class="parameter"><code><span class="type">gboolean</span> replace</code></em>);</pre>
200
Changes the <em class="parameter"><code>accel_key</code></em> and <em class="parameter"><code>accel_mods</code></em> currently associated with <em class="parameter"><code>accel_path</code></em>.
201
Due to conflicts with other accelerators, a change may not always be possible,
202
<em class="parameter"><code>replace</code></em> indicates whether other accelerators may be deleted to resolve such
203
conflicts. A change will only occur if all conflicts could be resolved (which
204
might not be the case if conflicting accelerators are locked). Successful
205
changes are indicated by a <code class="literal">TRUE</code> return value.
208
Note that <em class="parameter"><code>accel_path</code></em> string will be stored in a <span class="type">GQuark</span>. Therefore, if you
209
pass a static string, you can save some memory by interning it first with
210
<code class="function">g_intern_static_string()</code>.
212
<div class="variablelist"><table border="0" class="variablelist">
214
<col align="left" valign="top">
219
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
220
<td>a valid accelerator path</td>
223
<td><p><span class="term"><em class="parameter"><code>accel_key</code></em> :</span></p></td>
224
<td>the new accelerator key</td>
227
<td><p><span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></p></td>
228
<td>the new accelerator modifiers</td>
231
<td><p><span class="term"><em class="parameter"><code>replace</code></em> :</span></p></td>
233
<code class="literal">TRUE</code> if other accelerators may be deleted upon conflicts</td>
236
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
238
<code class="literal">TRUE</code> if the accelerator could be changed, <code class="literal">FALSE</code> otherwise</td>
244
<div class="refsect2">
245
<a name="gtk-accel-map-load"></a><h3>gtk_accel_map_load</h3>
246
<pre class="programlisting">#define gtk_accel_map_load gtk_accel_map_load_utf8
249
Parses a file previously saved with <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-save" title="gtk_accel_map_save"><code class="function">gtk_accel_map_save()</code></a> for
250
accelerator specifications, and propagates them accordingly.
252
<div class="variablelist"><table border="0" class="variablelist">
254
<col align="left" valign="top">
258
<td><p><span class="term"><em class="parameter"><code>file_name</code></em> :</span></p></td>
259
<td>a file containing accelerator specifications,
260
in the GLib file name encoding</td>
265
<div class="refsect2">
266
<a name="gtk-accel-map-save"></a><h3>gtk_accel_map_save</h3>
267
<pre class="programlisting">#define gtk_accel_map_save gtk_accel_map_save_utf8
270
Saves current accelerator specifications (accelerator path, key
271
and modifiers) to <em class="parameter"><code>file_name</code></em>.
272
The file is written in a format suitable to be read back in by
273
<a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-load" title="gtk_accel_map_load"><code class="function">gtk_accel_map_load()</code></a>.
275
<div class="variablelist"><table border="0" class="variablelist">
277
<col align="left" valign="top">
281
<td><p><span class="term"><em class="parameter"><code>file_name</code></em> :</span></p></td>
282
<td>the name of the file to contain accelerator specifications,
283
in the GLib file name encoding</td>
288
<div class="refsect2">
289
<a name="gtk-accel-map-foreach"></a><h3>gtk_accel_map_foreach ()</h3>
290
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_map_foreach (<em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
291
<em class="parameter"><code><a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()"><span class="type">GtkAccelMapForeach</span></a> foreach_func</code></em>);</pre>
293
Loops over the entries in the accelerator map whose accel path
294
doesn't match any of the filters added with <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-add-filter" title="gtk_accel_map_add_filter ()"><code class="function">gtk_accel_map_add_filter()</code></a>,
295
and execute <em class="parameter"><code>foreach_func</code></em> on each. The signature of <em class="parameter"><code>foreach_func</code></em> is
296
that of <a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()"><span class="type">GtkAccelMapForeach</span></a>, the <em class="parameter"><code>changed</code></em> parameter indicates whether
297
this accelerator was changed during runtime (thus, would need
298
saving during an accelerator map dump).
300
<div class="variablelist"><table border="0" class="variablelist">
302
<col align="left" valign="top">
307
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
308
<td>data to be passed into <em class="parameter"><code>foreach_func</code></em>
312
<td><p><span class="term"><em class="parameter"><code>foreach_func</code></em> :</span></p></td>
313
<td>function to be executed for each accel map entry which
314
is not filtered out</td>
320
<div class="refsect2">
321
<a name="gtk-accel-map-load-fd"></a><h3>gtk_accel_map_load_fd ()</h3>
322
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_map_load_fd (<em class="parameter"><code><span class="type">gint</span> fd</code></em>);</pre>
324
Filedescriptor variant of <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-load" title="gtk_accel_map_load"><code class="function">gtk_accel_map_load()</code></a>.
327
Note that the file descriptor will not be closed by this function.
329
<div class="variablelist"><table border="0" class="variablelist">
331
<col align="left" valign="top">
335
<td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td>
336
<td>a valid readable file descriptor</td>
341
<div class="refsect2">
342
<a name="gtk-accel-map-save-fd"></a><h3>gtk_accel_map_save_fd ()</h3>
343
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_map_save_fd (<em class="parameter"><code><span class="type">gint</span> fd</code></em>);</pre>
345
Filedescriptor variant of <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-save" title="gtk_accel_map_save"><code class="function">gtk_accel_map_save()</code></a>.
348
Note that the file descriptor will not be closed by this function.
350
<div class="variablelist"><table border="0" class="variablelist">
352
<col align="left" valign="top">
356
<td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td>
357
<td>a valid writable file descriptor</td>
362
<div class="refsect2">
363
<a name="gtk-accel-map-load-scanner"></a><h3>gtk_accel_map_load_scanner ()</h3>
364
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_map_load_scanner (<em class="parameter"><code><span class="type">GScanner</span> *scanner</code></em>);</pre>
366
<span class="type">GScanner</span> variant of <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-load" title="gtk_accel_map_load"><code class="function">gtk_accel_map_load()</code></a>.
368
<div class="variablelist"><table border="0" class="variablelist">
370
<col align="left" valign="top">
374
<td><p><span class="term"><em class="parameter"><code>scanner</code></em> :</span></p></td>
375
<td>a <span class="type">GScanner</span> which has already been provided with an input file</td>
380
<div class="refsect2">
381
<a name="gtk-accel-map-add-filter"></a><h3>gtk_accel_map_add_filter ()</h3>
382
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_map_add_filter (<em class="parameter"><code>const <span class="type">gchar</span> *filter_pattern</code></em>);</pre>
384
Adds a filter to the global list of accel path filters.
387
Accel map entries whose accel path matches one of the filters
388
are skipped by <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-foreach" title="gtk_accel_map_foreach ()"><code class="function">gtk_accel_map_foreach()</code></a>.
391
This function is intended for GTK+ modules that create their own
392
menus, but don't want them to be saved into the applications accelerator
395
<div class="variablelist"><table border="0" class="variablelist">
397
<col align="left" valign="top">
401
<td><p><span class="term"><em class="parameter"><code>filter_pattern</code></em> :</span></p></td>
402
<td>a pattern (see <span class="type">GPatternSpec</span>)</td>
407
<div class="refsect2">
408
<a name="gtk-accel-map-foreach-unfiltered"></a><h3>gtk_accel_map_foreach_unfiltered ()</h3>
409
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_map_foreach_unfiltered (<em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
410
<em class="parameter"><code><a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()"><span class="type">GtkAccelMapForeach</span></a> foreach_func</code></em>);</pre>
412
Loops over all entries in the accelerator map, and execute
413
<em class="parameter"><code>foreach_func</code></em> on each. The signature of <em class="parameter"><code>foreach_func</code></em> is that of
414
<a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()"><span class="type">GtkAccelMapForeach</span></a>, the <em class="parameter"><code>changed</code></em> parameter indicates whether
415
this accelerator was changed during runtime (thus, would need
416
saving during an accelerator map dump).
418
<div class="variablelist"><table border="0" class="variablelist">
420
<col align="left" valign="top">
425
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
426
<td>data to be passed into <em class="parameter"><code>foreach_func</code></em>
430
<td><p><span class="term"><em class="parameter"><code>foreach_func</code></em> :</span></p></td>
431
<td>function to be executed for each accel map entry</td>
437
<div class="refsect2">
438
<a name="gtk-accel-map-get"></a><h3>gtk_accel_map_get ()</h3>
439
<pre class="programlisting"><a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap"><span class="returnvalue">GtkAccelMap</span></a> * gtk_accel_map_get (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
441
Gets the singleton global <a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap"><span class="type">GtkAccelMap</span></a> object. This object
442
is useful only for notification of changes to the accelerator
443
map via the ::changed signal; it isn't a parameter to the
444
other accelerator map functions.
446
<div class="variablelist"><table border="0" class="variablelist">
448
<col align="left" valign="top">
452
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
453
<td>the global <a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap"><span class="type">GtkAccelMap</span></a> object</td>
456
<p class="since">Since 2.4</p>
459
<div class="refsect2">
460
<a name="gtk-accel-map-lock-path"></a><h3>gtk_accel_map_lock_path ()</h3>
461
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_map_lock_path (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>);</pre>
463
Locks the given accelerator path. If the accelerator map doesn't yet contain
464
an entry for <em class="parameter"><code>accel_path</code></em>, a new one is created.
467
Locking an accelerator path prevents its accelerator from being changed
468
during runtime. A locked accelerator path can be unlocked by
469
<a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-unlock-path" title="gtk_accel_map_unlock_path ()"><code class="function">gtk_accel_map_unlock_path()</code></a>. Refer to <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-change-entry" title="gtk_accel_map_change_entry ()"><code class="function">gtk_accel_map_change_entry()</code></a>
470
for information about runtime accelerator changes.
473
If called more than once, <em class="parameter"><code>accel_path</code></em> remains locked until
474
<a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-unlock-path" title="gtk_accel_map_unlock_path ()"><code class="function">gtk_accel_map_unlock_path()</code></a> has been called an equivalent number
478
Note that locking of individual accelerator paths is independent from
479
locking the <a class="link" href="gtk2-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> containing them. For runtime accelerator
480
changes to be possible both the accelerator path and its <a class="link" href="gtk2-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>
483
<div class="variablelist"><table border="0" class="variablelist">
485
<col align="left" valign="top">
489
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
490
<td>a valid accelerator path</td>
493
<p class="since">Since 2.4</p>
496
<div class="refsect2">
497
<a name="gtk-accel-map-unlock-path"></a><h3>gtk_accel_map_unlock_path ()</h3>
498
<pre class="programlisting"><span class="returnvalue">void</span> gtk_accel_map_unlock_path (<em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>);</pre>
500
Undoes the last call to <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-lock-path" title="gtk_accel_map_lock_path ()"><code class="function">gtk_accel_map_lock_path()</code></a> on this <em class="parameter"><code>accel_path</code></em>.
501
Refer to <a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-lock-path" title="gtk_accel_map_lock_path ()"><code class="function">gtk_accel_map_lock_path()</code></a> for information about accelerator path locking.
503
<div class="variablelist"><table border="0" class="variablelist">
505
<col align="left" valign="top">
509
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
510
<td>a valid accelerator path</td>
513
<p class="since">Since 2.4</p>
516
<div class="refsect1">
517
<a name="gtk2-Accelerator-Maps.signal-details"></a><h2>Signal Details</h2>
518
<div class="refsect2">
519
<a name="GtkAccelMap-changed"></a><h3>The <code class="literal">"changed"</code> signal</h3>
520
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap"><span class="type">GtkAccelMap</span></a> *object,
521
<span class="type">gchar</span> *accel_path,
522
<span class="type">guint</span> accel_key,
523
<a href="../gdk2/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods,
524
<span class="type">gpointer</span> user_data) : <code class="literal">Has Details</code></pre>
526
Notifies of a change in the global accelerator map.
527
The path is also used as the detail for the signal,
528
so it is possible to connect to
529
changed::<em class="replaceable"><code>accel_path</code></em>.
531
<div class="variablelist"><table border="0" class="variablelist">
533
<col align="left" valign="top">
538
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
539
<td>the global accel map object</td>
542
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
543
<td>the path of the accelerator that changed</td>
546
<td><p><span class="term"><em class="parameter"><code>accel_key</code></em> :</span></p></td>
547
<td>the key value for the new accelerator</td>
550
<td><p><span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></p></td>
551
<td>the modifier mask for the new accelerator</td>
554
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
555
<td>user data set when the signal handler was connected.</td>
559
<p class="since">Since 2.4</p>
565
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'