File: gtk2-Accelerator-Maps.html

package info (click to toggle)
gtk%2B2.0 2.24.33-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates, trixie-updates
  • size: 124,860 kB
  • sloc: ansic: 574,091; makefile: 5,171; sh: 4,618; xml: 1,193; python: 1,117; perl: 749; awk: 49; cpp: 34
file content (736 lines) | stat: -rw-r--r-- 35,499 bytes parent folder | download | duplicates (3)
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Accelerator Maps: GTK+ 2 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="prev" href="gtk2-Keyboard-Accelerators.html" title="Accelerator Groups">
<link rel="next" href="gtk2-Clipboards.html" title="Clipboards">
<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gtk2-Accelerator-Maps.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#gtk2-Accelerator-Maps.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#gtk2-Accelerator-Maps.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gtkbase.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gtk2-Keyboard-Accelerators.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gtk2-Clipboards.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gtk2-Accelerator-Maps"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk2-Accelerator-Maps.top_of_page"></a>Accelerator Maps</span></h2>
<p>Accelerator Maps</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gtk2-Accelerator-Maps.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMapForeach" title="GtkAccelMapForeach ()">*GtkAccelMapForeach</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-foreach" title="gtk_accel_map_foreach ()">gtk_accel_map_foreach</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap"><span class="returnvalue">GtkAccelMap</span></a> *
</td>
<td class="function_name">
<a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-get" title="gtk_accel_map_get ()">gtk_accel_map_get</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gtk2-Accelerator-Maps.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap-changed" title="The “changed” signal">changed</a></td>
<td class="signal_flags">Has Details</td>
</tr></tbody>
</table></div>
</div>
<a name="GtkAccelMap"></a><div class="refsect1">
<a name="gtk2-Accelerator-Maps.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap-struct" title="GtkAccelMap">GtkAccelMap</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-load" title="gtk_accel_map_load">gtk_accel_map_load</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtk2-Accelerator-Maps.html#gtk-accel-map-save" title="gtk_accel_map_save">gtk_accel_map_save</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gtk2-Accelerator-Maps.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GtkAccelMap
</pre>
</div>
<div class="refsect1">
<a name="gtk2-Accelerator-Maps.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gtk2-Accelerator-Maps.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="gtk2-Accelerator-Maps.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GtkAccelMapForeach"></a><h3>GtkAccelMapForeach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*GtkAccelMapForeach<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
                       <em class="parameter"><code>const <span class="type">gchar</span> *accel_path</code></em>,
                       <em class="parameter"><code><span class="type">guint</span> accel_key</code></em>,
                       <em class="parameter"><code><a href="../html/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
                       <em class="parameter"><code><span class="type">gboolean</span> changed</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-add-entry"></a><h3>gtk_accel_map_add_entry ()</h3>
<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>,
                         <em class="parameter"><code><span class="type">guint</span> accel_key</code></em>,
                         <em class="parameter"><code><a href="../html/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>);</pre>
<p>Registers a new accelerator with the global accelerator map.
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
<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>.
The accelerator path must consist of "&lt;WINDOWTYPE&gt;/Category1/Category2/.../Action",
where &lt;WINDOWTYPE&gt; 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:
"&lt;Gimp-Toolbox&gt;/File/Dialogs/Tool Options...".</p>
<p>Note that <em class="parameter"><code>accel_path</code></em>
 string will be stored in a <span class="type">GQuark</span>. Therefore, if you
pass a static string, you can save some memory by interning it first with 
<code class="function">g_intern_static_string()</code>.</p>
<div class="refsect3">
<a name="gtk-accel-map-add-entry.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>accel_path</p></td>
<td class="parameter_description"><p>valid accelerator path</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accel_key</p></td>
<td class="parameter_description"><p>the accelerator key</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accel_mods</p></td>
<td class="parameter_description"><p>the accelerator modifiers</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-lookup-entry"></a><h3>gtk_accel_map_lookup_entry ()</h3>
<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>,
                            <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>
<p>Looks up the accelerator entry for <em class="parameter"><code>accel_path</code></em>
 and fills in <em class="parameter"><code>key</code></em>
.</p>
<div class="refsect3">
<a name="gtk-accel-map-lookup-entry.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>accel_path</p></td>
<td class="parameter_description"><p>a valid accelerator path</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>the accelerator key to be filled in (optional)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>returns</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> if <em class="parameter"><code>accel_path</code></em>
is known, <code class="literal">FALSE</code> otherwise</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-change-entry"></a><h3>gtk_accel_map_change_entry ()</h3>
<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>,
                            <em class="parameter"><code><span class="type">guint</span> accel_key</code></em>,
                            <em class="parameter"><code><a href="../html/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods</code></em>,
                            <em class="parameter"><code><span class="type">gboolean</span> replace</code></em>);</pre>
<p>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>
.
Due to conflicts with other accelerators, a change may not always be possible,
<em class="parameter"><code>replace</code></em>
 indicates whether 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>
<p>Note that <em class="parameter"><code>accel_path</code></em>
 string will be stored in a <span class="type">GQuark</span>. Therefore, if you
pass a static string, you can save some memory by interning it first with 
<code class="function">g_intern_static_string()</code>.</p>
<div class="refsect3">
<a name="gtk-accel-map-change-entry.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>accel_path</p></td>
<td class="parameter_description"><p>a valid accelerator path</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accel_key</p></td>
<td class="parameter_description"><p>the new accelerator key</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accel_mods</p></td>
<td class="parameter_description"><p>the new accelerator modifiers</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>replace</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> if other accelerators may be deleted upon conflicts</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>returns</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> if the accelerator could be changed, <code class="literal">FALSE</code> otherwise</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-foreach"></a><h3>gtk_accel_map_foreach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_accel_map_foreach (<em class="parameter"><code><span class="type">gpointer</span> data</code></em>,
                       <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>
<p>Loops over the entries in the accelerator map whose accel path 
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>, 
and execute <em class="parameter"><code>foreach_func</code></em>
 on each. The signature of <em class="parameter"><code>foreach_func</code></em>
 is 
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
this accelerator was changed during runtime (thus, would need
saving during an accelerator map dump).</p>
<div class="refsect3">
<a name="gtk-accel-map-foreach.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data to be passed into <em class="parameter"><code>foreach_func</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>foreach_func</p></td>
<td class="parameter_description"><p>function to be executed for each accel map entry which
is not filtered out</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-load-fd"></a><h3>gtk_accel_map_load_fd ()</h3>
<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>
<p>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>.</p>
<p>Note that the file descriptor will not be closed by this function.</p>
<div class="refsect3">
<a name="gtk-accel-map-load-fd.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>fd</p></td>
<td class="parameter_description"><p>a valid readable file descriptor</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-save-fd"></a><h3>gtk_accel_map_save_fd ()</h3>
<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>
<p>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>.</p>
<p>Note that the file descriptor will not be closed by this function.</p>
<div class="refsect3">
<a name="gtk-accel-map-save-fd.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>fd</p></td>
<td class="parameter_description"><p>a valid writable file descriptor</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-load-scanner"></a><h3>gtk_accel_map_load_scanner ()</h3>
<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>
<p><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>.</p>
<div class="refsect3">
<a name="gtk-accel-map-load-scanner.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>scanner</p></td>
<td class="parameter_description"><p>a <span class="type">GScanner</span> which has already been provided with an input file</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-add-filter"></a><h3>gtk_accel_map_add_filter ()</h3>
<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>
<p>Adds a filter to the global list of accel path filters.</p>
<p>Accel map entries whose accel path matches one of the filters
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>.</p>
<p>This function is intended for GTK+ modules that create their own
menus, but don't want them to be saved into the applications accelerator
map dump.</p>
<div class="refsect3">
<a name="gtk-accel-map-add-filter.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>filter_pattern</p></td>
<td class="parameter_description"><p>a pattern (see <span class="type">GPatternSpec</span>)</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-foreach-unfiltered"></a><h3>gtk_accel_map_foreach_unfiltered ()</h3>
<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>,
                                  <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>
<p>Loops over all entries in the accelerator map, and execute
<em class="parameter"><code>foreach_func</code></em>
 on each. The signature of <em class="parameter"><code>foreach_func</code></em>
 is 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
this accelerator was changed during runtime (thus, would need
saving during an accelerator map dump).</p>
<div class="refsect3">
<a name="gtk-accel-map-foreach-unfiltered.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data to be passed into <em class="parameter"><code>foreach_func</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>foreach_func</p></td>
<td class="parameter_description"><p>function to be executed for each accel map entry</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-get"></a><h3>gtk_accel_map_get ()</h3>
<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>
<p>Gets the singleton global <a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap"><span class="type">GtkAccelMap</span></a> object. This object
is useful only for notification of changes to the accelerator
map via the ::changed signal; it isn't a parameter to the
other accelerator map functions.</p>
<div class="refsect3">
<a name="gtk-accel-map-get.returns"></a><h4>Returns</h4>
<p> the global <a class="link" href="gtk2-Accelerator-Maps.html#GtkAccelMap"><span class="type">GtkAccelMap</span></a> object</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-lock-path"></a><h3>gtk_accel_map_lock_path ()</h3>
<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>
<p>Locks the given accelerator path. 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 
<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> 
for information about runtime accelerator changes.</p>
<p>If called more than once, <em class="parameter"><code>accel_path</code></em>
 remains locked until
<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
of times.</p>
<p>Note that locking of individual accelerator paths is independent from 
locking the <a class="link" href="gtk2-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> containing them. For runtime accelerator
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>
have to be unlocked.</p>
<div class="refsect3">
<a name="gtk-accel-map-lock-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>accel_path</p></td>
<td class="parameter_description"><p>a valid accelerator path</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-unlock-path"></a><h3>gtk_accel_map_unlock_path ()</h3>
<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>
<p>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>
.
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.</p>
<div class="refsect3">
<a name="gtk-accel-map-unlock-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>accel_path</p></td>
<td class="parameter_description"><p>a valid accelerator path</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
</div>
<div class="refsect1">
<a name="gtk2-Accelerator-Maps.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkAccelMap-struct"></a><h3>GtkAccelMap</h3>
<pre class="programlisting">typedef struct _GtkAccelMap GtkAccelMap;</pre>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-load"></a><h3>gtk_accel_map_load</h3>
<pre class="programlisting">#define gtk_accel_map_load gtk_accel_map_load_utf8
</pre>
<p>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
accelerator specifications, and propagates them accordingly.</p>
<div class="refsect3">
<a name="gtk-accel-map-load.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>file_name</p></td>
<td class="parameter_description"><p>a file containing accelerator specifications,
in the GLib file name encoding</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-accel-map-save"></a><h3>gtk_accel_map_save</h3>
<pre class="programlisting">#define gtk_accel_map_save gtk_accel_map_save_utf8
</pre>
<p>Saves current accelerator specifications (accelerator path, key
and modifiers) to <em class="parameter"><code>file_name</code></em>
.
The file is written in a format suitable to be read back in by
<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>.</p>
<div class="refsect3">
<a name="gtk-accel-map-save.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>file_name</p></td>
<td class="parameter_description"><p>the name of the file to contain accelerator specifications,
in the GLib file name encoding</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gtk2-Accelerator-Maps.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkAccelMap-changed"></a><h3>The <code class="literal">“changed”</code> signal</h3>
<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,
               <span class="type">char</span>           *accel_path,
               <span class="type">guint</span>           accel_key,
               <a href="../html/gdk2-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> accel_mods,
               <span class="type">gpointer</span>        user_data)</pre>
<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 class="refsect3">
<a name="GtkAccelMap-changed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>the global accel map object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accel_path</p></td>
<td class="parameter_description"><p>the path of the accelerator that changed</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accel_key</p></td>
<td class="parameter_description"><p>the key value for the new accelerator</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accel_mods</p></td>
<td class="parameter_description"><p>the modifier mask for the new accelerator</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Has Details</p>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.0</div>
</body>
</html>