1TrayIcon(3) User Contributed Perl Documentation TrayIcon(3)
2
3
4
6 Gtk2::TrayIcon - (DEPRECATED) Perl interface to the EggTrayIcon library
7
9 use Gtk2::TrayIcon;
10 Gtk2->init;
11
12 my $icon= Gtk2::TrayIcon->new("test");
13 my $label= Gtk2::Label->new("test");
14 $icon->add($label);
15 $icon->show_all;
16
17 Gtk2->main;
18
20 DEPRECATED This module allows a Perl developer to embed an arbitrary
21 widget in a System Tray like the Gnome notification area.
22
24 NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
25
26 This module has been deprecated by the Gtk-Perl project. This means
27 that the module will no longer be updated with security patches, bug
28 fixes, or when changes are made in the Perl ABI. The Git repo for this
29 module has been archived (made read-only), it will no longer possible
30 to submit new commits to it. You are more than welcome to ask about
31 this module on the Gtk-Perl mailing list, but our priorities going
32 forward will be maintaining Gtk-Perl modules that are supported and
33 maintained upstream; this module is neither.
34
35 Since this module is licensed under the LGPL v2.1, you may also fork
36 this module, if you wish, but you will need to use a different name for
37 it on CPAN, and the Gtk-Perl team requests that you use your own
38 resources (mailing list, Git repos, bug trackers, etc.) to maintain
39 your fork going forward.
40
41 • Perl URL: https://gitlab.gnome.org/GNOME/perl-gtk2-trayicon
42
43 • Upstream URL: https://gitlab.gnome.org/GNOME/libegg
44
45 • Last upstream version: N/A
46
47 • Last upstream release date: 2009-05-01
48
49 • Migration path for this module: Gtk3::StatusIcon
50
51 • Migration module URL: https://metacpan.org/pod/Gtk3
52
53 NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
54
55 EggTrayIcon is slated for inclusion in Gtk+ at some point, which is the
56 reason the "Gtk2::TrayIcon" namespace. As all egg libs, EggTrayIcon is
57 not considered api stable and its not installed as a shared object.
58
59 Enough about what it is not, "Gtk2::TrayIcon" is first and foremost a
60 simple way of giving a Gtk2 script access to the system tray.
61
62 System Trays are found in both KDE and Gnome. But neither support the
63 spec fully (see below).
64
65 "Gtk2::TrayIcon" is a subclass of "Gtk2::Plug" and should be used as
66 such.
67
69 5 methods are available.
70
71 $trayicon= Gtk2::TrayIcon->new_from_screen($screen, $name)
72 This creates a widget already connected to the notification area of
73 $screen. $screen should be a "Gtk::Gdk::Screen".
74
75 $trayicon= Gtk2::TrayIcon->new($name)
76 Like "new_from_screen" but uses the default screen of the active
77 display.
78
79 $msgid= $trayicon->send_message($timeout, $message)
80 Ask the tray to display $message for $timeout milliseconds. If
81 $timeout is 0, the message will not expire.
82
83 Note that it is up to the tray to decide what to do with the
84 message both Gnome and KDE just ignores it.
85
86 $trayicon->cancel_message($msgid)
87 Ask the tray to cancel the message.
88
90 Glib, Gtk2 and The System Tray Spec
91 http://www.freedesktop.org/Standards/systemtray-spec.
92
94 Christian Borup <gtk2-perl at borup dot com>
95
97 Copyright 2003 by the gtk2-perl team.
98
99 This library is free software; you can redistribute it and/or modify it
100 under the terms of the GNU Library General Public License as published
101 by the Free Software Foundation; either version 2 of the License, or
102 (at your option) any later version.
103
104 This library is distributed in the hope that it will be useful, but
105 WITHOUT ANY WARRANTY; without even the implied warranty of
106 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
107 Library General Public License for more details.
108
109 You should have received a copy of the GNU Library General Public
110 License along with this library; if not, see
111 <https://www.gnu.org/licenses/>.
112
113
114
115perl v5.36.0 2022-07-22 TrayIcon(3)