.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Gtk2::BindingSet 3pm" .TH Gtk2::BindingSet 3pm "2019-09-16" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Gtk2::BindingSet \- wrapper for GtkBindingSet .SH "DESCRIPTION" .IX Header "DESCRIPTION" A \f(CW\*(C`Gtk2::BindingSet\*(C'\fR 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 \f(CW\*(C`Gtk2::Widget\*(C'\fR default \&\f(CW\*(C`key\-press\-event\*(C'\fR handler, but can also be activated explicitly. .PP Binding sets can be populated from program code with \&\f(CW\*(C`entry_add_signal\*(C'\fR, or created from an \s-1RC\s0 file or string (see Gtk2::Rc). If you use the \s-1RC\s0 note it doesn't parse and create anything until there's someone interested in the result, such as \&\f(CW\*(C`Gtk2::Settings\*(C'\fR for widgets. This means binding sets in \s-1RC\s0 files or strings don't exist for \f(CW\*(C`Gtk2::BindingSet\->find\*(C'\fR to retrieve until at least one widget has been created (or similar). .PP Currently there's no Perl-level access to the contents of a BindingSet, except for \f(CW\*(C`set_name\*(C'\fR. .SH "HIERARCHY" .IX Header "HIERARCHY" .Vb 2 \& Glib::Boxed \& +\-\-\-\-Gtk2::BindingSet .Ve .SH "METHODS" .IX Header "METHODS" .SS "GtkBindingSet = Gtk2::BindingSet\->\fBnew\fP ($set_name)" .IX Subsection "GtkBindingSet = Gtk2::BindingSet->new ($set_name)" .IP "\(bu" 4 \&\f(CW$set_name\fR (string) .ie n .SS "boolean = $binding_set\->\fBactivate\fP ($keyval, $modifiers, $object)" .el .SS "boolean = \f(CW$binding_set\fP\->\fBactivate\fP ($keyval, \f(CW$modifiers\fP, \f(CW$object\fP)" .IX Subsection "boolean = $binding_set->activate ($keyval, $modifiers, $object)" .IP "\(bu" 4 \&\f(CW$keyval\fR (integer) .IP "\(bu" 4 \&\f(CW$modifiers\fR (Gtk2::Gdk::ModifierType) .IP "\(bu" 4 \&\f(CW$object\fR (Gtk2::Object) .ie n .SS "$binding_set\->\fBadd_path\fP ($path_type, $path_pattern, $priority)" .el .SS "\f(CW$binding_set\fP\->\fBadd_path\fP ($path_type, \f(CW$path_pattern\fP, \f(CW$priority\fP)" .IX Subsection "$binding_set->add_path ($path_type, $path_pattern, $priority)" .IP "\(bu" 4 \&\f(CW$path_type\fR (Gtk2::PathType) .IP "\(bu" 4 \&\f(CW$path_pattern\fR (string) .IP "\(bu" 4 \&\f(CW$priority\fR (integer) .PP The following constants are defined for standard priority levels, .PP .Vb 6 \& 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 .Ve .PP \&\s-1LOWEST,\s0 which is 0, and \s-1HIGHEST,\s0 which is 15, are the limits of the allowed priorities. The standard values are from the \&\f(CW\*(C`Gtk2::PathPriorityType\*(C'\fR 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. .SS "bindingset or undef = Gtk2::BindingSet\->\fBby_class\fP ($name)" .IX Subsection "bindingset or undef = Gtk2::BindingSet->by_class ($name)" .IP "\(bu" 4 \&\f(CW$name\fR (string) .ie n .SS "$binding_set\->\fBentry_add_signal\fP ($keyval, $modifiers, $signal_name)" .el .SS "\f(CW$binding_set\fP\->\fBentry_add_signal\fP ($keyval, \f(CW$modifiers\fP, \f(CW$signal_name\fP)" .IX Subsection "$binding_set->entry_add_signal ($keyval, $modifiers, $signal_name)" .ie n .SS "$binding_set\->\fBentry_add_signal\fP ($keyval, $modifiers, $signal_name, $type,$value, ...)" .el .SS "\f(CW$binding_set\fP\->\fBentry_add_signal\fP ($keyval, \f(CW$modifiers\fP, \f(CW$signal_name\fP, \f(CW$type\fP,$value, ...)" .IX Subsection "$binding_set->entry_add_signal ($keyval, $modifiers, $signal_name, $type,$value, ...)" .IP "\(bu" 4 \&\f(CW$keyval\fR (integer) .IP "\(bu" 4 \&\f(CW$modifiers\fR (Gtk2::Gdk::ModifierType) .IP "\(bu" 4 \&\f(CW$signal_name\fR (string) .IP "\(bu" 4 \&\f(CW$value\fR (scalar) .IP "\(bu" 4 \&\f(CW$type\fR (string) .PP Add an entry to \f(CW$binding_set\fR. \f(CW$keyval\fR and \f(CW$modifier\fR are setup as a binding for \f(CW$signal_name\fR and with signal parameters given by \f(CW$value\fR arguments. Each value is preceded by a type (a string), which must be one of .PP .Vb 5 \& Glib::Long \& Glib::Double \& Glib::String \& an enum type, ie. subtype of Glib::Enum \& Glib::Flags, or a flags subtype .Ve .PP For example, .PP .Vb 6 \& $binding_set\->entry_add_signal \& (Gtk2\->keyval_from_name(\*(AqReturn\*(Aq), \& [ \*(Aqcontrol\-mask\*(Aq ], # modifiers \& \*(Aqsome\-signal\-name\*(Aq, \& \*(AqGlib::Double\*(Aq, 1.5, \& \*(AqGlib::String, \*(Aqhello\*(Aq); .Ve .PP 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. .PP Flags and enums are held as Longs in the BindingSet. You can pass an enum type and string and \f(CW\*(C`entry_with_signal\*(C'\fR will lookup and store accordingly. For example .PP .Vb 4 \& $binding_set\->entry_add_signal \& (Gtk2\->keyval_from_name(\*(AqEscape), [], \& \*(Aqset\-direction\*(Aq, \& \*(AqGtk2::Orientation\*(Aq, \*(Aqvertical\*(Aq); .Ve .PP Likewise flags from an arrayref, .PP .Vb 4 \& $binding_set\->entry_add_signal \& (Gtk2\->keyval_from_name(\*(Aqd\*(Aq), [], \& \*(Aqinitiate\-drag\*(Aq, \& \*(AqGtk2::Gdk::DragAction\*(Aq, [\*(Aqmove,\*(Aqask\*(Aq]); .Ve .PP 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, .PP .Vb 5 \& my $flags = Gtk2::DebugFlag\->new ([\*(Aqtree\*(Aq, \*(Aqupdates\*(Aq]); \& $binding_set\->entry_add_signal \& (Gtk2\->keyval_from_name(\*(Aqx\*(Aq), [\*(Aqcontrol\-mask\*(Aq], \& \*(Aqchange\-debug\*(Aq, \& \*(AqGlib::Flags\*(Aq, $flags); .Ve .ie n .SS "$binding_set\->\fBentry_remove\fP ($keyval, $modifiers)" .el .SS "\f(CW$binding_set\fP\->\fBentry_remove\fP ($keyval, \f(CW$modifiers\fP)" .IX Subsection "$binding_set->entry_remove ($keyval, $modifiers)" .IP "\(bu" 4 \&\f(CW$keyval\fR (integer) .IP "\(bu" 4 \&\f(CW$modifiers\fR (Gtk2::Gdk::ModifierType) .ie n .SS "$binding_set\->\fBentry_skip\fP ($keyval, $modifiers)" .el .SS "\f(CW$binding_set\fP\->\fBentry_skip\fP ($keyval, \f(CW$modifiers\fP)" .IX Subsection "$binding_set->entry_skip ($keyval, $modifiers)" .IP "\(bu" 4 \&\f(CW$keyval\fR (integer) .IP "\(bu" 4 \&\f(CW$modifiers\fR (Gtk2::Gdk::ModifierType) .PP Since: gtk+ 2.12 .SS "bindingset or undef = Gtk2::BindingSet\->\fBfind\fP ($name)" .IX Subsection "bindingset or undef = Gtk2::BindingSet->find ($name)" .IP "\(bu" 4 \&\f(CW$name\fR (string) .ie n .SS "string = $binding_set\->\fBset_name\fP" .el .SS "string = \f(CW$binding_set\fP\->\fBset_name\fP" .IX Subsection "string = $binding_set->set_name" Return the name of \f(CW$binding_set\fR. .SH "ENUMS AND FLAGS" .IX Header "ENUMS AND FLAGS" .SS "flags Gtk2::Gdk::ModifierType" .IX Subsection "flags Gtk2::Gdk::ModifierType" .IP "\(bu" 4 \&'shift\-mask' / '\s-1GDK_SHIFT_MASK\s0' .IP "\(bu" 4 \&'lock\-mask' / '\s-1GDK_LOCK_MASK\s0' .IP "\(bu" 4 \&'control\-mask' / '\s-1GDK_CONTROL_MASK\s0' .IP "\(bu" 4 \&'mod1\-mask' / '\s-1GDK_MOD1_MASK\s0' .IP "\(bu" 4 \&'mod2\-mask' / '\s-1GDK_MOD2_MASK\s0' .IP "\(bu" 4 \&'mod3\-mask' / '\s-1GDK_MOD3_MASK\s0' .IP "\(bu" 4 \&'mod4\-mask' / '\s-1GDK_MOD4_MASK\s0' .IP "\(bu" 4 \&'mod5\-mask' / '\s-1GDK_MOD5_MASK\s0' .IP "\(bu" 4 \&'button1\-mask' / '\s-1GDK_BUTTON1_MASK\s0' .IP "\(bu" 4 \&'button2\-mask' / '\s-1GDK_BUTTON2_MASK\s0' .IP "\(bu" 4 \&'button3\-mask' / '\s-1GDK_BUTTON3_MASK\s0' .IP "\(bu" 4 \&'button4\-mask' / '\s-1GDK_BUTTON4_MASK\s0' .IP "\(bu" 4 \&'button5\-mask' / '\s-1GDK_BUTTON5_MASK\s0' .IP "\(bu" 4 \&'super\-mask' / '\s-1GDK_SUPER_MASK\s0' .IP "\(bu" 4 \&'hyper\-mask' / '\s-1GDK_HYPER_MASK\s0' .IP "\(bu" 4 \&'meta\-mask' / '\s-1GDK_META_MASK\s0' .IP "\(bu" 4 \&'release\-mask' / '\s-1GDK_RELEASE_MASK\s0' .IP "\(bu" 4 \&'modifier\-mask' / '\s-1GDK_MODIFIER_MASK\s0' .SS "enum Gtk2::PathType" .IX Subsection "enum Gtk2::PathType" .IP "\(bu" 4 \&'widget' / '\s-1GTK_PATH_WIDGET\s0' .IP "\(bu" 4 \&'widget\-class' / '\s-1GTK_PATH_WIDGET_CLASS\s0' .IP "\(bu" 4 \&'class' / '\s-1GTK_PATH_CLASS\s0' .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::Boxed .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2003\-2011 by the gtk2\-perl team. .PP This software is licensed under the \s-1LGPL.\s0 See Gtk2 for a full notice.