.\" 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::version 3pm" .TH Gtk2::version 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::version \- Library Version Information .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Gtk2 \*(Aq1.023\*(Aq; # require at least version 1.023 of the bindings \& \& if ($Gtk2::VERSION >= 1.040 and Gtk2\->CHECK_VERSION (2, 4, 0)) { \& # the GtkFileChooser, new in gtk+ 2.4.0 and first supported in \& # Gtk2\-Perl at 1.040, is available \& } else { \& # GtkFileChooser is not available, fall back to GtkFileSelection \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Since the Gtk2 Perl module is a bridge to an external library with its own versions and \s-1API\s0 revisions, we have three different versions available for inspection. Which one you need to use at which time depends entirely on the situation. Gtk2 uses the same scheme as Glib and the underlying gtk+ C library; that is, the standard \&\f(CW$Gtk2::VERSION\fR for the version of the bindings, all-caps (MAJOR|MINOR|MICRO)_VERSION functions for the bound version, and lower-case (major|minor|micro)_version functions for the runtime version. See Glib::version and for more information. .PP Note also that \fBgtk_check_version()\fR and \s-1\fBGTK_CHECK_VERSION\s0()\fR have different semantics in C, and we have preserved those faithfully. .SH "METHODS" .IX Header "METHODS" .ie n .SS "boolean = Gtk2\->\fB\s-1CHECK_VERSION\s0\fP ($required_major, $required_minor, $required_micro)" .el .SS "boolean = Gtk2\->\fB\s-1CHECK_VERSION\s0\fP ($required_major, \f(CW$required_minor\fP, \f(CW$required_micro\fP)" .IX Subsection "boolean = Gtk2->CHECK_VERSION ($required_major, $required_minor, $required_micro)" .IP "\(bu" 4 \&\f(CW$required_major\fR (integer) .IP "\(bu" 4 \&\f(CW$required_minor\fR (integer) .IP "\(bu" 4 \&\f(CW$required_micro\fR (integer) .PP Provides a mechanism for checking the version information that Gtk2 was compiled against. Essentially equvilent to the macro \s-1GTK_CHECK_VERSION.\s0 In most cases this function should be used rather than check_version (). .SS "(\s-1MAJOR, MINOR, MICRO\s0) = Gtk2\->\fB\s-1GET_VERSION_INFO\s0\fP" .IX Subsection "(MAJOR, MINOR, MICRO) = Gtk2->GET_VERSION_INFO" Shorthand to fetch as a list the gtk+ version for which Gtk2 was compiled. See \f(CW\*(C`Gtk2::MAJOR_VERSION\*(C'\fR, etc. .SS "integer = Gtk2::MAJOR_VERSION" .IX Subsection "integer = Gtk2::MAJOR_VERSION" The major version of the gtk+ library against which Gtk2 was compiled. Equivalent to gtk+'s \s-1GTK_MAJOR_VERSION.\s0 .SS "integer = Gtk2::MICRO_VERSION" .IX Subsection "integer = Gtk2::MICRO_VERSION" The micro version of the gtk+ library against which Gtk2 was compiled. Equivalent to gtk+'s \s-1GTK_MICRO_VERSION.\s0 .SS "integer = Gtk2::MINOR_VERSION" .IX Subsection "integer = Gtk2::MINOR_VERSION" The minor version of the gtk+ library against which Gtk2 was compiled. Equivalent to gtk+'s \s-1GTK_MINOR_VERSION.\s0 .ie n .SS "string = Gtk2\->\fBcheck_version\fP ($required_major, $required_minor, $required_micro)" .el .SS "string = Gtk2\->\fBcheck_version\fP ($required_major, \f(CW$required_minor\fP, \f(CW$required_micro\fP)" .IX Subsection "string = Gtk2->check_version ($required_major, $required_minor, $required_micro)" .IP "\(bu" 4 \&\f(CW$required_major\fR (integer) .IP "\(bu" 4 \&\f(CW$required_minor\fR (integer) .IP "\(bu" 4 \&\f(CW$required_micro\fR (integer) .PP Returns undef if the version of gtk+ currently in use is compatible with the given version, otherwise returns a string describing the mismatch. Note that this is not the same logic as \f(CW\*(C`Gtk2::CHECK_VERSION\*(C'\fR. This check is not terribly reliable, and should not be used to test for availability of widgets or functions in the Gtk2 module \-\-\- use \f(CW\*(C`Gtk2::CHECK_VERSION\*(C'\fR for that. See Glib::version for a more detailed description of when you'd want to do a runtime-version test. .SS "integer = Gtk2::major_version" .IX Subsection "integer = Gtk2::major_version" The major version of the gtk+ library current in use at runtime. Equivalent to gtk+'s global variable gtk_major_version. .SS "integer = Gtk2::micro_version" .IX Subsection "integer = Gtk2::micro_version" The micro version of the gtk+ library current in use at runtime. Equivalent to gtk+'s global variable gtk_micro_version. .SS "integer = Gtk2::minor_version" .IX Subsection "integer = Gtk2::minor_version" The minor version of the gtk+ library current in use at runtime. Equivalent to gtk+'s global variable gtk_minor_version. .SS "(major, minor, micro) = Gtk2\->\fBget_version_info\fP" .IX Subsection "(major, minor, micro) = Gtk2->get_version_info" Shorthand to fetch as a list the gtk+ version against which Gtk2 is linked. See \f(CW\*(C`Gtk2::major_version\*(C'\fR, etc. .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::version .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.