Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gtk2::trayicon(3pm) [debian man page]

TrayIcon(3pm)						User Contributed Perl Documentation					     TrayIcon(3pm)

NAME
Gtk2::TrayIcon - 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
This module allows a Perl developer to embed an arbitrary widget in a System Tray like the Gnome notification area. DESCRIPTION
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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. perl v5.14.2 2007-06-27 TrayIcon(3pm)

Check Out this Related Man Page

TrayManager(3pm)					User Contributed Perl Documentation					  TrayManager(3pm)

NAME
Gtk2::TrayManager - Perl bindings for EggTrayManager SYNOPSIS
use Gtk2 -init; use Gtk2::TrayManager; my $screen = Gtk2::Gdk::Screen->get_default; if (Gtk2::TrayManager->check_running($screen)) { print STDERR "A tray manager is already running, sorry! "; exit 256; } my $tray = Gtk2::TrayManager->new; $tray->manage_screen($screen); $tray->set_orientation('vertical'); $tray->signal_connect('tray_icon_added', sub { # $_[1] is a Gtk2::Socket }); $tray->signal_connect('tray_icon_removed', sub { # $_[1] is a Gtk2::Socket }); ABSTRACT
The EggTrayManager library is used internally by GNOME to implement the server-side of the Notification Area (or system tray) protocol. Gtk2::TrayManager allows you to create notification area applications using Gtk2-Perl. METHODS
$running = Gtk2::TrayManager->check_running($screen); This method returns a boolean value indicating whether another program is already managing notifications for the given Gtk2::Gdk::Screen. If this method returns a false value, then you should give way to the application that is already running. $tray = Gtk2::TrayManager->new; This creates a tray manager object. $tray->manage_screen($screen); This tells the tray to manage notifications for the Gtk2::Gdk::Screen referenced by $screen. $tray->set_orientation($orientation); This method tells the tray whether icons are to be arranged vertically or horizontally. $orientation may be either '"vertical"' or '"horizontal"'. $title = $tray->get_child_title($child); This method returns a string containing the title of the icon defined by $child. SIGNALS
"tray_icon_added" Emitted when a client plug (eg one created by Gtk2::TrayIcon) wants to connect. For callbacks connected to this signal, @_ will have the form @_ = ( bless( {}, 'Gtk2::TrayManager' ), bless( {}, 'Gtk2::Socket' ) ); "tray_icon_added" Emitted when a client plug has disconnected. For callbacks connected to this signal, @_ will have the form @_ = ( bless( {}, 'Gtk2::TrayManager' ), bless( {}, 'Gtk2::Socket' ) ); "message_sent", "message_removed" The Freedesktop.org specification includes support for "balloon messages", but these are not currently implemented in EggTrayManager. "lost_selection" As a rule, compliant applications should check to for an already running manager, and give way to it if it finds one. However, it is possible that your application might have its X selection forcibly removed; this signal is emitted if this should happen. SEE ALSO
Glib, Gtk, Gtk2::TrayIcon and the System Tray spec at http://www.freedesktop.org/Standards/systemtray-spec <http://www.freedesktop.org/Standards/systemtray-spec>. AUTHOR
Christian Borup <borup at cpan dot org>. Nagging and documentation by Gavin Brown <gavin.brown@uk.com> COPYRIGHT AND LICENSE
Copyright 2004 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. perl v5.14.2 2004-09-09 TrayManager(3pm)
Man Page