~ubuntu-branches/ubuntu/raring/gtk+2.0/raring-proposed

« back to all changes in this revision

Viewing changes to docs/reference/gtk/html/gtk-Accelerator-Maps.html

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2013-01-10 12:53:20 UTC
  • mfrom: (1.14.16)
  • Revision ID: package-import@ubuntu.com-20130110125320-x13bjpwtqq36izs2
Tags: 2.24.14-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
 
<html>
3
 
<head>
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="gtk-Keyboard-Accelerators.html" title="Accelerator Groups">
10
 
<link rel="next" href="gtk-Clipboards.html" title="Clipboards">
11
 
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12
 
<link rel="stylesheet" href="style.css" type="text/css">
13
 
</head>
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">
16
 
<tr valign="middle">
17
 
<td><a accesskey="p" href="gtk-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="gtk-Clipboards.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22
 
</tr>
23
 
<tr><td colspan="5" class="shortcuts">
24
 
<a href="#gtk-Accelerator-Maps.synopsis" class="shortcut">Top</a>
25
 
                   | 
26
 
                  <a href="#gtk-Accelerator-Maps.description" class="shortcut">Description</a>
27
 
                   | 
28
 
                  <a href="#gtk-Accelerator-Maps.object-hierarchy" class="shortcut">Object Hierarchy</a>
29
 
                   | 
30
 
                  <a href="#gtk-Accelerator-Maps.signals" class="shortcut">Signals</a>
31
 
</td></tr>
32
 
</table>
33
 
<div class="refentry">
34
 
<a name="gtk-Accelerator-Maps"></a><div class="titlepage"></div>
35
 
<div class="refnamediv"><table width="100%"><tr>
36
 
<td valign="top">
37
 
<h2><span class="refentrytitle"><a name="gtk-Accelerator-Maps.top_of_page"></a>Accelerator Maps</span></h2>
38
 
<p>Accelerator Maps — Loadable keyboard accelerator specifications</p>
39
 
</td>
40
 
<td valign="top" align="right"></td>
41
 
</tr></table></div>
42
 
<div class="refsynopsisdiv">
43
 
<a name="gtk-Accelerator-Maps.synopsis"></a><h2>Synopsis</h2>
44
 
<a name="GtkAccelMap"></a><pre class="synopsis">
45
 
#include &lt;gtk/gtk.h&gt;
46
 
 
47
 
                    <a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMap-struct" title="GtkAccelMap">GtkAccelMap</a>;
48
 
<span class="returnvalue">void</span>                (<a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()">*GtkAccelMapForeach</a>)               (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
49
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>,
50
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> accel_key</code></em>,
51
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
52
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> changed</code></em>);
53
 
<span class="returnvalue">void</span>                <a class="link" href="gtk-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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>,
54
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> accel_key</code></em>,
55
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>);
56
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk-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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>,
57
 
                                                         <em class="parameter"><code><a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelKey" title="struct GtkAccelKey"><span class="type">GtkAccelKey</span></a> *key</code></em>);
58
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk-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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>,
59
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> accel_key</code></em>,
60
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
61
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> replace</code></em>);
62
 
#define             <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-load" title="gtk_accel_map_load">gtk_accel_map_load</a>
63
 
#define             <a class="link" href="gtk-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="gtk-Accelerator-Maps.html#gtk-accel-map-foreach" title="gtk_accel_map_foreach ()">gtk_accel_map_foreach</a>               (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
65
 
                                                         <em class="parameter"><code><a class="link" href="gtk-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="gtk-Accelerator-Maps.html#gtk-accel-map-load-fd" title="gtk_accel_map_load_fd ()">gtk_accel_map_load_fd</a>               (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd</code></em>);
67
 
<span class="returnvalue">void</span>                <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-save-fd" title="gtk_accel_map_save_fd ()">gtk_accel_map_save_fd</a>               (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd</code></em>);
68
 
<span class="returnvalue">void</span>                <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-load-scanner" title="gtk_accel_map_load_scanner ()">gtk_accel_map_load_scanner</a>          (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> *scanner</code></em>);
69
 
<span class="returnvalue">void</span>                <a class="link" href="gtk-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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filter_pattern</code></em>);
70
 
<span class="returnvalue">void</span>                <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-foreach-unfiltered" title="gtk_accel_map_foreach_unfiltered ()">gtk_accel_map_foreach_unfiltered</a>    (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
71
 
                                                         <em class="parameter"><code><a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()"><span class="type">GtkAccelMapForeach</span></a> foreach_func</code></em>);
72
 
<a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMap"><span class="returnvalue">GtkAccelMap</span></a> *       <a class="link" href="gtk-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="gtk-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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>);
74
 
<span class="returnvalue">void</span>                <a class="link" href="gtk-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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>);
75
 
</pre>
76
 
</div>
77
 
<div class="refsect1">
78
 
<a name="gtk-Accelerator-Maps.object-hierarchy"></a><h2>Object Hierarchy</h2>
79
 
<pre class="synopsis">
80
 
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
81
 
   +----GtkAccelMap
82
 
</pre>
83
 
</div>
84
 
<div class="refsect1">
85
 
<a name="gtk-Accelerator-Maps.signals"></a><h2>Signals</h2>
86
 
<pre class="synopsis">
87
 
  "<a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMap-changed" title='The "changed" signal'>changed</a>"                                        : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-DETAILED:CAPS"><code class="literal">Has Details</code></a>
88
 
</pre>
89
 
</div>
90
 
<div class="refsect1">
91
 
<a name="gtk-Accelerator-Maps.description"></a><h2>Description</h2>
92
 
<p>
93
 
</p>
94
 
</div>
95
 
<div class="refsect1">
96
 
<a name="gtk-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>
100
 
<p>
101
 
</p>
102
 
</div>
103
 
<hr>
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><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
107
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>,
108
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> accel_key</code></em>,
109
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
110
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> changed</code></em>);</pre>
111
 
<p>
112
 
</p>
113
 
</div>
114
 
<hr>
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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>,
118
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> accel_key</code></em>,
119
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>);</pre>
120
 
<p>
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="gtk-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 "&lt;WINDOWTYPE&gt;/Category1/Category2/.../Action",
127
 
where &lt;WINDOWTYPE&gt; 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
 
"&lt;Gimp-Toolbox&gt;/File/Dialogs/Tool Options...".
135
 
</p>
136
 
<p>
137
 
Note that <em class="parameter"><code>accel_path</code></em> string will be stored in a <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>. Therefore, if you
138
 
pass a static string, you can save some memory by interning it first with 
139
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#g-intern-static-string"><code class="function">g_intern_static_string()</code></a>.
140
 
</p>
141
 
<div class="variablelist"><table border="0" class="variablelist">
142
 
<colgroup>
143
 
<col align="left" valign="top">
144
 
<col>
145
 
</colgroup>
146
 
<tbody>
147
 
<tr>
148
 
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
149
 
<td>valid accelerator path</td>
150
 
</tr>
151
 
<tr>
152
 
<td><p><span class="term"><em class="parameter"><code>accel_key</code></em> :</span></p></td>
153
 
<td>the accelerator key</td>
154
 
</tr>
155
 
<tr>
156
 
<td><p><span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></p></td>
157
 
<td>the accelerator modifiers</td>
158
 
</tr>
159
 
</tbody>
160
 
</table></div>
161
 
</div>
162
 
<hr>
163
 
<div class="refsect2">
164
 
<a name="gtk-accel-map-lookup-entry"></a><h3>gtk_accel_map_lookup_entry ()</h3>
165
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_accel_map_lookup_entry          (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>,
166
 
                                                         <em class="parameter"><code><a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelKey" title="struct GtkAccelKey"><span class="type">GtkAccelKey</span></a> *key</code></em>);</pre>
167
 
<p>
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>.
169
 
</p>
170
 
<div class="variablelist"><table border="0" class="variablelist">
171
 
<colgroup>
172
 
<col align="left" valign="top">
173
 
<col>
174
 
</colgroup>
175
 
<tbody>
176
 
<tr>
177
 
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
178
 
<td>a valid accelerator path</td>
179
 
</tr>
180
 
<tr>
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>
183
 
</tr>
184
 
<tr>
185
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
186
 
<td>
187
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>accel_path</code></em> is known, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
188
 
</tr>
189
 
</tbody>
190
 
</table></div>
191
 
</div>
192
 
<hr>
193
 
<div class="refsect2">
194
 
<a name="gtk-accel-map-change-entry"></a><h3>gtk_accel_map_change_entry ()</h3>
195
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_accel_map_change_entry          (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>,
196
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> accel_key</code></em>,
197
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk3/gdk-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
198
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> replace</code></em>);</pre>
199
 
<p>
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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> return value.
206
 
</p>
207
 
<p>
208
 
Note that <em class="parameter"><code>accel_path</code></em> string will be stored in a <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>. Therefore, if you
209
 
pass a static string, you can save some memory by interning it first with 
210
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#g-intern-static-string"><code class="function">g_intern_static_string()</code></a>.
211
 
</p>
212
 
<div class="variablelist"><table border="0" class="variablelist">
213
 
<colgroup>
214
 
<col align="left" valign="top">
215
 
<col>
216
 
</colgroup>
217
 
<tbody>
218
 
<tr>
219
 
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
220
 
<td>a valid accelerator path</td>
221
 
</tr>
222
 
<tr>
223
 
<td><p><span class="term"><em class="parameter"><code>accel_key</code></em> :</span></p></td>
224
 
<td>the new accelerator key</td>
225
 
</tr>
226
 
<tr>
227
 
<td><p><span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></p></td>
228
 
<td>the new accelerator modifiers</td>
229
 
</tr>
230
 
<tr>
231
 
<td><p><span class="term"><em class="parameter"><code>replace</code></em> :</span></p></td>
232
 
<td>
233
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if other accelerators may be deleted upon conflicts</td>
234
 
</tr>
235
 
<tr>
236
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
237
 
<td>
238
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the accelerator could be changed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
239
 
</tr>
240
 
</tbody>
241
 
</table></div>
242
 
</div>
243
 
<hr>
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
247
 
</pre>
248
 
<p>
249
 
Parses a file previously saved with <a class="link" href="gtk-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.
251
 
</p>
252
 
<div class="variablelist"><table border="0" class="variablelist">
253
 
<colgroup>
254
 
<col align="left" valign="top">
255
 
<col>
256
 
</colgroup>
257
 
<tbody><tr>
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>
261
 
</tr></tbody>
262
 
</table></div>
263
 
</div>
264
 
<hr>
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
268
 
</pre>
269
 
<p>
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="gtk-Accelerator-Maps.html#gtk-accel-map-load" title="gtk_accel_map_load"><code class="function">gtk_accel_map_load()</code></a>.
274
 
</p>
275
 
<div class="variablelist"><table border="0" class="variablelist">
276
 
<colgroup>
277
 
<col align="left" valign="top">
278
 
<col>
279
 
</colgroup>
280
 
<tbody><tr>
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>
284
 
</tr></tbody>
285
 
</table></div>
286
 
</div>
287
 
<hr>
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><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
291
 
                                                         <em class="parameter"><code><a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()"><span class="type">GtkAccelMapForeach</span></a> foreach_func</code></em>);</pre>
292
 
<p>
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="gtk-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="gtk-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).
299
 
</p>
300
 
<div class="variablelist"><table border="0" class="variablelist">
301
 
<colgroup>
302
 
<col align="left" valign="top">
303
 
<col>
304
 
</colgroup>
305
 
<tbody>
306
 
<tr>
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>
309
 
</td>
310
 
</tr>
311
 
<tr>
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>
315
 
</tr>
316
 
</tbody>
317
 
</table></div>
318
 
</div>
319
 
<hr>
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><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd</code></em>);</pre>
323
 
<p>
324
 
Filedescriptor variant of <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-load" title="gtk_accel_map_load"><code class="function">gtk_accel_map_load()</code></a>.
325
 
</p>
326
 
<p>
327
 
Note that the file descriptor will not be closed by this function.
328
 
</p>
329
 
<div class="variablelist"><table border="0" class="variablelist">
330
 
<colgroup>
331
 
<col align="left" valign="top">
332
 
<col>
333
 
</colgroup>
334
 
<tbody><tr>
335
 
<td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td>
336
 
<td>a valid readable file descriptor</td>
337
 
</tr></tbody>
338
 
</table></div>
339
 
</div>
340
 
<hr>
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><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd</code></em>);</pre>
344
 
<p>
345
 
Filedescriptor variant of <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-save" title="gtk_accel_map_save"><code class="function">gtk_accel_map_save()</code></a>.
346
 
</p>
347
 
<p>
348
 
Note that the file descriptor will not be closed by this function.
349
 
</p>
350
 
<div class="variablelist"><table border="0" class="variablelist">
351
 
<colgroup>
352
 
<col align="left" valign="top">
353
 
<col>
354
 
</colgroup>
355
 
<tbody><tr>
356
 
<td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td>
357
 
<td>a valid writable file descriptor</td>
358
 
</tr></tbody>
359
 
</table></div>
360
 
</div>
361
 
<hr>
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><a href="http://library.gnome.org/devel/glib/unstable/glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> *scanner</code></em>);</pre>
365
 
<p>
366
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> variant of <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-load" title="gtk_accel_map_load"><code class="function">gtk_accel_map_load()</code></a>.
367
 
</p>
368
 
<div class="variablelist"><table border="0" class="variablelist">
369
 
<colgroup>
370
 
<col align="left" valign="top">
371
 
<col>
372
 
</colgroup>
373
 
<tbody><tr>
374
 
<td><p><span class="term"><em class="parameter"><code>scanner</code></em> :</span></p></td>
375
 
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> which has already been provided with an input file</td>
376
 
</tr></tbody>
377
 
</table></div>
378
 
</div>
379
 
<hr>
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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filter_pattern</code></em>);</pre>
383
 
<p>
384
 
Adds a filter to the global list of accel path filters.
385
 
</p>
386
 
<p>
387
 
Accel map entries whose accel path matches one of the filters
388
 
are skipped by <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-foreach" title="gtk_accel_map_foreach ()"><code class="function">gtk_accel_map_foreach()</code></a>.
389
 
</p>
390
 
<p>
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
393
 
map dump.
394
 
</p>
395
 
<div class="variablelist"><table border="0" class="variablelist">
396
 
<colgroup>
397
 
<col align="left" valign="top">
398
 
<col>
399
 
</colgroup>
400
 
<tbody><tr>
401
 
<td><p><span class="term"><em class="parameter"><code>filter_pattern</code></em> :</span></p></td>
402
 
<td>a pattern (see <a href="http://library.gnome.org/devel/glib/unstable/glib-Glob-style-pattern-matching.html#GPatternSpec"><span class="type">GPatternSpec</span></a>)</td>
403
 
</tr></tbody>
404
 
</table></div>
405
 
</div>
406
 
<hr>
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><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
410
 
                                                         <em class="parameter"><code><a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()"><span class="type">GtkAccelMapForeach</span></a> foreach_func</code></em>);</pre>
411
 
<p>
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="gtk-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).
417
 
</p>
418
 
<div class="variablelist"><table border="0" class="variablelist">
419
 
<colgroup>
420
 
<col align="left" valign="top">
421
 
<col>
422
 
</colgroup>
423
 
<tbody>
424
 
<tr>
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>
427
 
</td>
428
 
</tr>
429
 
<tr>
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>
432
 
</tr>
433
 
</tbody>
434
 
</table></div>
435
 
</div>
436
 
<hr>
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="gtk-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>
440
 
<p>
441
 
Gets the singleton global <a class="link" href="gtk-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.
445
 
</p>
446
 
<div class="variablelist"><table border="0" class="variablelist">
447
 
<colgroup>
448
 
<col align="left" valign="top">
449
 
<col>
450
 
</colgroup>
451
 
<tbody><tr>
452
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
453
 
<td>the global <a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMap"><span class="type">GtkAccelMap</span></a> object</td>
454
 
</tr></tbody>
455
 
</table></div>
456
 
<p class="since">Since 2.4</p>
457
 
</div>
458
 
<hr>
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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>);</pre>
462
 
<p>
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.
465
 
</p>
466
 
<p>
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="gtk-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="gtk-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.
471
 
</p>
472
 
<p>
473
 
If called more than once, <em class="parameter"><code>accel_path</code></em> remains locked until
474
 
<a class="link" href="gtk-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
475
 
of times.
476
 
</p>
477
 
<p>
478
 
Note that locking of individual accelerator paths is independent from 
479
 
locking the <a class="link" href="gtk-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="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>
481
 
have to be unlocked.
482
 
</p>
483
 
<div class="variablelist"><table border="0" class="variablelist">
484
 
<colgroup>
485
 
<col align="left" valign="top">
486
 
<col>
487
 
</colgroup>
488
 
<tbody><tr>
489
 
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
490
 
<td>a valid accelerator path</td>
491
 
</tr></tbody>
492
 
</table></div>
493
 
<p class="since">Since 2.4</p>
494
 
</div>
495
 
<hr>
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 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accel_path</code></em>);</pre>
499
 
<p>
500
 
Undoes the last call to <a class="link" href="gtk-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="gtk-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.
502
 
</p>
503
 
<div class="variablelist"><table border="0" class="variablelist">
504
 
<colgroup>
505
 
<col align="left" valign="top">
506
 
<col>
507
 
</colgroup>
508
 
<tbody><tr>
509
 
<td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td>
510
 
<td>a valid accelerator path</td>
511
 
</tr></tbody>
512
 
</table></div>
513
 
<p class="since">Since 2.4</p>
514
 
</div>
515
 
</div>
516
 
<div class="refsect1">
517
 
<a name="gtk-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="gtk-Accelerator-Maps.html#GtkAccelMap"><span class="type">GtkAccelMap</span></a>    *object,
521
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>          *accel_path,
522
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>           accel_key,
523
 
                                                        <a href="http://library.gnome.org/devel/gdk3/gdk-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods,
524
 
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>        user_data)       : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-DETAILED:CAPS"><code class="literal">Has Details</code></a></pre>
525
 
<p>
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>.
530
 
</p>
531
 
<div class="variablelist"><table border="0" class="variablelist">
532
 
<colgroup>
533
 
<col align="left" valign="top">
534
 
<col>
535
 
</colgroup>
536
 
<tbody>
537
 
<tr>
538
 
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
539
 
<td>the global accel map object</td>
540
 
</tr>
541
 
<tr>
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>
544
 
</tr>
545
 
<tr>
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>
548
 
</tr>
549
 
<tr>
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>
552
 
</tr>
553
 
<tr>
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>
556
 
</tr>
557
 
</tbody>
558
 
</table></div>
559
 
<p class="since">Since 2.4</p>
560
 
</div>
561
 
</div>
562
 
</div>
563
 
<div class="footer">
564
 
<hr>
565
 
          Generated by GTK-Doc V1.18.1</div>
566
 
</body>
567
 
</html>
 
 
b'\\ No newline at end of file'