/usr/lib/perl5/Gtk2/BindingSet.pod is in libgtk2-perl-doc 2:1.249-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 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 | =head1 NAME
Gtk2::BindingSet - wrapper for GtkBindingSet
=cut
=for position DESCRIPTION
=head1 DESCRIPTION
A C<Gtk2::BindingSet> is basically a mapping from keyval+modifiers to
a named action signal to invoke and with argument values for the
signal. Bindings are normally run by the C<Gtk2::Widget> default
C<key-press-event> handler, but can also be activated explicitly.
Binding sets can be populated from program code with
C<entry_add_signal>, or created from an RC file or string (see
L<Gtk2::Rc>). If you use the RC note it doesn't parse and create
anything until there's someone interested in the result, such as
C<Gtk2::Settings> for widgets. This means binding sets in RC files or
strings don't exist for C<< Gtk2::BindingSet->find >> to retrieve
until at least one widget has been created (or similar).
Currently there's no Perl-level access to the contents of a
BindingSet, except for C<set_name>.
=cut
=head1 HIERARCHY
Glib::Boxed
+----Gtk2::BindingSet
=cut
=for apidoc Gtk2::BindingSet::find
=for signature GtkBindingSet_ornull Gtk2::BindingSet->find ($set_name)
=for arg set_name (string)
=for arg name (__hide__)
=cut
=for apidoc Gtk2::BindingSet::by_class
=for signature GtkBindingSet = Gtk2::BindingSet->by_class ($package_name)
=for arg package_name (string)
=for arg name (__hide__)
=cut
=head1 METHODS
=head2 GtkBindingSet = Gtk2::BindingSet->B<new> ($set_name)
=over
=item * $set_name (string)
=back
=head2 boolean = $binding_set-E<gt>B<activate> ($keyval, $modifiers, $object)
=over
=item * $keyval (integer)
=item * $modifiers (Gtk2::Gdk::ModifierType)
=item * $object (Gtk2::Object)
=back
=head2 $binding_set-E<gt>B<add_path> ($path_type, $path_pattern, $priority)
=over
=item * $path_type (Gtk2::PathType)
=item * $path_pattern (string)
=item * $priority (integer)
=back
The following constants are defined for standard priority levels,
Gtk2::GTK_PATH_PRIO_LOWEST
Gtk2::GTK_PATH_PRIO_GTK
Gtk2::GTK_PATH_PRIO_APPLICATION
Gtk2::GTK_PATH_PRIO_THEME
Gtk2::GTK_PATH_PRIO_RC
Gtk2::GTK_PATH_PRIO_HIGHEST
LOWEST, which is 0, and HIGHEST, which is 15, are the limits of the
allowed priorities. The standard values are from the
C<Gtk2::PathPriorityType> enum, but the parameter here is an integer,
not an enum string, so you can give a value for instance a little
above or below the pre-defined levels.
=head2 bindingset or undef = Gtk2::BindingSet-E<gt>B<by_class> ($name)
=over
=item * $name (string)
=back
=head2 $binding_set->B<entry_add_signal> ($keyval, $modifiers, $signal_name)
=head2 $binding_set->B<entry_add_signal> ($keyval, $modifiers, $signal_name, $type,$value, ...)
=over
=item * $keyval (integer)
=item * $modifiers (Gtk2::Gdk::ModifierType)
=item * $signal_name (string)
=item * $value (scalar)
=item * $type (string)
=back
Add an entry to $binding_set. $keyval and $modifier are setup as a
binding for $signal_name and with signal parameters given by $value
arguments. Each value is preceded by a type (a string), which must be
one of
Glib::Long
Glib::Double
Glib::String
an enum type, ie. subtype of Glib::Enum
Glib::Flags, or a flags subtype
For example,
$binding_set->entry_add_signal
(Gtk2->keyval_from_name('Return'),
[ 'control-mask' ], # modifiers
'some-signal-name',
'Glib::Double', 1.5,
'Glib::String, 'hello');
A parameter holds one of the three types Long, Double or String. When
invoked they're coerced to the parameter types expected by the target
object or widget. Use Glib::Long for any integer argument, including
chars and unichars by ordinal value. Use Glib::Double for both single
and double precision floats.
Flags and enums are held as Longs in the BindingSet. You can pass an
enum type and string and C<entry_with_signal> will lookup and store
accordingly. For example
$binding_set->entry_add_signal
(Gtk2->keyval_from_name('Escape), [],
'set-direction',
'Gtk2::Orientation', 'vertical');
Likewise flags from an arrayref,
$binding_set->entry_add_signal
(Gtk2->keyval_from_name('d'), [],
'initiate-drag',
'Gtk2::Gdk::DragAction', ['move,'ask']);
If you've got a Glib::Flags object, rather than just an arrayref, then
you can just give Glib::Flags as the type and the value is taken from
the object. For example,
my $flags = Gtk2::DebugFlag->new (['tree', 'updates']);
$binding_set->entry_add_signal
(Gtk2->keyval_from_name('x'), ['control-mask'],
'change-debug',
'Glib::Flags', $flags);
=head2 $binding_set-E<gt>B<entry_remove> ($keyval, $modifiers)
=over
=item * $keyval (integer)
=item * $modifiers (Gtk2::Gdk::ModifierType)
=back
=head2 $binding_set-E<gt>B<entry_skip> ($keyval, $modifiers)
=over
=item * $keyval (integer)
=item * $modifiers (Gtk2::Gdk::ModifierType)
=back
Since: gtk+ 2.12
=head2 bindingset or undef = Gtk2::BindingSet-E<gt>B<find> ($name)
=over
=item * $name (string)
=back
=head2 string = $binding_set-E<gt>B<set_name>
Return the name of $binding_set.
=cut
=head1 ENUMS AND FLAGS
=head2 flags Gtk2::Gdk::ModifierType
=over
=item * 'shift-mask' / 'GDK_SHIFT_MASK'
=item * 'lock-mask' / 'GDK_LOCK_MASK'
=item * 'control-mask' / 'GDK_CONTROL_MASK'
=item * 'mod1-mask' / 'GDK_MOD1_MASK'
=item * 'mod2-mask' / 'GDK_MOD2_MASK'
=item * 'mod3-mask' / 'GDK_MOD3_MASK'
=item * 'mod4-mask' / 'GDK_MOD4_MASK'
=item * 'mod5-mask' / 'GDK_MOD5_MASK'
=item * 'button1-mask' / 'GDK_BUTTON1_MASK'
=item * 'button2-mask' / 'GDK_BUTTON2_MASK'
=item * 'button3-mask' / 'GDK_BUTTON3_MASK'
=item * 'button4-mask' / 'GDK_BUTTON4_MASK'
=item * 'button5-mask' / 'GDK_BUTTON5_MASK'
=item * 'super-mask' / 'GDK_SUPER_MASK'
=item * 'hyper-mask' / 'GDK_HYPER_MASK'
=item * 'meta-mask' / 'GDK_META_MASK'
=item * 'release-mask' / 'GDK_RELEASE_MASK'
=item * 'modifier-mask' / 'GDK_MODIFIER_MASK'
=back
=head2 enum Gtk2::PathType
=over
=item * 'widget' / 'GTK_PATH_WIDGET'
=item * 'widget-class' / 'GTK_PATH_WIDGET_CLASS'
=item * 'class' / 'GTK_PATH_CLASS'
=back
=cut
=head1 SEE ALSO
L<Gtk2>, L<Glib::Boxed>
=cut
=head1 COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See L<Gtk2> for a full notice.
=cut
|