++ed by:
DMOL ILUX
Author image Brian Manning

NAME

Gtk2::TrayIcon - (DEPRECATED) Perl interface to the EggTrayIcon library

SYNOPSIS

  use Gtk2::TrayIcon;
  Gtk2->init;

  my $icon= Gtk2::TrayIcon->new("test");
  my $label= Gtk2::Label->new("test");
  $icon->add($label);
  $icon->show_all;

  Gtk2->main;

ABSTRACT

DEPRECATED This module allows a Perl developer to embed an arbitrary widget in a System Tray like the Gnome notification area.

DESCRIPTION

NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE

This module has been deprecated by the Gtk-Perl project. This means that the module will no longer be updated with security patches, bug fixes, or when changes are made in the Perl ABI. The Git repo for this module has been archived (made read-only), it will no longer possible to submit new commits to it. You are more than welcome to ask about this module on the Gtk-Perl mailing list, but our priorities going forward will be maintaining Gtk-Perl modules that are supported and maintained upstream; this module is neither.

Since this module is licensed under the LGPL v2.1, you may also fork this module, if you wish, but you will need to use a different name for it on CPAN, and the Gtk-Perl team requests that you use your own resources (mailing list, Git repos, bug trackers, etc.) to maintain your fork going forward.

  • Perl URL: https://gitlab.gnome.org/GNOME/perl-gtk2-trayicon

  • Upstream URL: https://gitlab.gnome.org/GNOME/libegg

  • Last upstream version: N/A

  • Last upstream release date: 2009-05-01

  • Migration path for this module: Gtk3::StatusIcon

  • Migration module URL: https://metacpan.org/pod/Gtk3

NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE

EggTrayIcon is slated for inclusion in Gtk+ at some point, which is the reason the Gtk2::TrayIcon namespace. As all egg libs, EggTrayIcon is not considered api stable and its not installed as a shared object.

Enough about what it is not, Gtk2::TrayIcon is first and foremost a simple way of giving a Gtk2 script access to the system tray.

System Trays are found in both KDE and Gnome. But neither support the spec fully (see below).

Gtk2::TrayIcon is a subclass of Gtk2::Plug and should be used as such.

METHODS

5 methods are available.

$trayicon= Gtk2::TrayIcon->new_from_screen($screen, $name)

This creates a widget already connected to the notification area of $screen. $screen should be a Gtk::Gdk::Screen.

$trayicon= Gtk2::TrayIcon->new($name)

Like new_from_screen but uses the default screen of the active display.

$msgid= $trayicon->send_message($timeout, $message)

Ask the tray to display $message for $timeout milliseconds. If $timeout is 0, the message will not expire.

Note that it is up to the tray to decide what to do with the message both Gnome and KDE just ignores it.

$trayicon->cancel_message($msgid)

Ask the tray to cancel the message.

SEE ALSO

Glib, Gtk2 and The System Tray Spec http://www.freedesktop.org/Standards/systemtray-spec.

AUTHOR

Christian Borup <gtk2-perl at borup dot com>

COPYRIGHT AND LICENSE

Copyright 2003 by the gtk2-perl team.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, see <https://www.gnu.org/licenses/>.