1Gtk2::version(3)      User Contributed Perl Documentation     Gtk2::version(3)
2
3
4

NAME

6       Gtk2::version -  Library Version Information
7

SYNOPSIS

9         use Gtk2 '1.023';  # require at least version 1.023 of the bindings
10
11         if ($Gtk2::VERSION >= 1.040 and Gtk2->CHECK_VERSION (2, 4, 0)) {
12            # the GtkFileChooser, new in gtk+ 2.4.0 and first supported in
13            # Gtk2-Perl at 1.040, is available
14         } else {
15            # GtkFileChooser is not available, fall back to GtkFileSelection
16         }
17

DESCRIPTION

19       Since the Gtk2 Perl module is a bridge to an external library with its
20       own versions and API revisions, we have three different versions avail‐
21       able for inspection.  Which one you need to use at which time depends
22       entirely on the situation.  Gtk2 uses the same scheme as Glib and the
23       underlying gtk+ C library; that is, the standard $Gtk2::VERSION for the
24       version of the bindings, all-caps (MAJOR⎪MINOR⎪MICRO)_VERSION functions
25       for the bound version, and lower-case (major⎪minor⎪micro)_version func‐
26       tions for the runtime version.  See Glib::version and http://devel
27       oper.gnome.org/doc/API/2.0/gtk/gtk-Feature-Test-Macros.html for more
28       information.
29
30       Note also that gtk_check_version() and GTK_CHECK_VERSION() have differ‐
31       ent semantics in C, and we have preserved those faithfully.
32

METHODS

34       boolean = Gtk2->CHECK_VERSION ($required_major, $required_minor,
35       $required_micro)
36
37           * $required_major (integer)
38           * $required_minor (integer)
39           * $required_micro (integer)
40
41           Provides a mechanism for checking the version information that Gtk2
42           was compiled against. Essentially equvilent to the macro
43           GTK_CHECK_VERSION. In most cases this function should be used
44           rather than check_version ().
45
46       (MAJOR, MINOR, MICRO) = Gtk2->GET_VERSION_INFO
47
48           Shorthand to fetch as a list the gtk+ version for which Gtk2 was
49           compiled.  See "Gtk2::MAJOR_VERSION", etc.
50
51       integer = Gtk2::MAJOR_VERSION
52
53           The major version of the gtk+ library against which Gtk2 was com‐
54           piled.  Equivalent to gtk+'s GTK_MAJOR_VERSION.
55
56       integer = Gtk2::MICRO_VERSION
57
58           The micro version of the gtk+ library against which Gtk2 was com‐
59           piled.  Equivalent to gtk+'s GTK_MICRO_VERSION.
60
61       integer = Gtk2::MINOR_VERSION
62
63           The minor version of the gtk+ library against which Gtk2 was com‐
64           piled.  Equivalent to gtk+'s GTK_MINOR_VERSION.
65
66       string = Gtk2->check_version ($required_major, $required_minor,
67       $required_micro)
68
69           * $required_major (integer)
70           * $required_minor (integer)
71           * $required_micro (integer)
72
73           Returns undef if the version of gtk+ currently in use is compatible
74           with the given version, otherwise returns a string describing the
75           mismatch.  Note that this is not the same logic as
76           "Gtk2::CHECK_VERSION".  This check is not terribly reliable, and
77           should not be used to test for availability of widgets or functions
78           in the Gtk2 module --- use "Gtk2::CHECK_VERSION" for that.  See
79           Glib::version for a more detailed description of when you'd want to
80           do a runtime-version test.
81
82       integer = Gtk2::major_version
83
84           The major version of the gtk+ library current in use at runtime.
85           Equivalent to gtk+'s global variable gtk_major_version.
86
87       integer = Gtk2::micro_version
88
89           The micro version of the gtk+ library current in use at runtime.
90           Equivalent to gtk+'s global variable gtk_micro_version.
91
92       integer = Gtk2::minor_version
93
94           The minor version of the gtk+ library current in use at runtime.
95           Equivalent to gtk+'s global variable gtk_minor_version.
96
97       (major, minor, micro) = Gtk2->get_version_info
98
99           Shorthand to fetch as a list the gtk+ version against which Gtk2 is
100           linked.  See "Gtk2::major_version", etc.
101

SEE ALSO

103       Gtk2, Glib::version
104
106       Copyright (C) 2003-2007 by the gtk2-perl team.
107
108       This software is licensed under the LGPL.  See Gtk2 for a full notice.
109
110
111
112perl v5.8.8                       2007-03-18                  Gtk2::version(3)
Impressum