1
2@c %start of fragment
3
4@deftp Class <gtk-accel-group>
5Derives from @code{<gobject>}.
6
7This class defines no direct slots.
8
9@end deftp
10
11@defop Signal <gtk-accel-group> accel-activate  (arg0@tie{}@code{<gobject>}) (arg1@tie{}@code{<guint>}) (arg2@tie{}@code{<gdk-modifier-type>}) @result{}@tie{}@code{<gboolean>}
12The accel-activate signal is an implementation detail of
13@code{<gtk-accel-group>} and not meant to be used by applications.
14
15@end defop
16
17@defop Signal <gtk-accel-group> accel-changed  (arg0@tie{}@code{<guint>}) (arg1@tie{}@code{<gdk-modifier-type>}) (arg2@tie{}@code{<gclosure>})
18The accel-changed signal is emitted when a @code{<gtk-accel-group-entry>} is
19added to or removed from the accel group.
20
21Widgets like @code{<gtk-accel-label>} which display an associated accelerator
22should connect to this signal, and rebuild their visual representation if the
23@var{accel-closure} is theirs.
24
25@end defop
26
27@deffn Function gtk-accel-group-new  @result{}@tie{} (ret@tie{}@code{<gtk-accel-group>})
28Creates a new @code{<gtk-accel-group>}.
29
30@table @var
31@item ret
32a new @code{<gtk-accel-group>} object
33
34@end table
35
36@end deffn
37
38@deffn Function gtk-accel-group-connect  (self@tie{}@code{<gtk-accel-group>}) (accel_key@tie{}@code{unsigned-int}) (accel_mods@tie{}@code{<gdk-modifier-type>}) (accel_flags@tie{}@code{<gtk-accel-flags>}) (closure@tie{}@code{<gclosure>})
39@deffnx Method connect
40Installs an accelerator in this group. When @var{accel-group} is being activated
41in response to a call to @code{gtk-accel-groups-activate}, @var{closure} will be
42invoked if the @var{accel-key} and @var{accel-mods} from
43@code{gtk-accel-groups-activate} match those of this connection.
44
45The signature used for the @var{closure} is that of
46@code{<gtk-accel-group-activate>}.
47
48Note that, due to implementation details, a single closure can only be connected
49to one accelerator group.
50
51@table @var
52@item accel-group
53the accelerator group to install an accelerator in
54
55@item accel-key
56key value of the accelerator
57
58@item accel-mods
59modifier combination of the accelerator
60
61@item accel-flags
62a flag mask to configure this accelerator
63
64@item closure
65closure to be executed upon accelerator activation
66
67@end table
68
69@end deffn
70
71@deffn Function gtk-accel-group-connect-by-path  (self@tie{}@code{<gtk-accel-group>}) (accel_path@tie{}@code{mchars}) (closure@tie{}@code{<gclosure>})
72@deffnx Method connect-by-path
73Installs an accelerator in this group, using an accelerator path to look up the
74appropriate key and modifiers (see @code{gtk-accel-map-add-entry}). When
75@var{accel-group} is being activated in response to a call to
76@code{gtk-accel-groups-activate}, @var{closure} will be invoked if the
77@var{accel-key} and @var{accel-mods} from @code{gtk-accel-groups-activate} match
78the key and modifiers for the path.
79
80The signature used for the @var{closure} is that of
81@code{<gtk-accel-group-activate>}.
82
83@table @var
84@item accel-group
85the accelerator group to install an accelerator in
86
87@item accel-path
88path used for determining key and modifiers.
89
90@item closure
91closure to be executed upon accelerator activation
92
93@end table
94
95@end deffn
96
97@deffn Function gtk-accel-group-disconnect  (self@tie{}@code{<gtk-accel-group>}) (closure@tie{}@code{<gclosure>}) @result{}@tie{} (ret@tie{}@code{bool})
98@deffnx Method disconnect
99Removes an accelerator previously installed through
100@code{gtk-accel-group-connect}.
101
102@table @var
103@item accel-group
104the accelerator group to remove an accelerator from
105
106@item closure
107the closure to remove from this accelerator group
108
109@item ret
110@samp{@code{#t}} if the closure was found and got disconnected
111
112@end table
113
114@end deffn
115
116@deffn Function gtk-accel-group-disconnect-key  (self@tie{}@code{<gtk-accel-group>}) (accel_key@tie{}@code{unsigned-int}) (accel_mods@tie{}@code{<gdk-modifier-type>}) @result{}@tie{} (ret@tie{}@code{bool})
117@deffnx Method disconnect-key
118Removes an accelerator previously installed through
119@code{gtk-accel-group-connect}.
120
121@table @var
122@item accel-group
123the accelerator group to install an accelerator in
124
125@item accel-key
126key value of the accelerator
127
128@item accel-mods
129modifier combination of the accelerator
130
131@item ret
132@samp{@code{#t}} if there was an accelerator which could be removed,
133@samp{@code{#f}} otherwise
134
135@end table
136
137@end deffn
138
139@deffn Function gtk-accel-group-activate  (self@tie{}@code{<gtk-accel-group>}) (accel_quark@tie{}@code{unsigned-int}) (acceleratable@tie{}@code{<gobject>}) (accel_key@tie{}@code{unsigned-int}) (accel_mods@tie{}@code{<gdk-modifier-type>}) @result{}@tie{} (ret@tie{}@code{bool})
140@deffnx Method activate
141@table @var
142@item accel-group
143
144
145@item accel-quark
146
147
148@item acceleratable
149
150
151@item accel-key
152
153
154@item accel-mods
155
156
157@item ret
158
159
160@end table
161
162@end deffn
163
164@deffn Function gtk-accel-group-lock  (self@tie{}@code{<gtk-accel-group>})
165@deffnx Method lock
166Locks the given accelerator group.
167
168Locking an acelerator group prevents the accelerators contained within it to be
169changed during runtime. Refer to @code{gtk-accel-map-change-entry} about runtime
170accelerator changes.
171
172If called more than once, @var{accel-group} remains locked until
173@code{gtk-accel-group-unlock} has been called an equivalent number of times.
174
175@table @var
176@item accel-group
177a @code{<gtk-accel-group>}
178
179@end table
180
181@end deffn
182
183@deffn Function gtk-accel-group-unlock  (self@tie{}@code{<gtk-accel-group>})
184@deffnx Method unlock
185Undoes the last call to @code{gtk-accel-group-lock} on this @var{accel-group}.
186
187@table @var
188@item accel-group
189a @code{<gtk-accel-group>}
190
191@end table
192
193@end deffn
194
195@deffn Function gtk-accel-group-from-accel-closure  (closure@tie{}@code{<gclosure>}) @result{}@tie{} (ret@tie{}@code{<gtk-accel-group>})
196Finds the @code{<gtk-accel-group>} to which @var{closure} is connected; see
197@code{gtk-accel-group-connect}.
198
199@table @var
200@item closure
201a @code{<gclosure>}
202
203@item ret
204the @code{<gtk-accel-group>} to which @var{closure} is connected, or
205@samp{@code{#f}}.
206
207@end table
208
209@end deffn
210
211@deffn Function gtk-accel-groups-activate  (object@tie{}@code{<gobject>}) (accel_key@tie{}@code{unsigned-int}) (accel_mods@tie{}@code{<gdk-modifier-type>}) @result{}@tie{} (ret@tie{}@code{bool})
212Finds the first accelerator in any @code{<gtk-accel-group>} attached to
213@var{object} that matches @var{accel-key} and @var{accel-mods}, and activates
214that accelerator. If an accelerator was activated and handled this keypress,
215@samp{@code{#t}} is returned.
216
217@table @var
218@item object
219the @code{<gobject>}, usually a @code{<gtk-window>}, on which to activate the
220accelerator.
221
222@item accel-key
223accelerator keyval from a key event
224
225@item accel-mods
226keyboard state mask from a key event
227
228@item ret
229@samp{@code{#t}} if the accelerator was handled, @samp{@code{#f}} otherwise
230
231@end table
232
233@end deffn
234
235@deffn Function gtk-accel-groups-from-object  (object@tie{}@code{<gobject>}) @result{}@tie{} (ret@tie{}@code{gslist-of})
236Gets a list of all accel groups which are attached to @var{object}.
237
238@table @var
239@item object
240a @code{<gobject>}, usually a @code{<gtk-window>}
241
242@item ret
243a list of all accel groups which are attached to @var{object}
244
245@end table
246
247@end deffn
248
249@deffn Function gtk-accelerator-valid  (keyval@tie{}@code{unsigned-int}) (modifiers@tie{}@code{<gdk-modifier-type>}) @result{}@tie{} (ret@tie{}@code{bool})
250Determines whether a given keyval and modifier mask constitute a valid keyboard
251accelerator. For example, the @code{<gdk-a>} keyval plus
252@code{<gdk-control-mask>} is valid - this is a "Ctrl+a" accelerator. But, you
253can't, for instance, use the @code{<gdk--control-l>} keyval as an accelerator.
254
255@table @var
256@item keyval
257a GDK keyval
258
259@item modifiers
260modifier mask
261
262@item ret
263@samp{@code{#t}} if the accelerator is valid
264
265@end table
266
267@end deffn
268
269@deffn Function gtk-accelerator-name  (accelerator_key@tie{}@code{unsigned-int}) (accelerator_mods@tie{}@code{<gdk-modifier-type>}) @result{}@tie{} (ret@tie{}@code{mchars})
270Converts an accelerator keyval and modifier mask into a string parseable by
271@code{gtk-accelerator-parse}. For example, if you pass in @code{<gdk-q>} and
272@code{<gdk-control-mask>}, this function returns "<Control>q".
273
274If you need to display accelerators in the user interface, see
275@code{gtk-accelerator-get-label}.
276
277@table @var
278@item accelerator-key
279accelerator keyval
280
281@item accelerator-mods
282accelerator modifier mask
283
284@item ret
285a newly-allocated accelerator name
286
287@end table
288
289@end deffn
290
291@deffn Function gtk-accelerator-get-label  (accelerator_key@tie{}@code{unsigned-int}) (accelerator_mods@tie{}@code{<gdk-modifier-type>}) @result{}@tie{} (ret@tie{}@code{mchars})
292Converts an accelerator keyval and modifier mask into a string which can be used
293to represent the accelerator to the user.
294
295@table @var
296@item accelerator-key
297accelerator keyval
298
299@item accelerator-mods
300accelerator modifier mask
301
302@item ret
303a newly-allocated string representing the accelerator.
304
305@end table
306
307Since 2.6
308
309@end deffn
310
311
312@c %end of fragment
313