.\" Automatically generated by Pod::Man 4.09 (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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "TrayManager 3pm" .TH TrayManager 3pm "2017-07-23" "perl v5.26.0" "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::TrayManager \- Perl bindings for EggTrayManager .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& 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!\en"; \& exit 256; \& } \& \& my $tray = Gtk2::TrayManager\->new; \& $tray\->manage_screen($screen); \& $tray\->set_orientation(\*(Aqvertical\*(Aq); \& \& $tray\->signal_connect(\*(Aqtray_icon_added\*(Aq, sub { \& # $_[1] is a Gtk2::Socket \& }); \& \& $tray\->signal_connect(\*(Aqtray_icon_removed\*(Aq, sub { \& # $_[1] is a Gtk2::Socket \& }); .Ve .SH "ABSTRACT" .IX Header "ABSTRACT" The EggTrayManager library is used internally by \s-1GNOME\s0 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. .SH "METHODS" .IX Header "METHODS" .Vb 1 \& $running = Gtk2::TrayManager\->check_running($screen); .Ve .PP 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. .PP .Vb 1 \& $tray = Gtk2::TrayManager\->new; .Ve .PP This creates a tray manager object. .PP .Vb 1 \& $tray\->manage_screen($screen); .Ve .PP This tells the tray to manage notifications for the Gtk2::Gdk::Screen referenced by \f(CW$screen\fR. .PP .Vb 1 \& $tray\->set_orientation($orientation); .Ve .PP This method tells the tray whether icons are to be arranged vertically or horizontally. \f(CW$orientation\fR may be either '\f(CW\*(C`vertical\*(C'\fR' or '\f(CW\*(C`horizontal\*(C'\fR'. .PP .Vb 1 \& $title = $tray\->get_child_title($child); .Ve .PP This method returns a string containing the title of the icon defined by \&\f(CW$child\fR. .SH "SIGNALS" .IX Header "SIGNALS" .ie n .IP """tray_icon_added""" 4 .el .IP "\f(CWtray_icon_added\fR" 4 .IX Item "tray_icon_added" Emitted when a client plug (eg one created by Gtk2::TrayIcon) wants to connect. For callbacks connected to this signal, \f(CW@_\fR will have the form .Sp .Vb 4 \& @_ = ( \& bless( {}, \*(AqGtk2::TrayManager\*(Aq ), \& bless( {}, \*(AqGtk2::Socket\*(Aq ) \& ); .Ve .ie n .IP """tray_icon_added""" 4 .el .IP "\f(CWtray_icon_added\fR" 4 .IX Item "tray_icon_added" Emitted when a client plug has disconnected. For callbacks connected to this signal, \f(CW@_\fR will have the form .Sp .Vb 4 \& @_ = ( \& bless( {}, \*(AqGtk2::TrayManager\*(Aq ), \& bless( {}, \*(AqGtk2::Socket\*(Aq ) \& ); .Ve .ie n .IP """message_sent"", ""message_removed""" 4 .el .IP "\f(CWmessage_sent\fR, \f(CWmessage_removed\fR" 4 .IX Item "message_sent, message_removed" The Freedesktop.org specification includes support for \*(L"balloon messages\*(R", but these are not currently implemented in EggTrayManager. .ie n .IP """lost_selection""" 4 .el .IP "\f(CWlost_selection\fR" 4 .IX Item "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. .SH "SEE ALSO" .IX Header "SEE ALSO" Glib, Gtk, Gtk2::TrayIcon and the System Tray spec at . .SH "AUTHOR" .IX Header "AUTHOR" Christian Borup . Nagging and documentation by Gavin Brown .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2004 by the gtk2\-perl team. .PP This library is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This library is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 Library General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place \- Suite 330, Boston, \s-1MA\s0 02111\-1307 \s-1USA.\s0