Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login


class Gtk::TrayIcon

This class provides a Ruby access to the System Tray Protocol Specification. The class is based on Gtk::Plug, so you can easily add widgets in the GNOME notification area using Gtk::Plug#add. Here is an example:

require 'gtktrayicon'

tray ="test")
tray.add("Hello, World!"))


Class Methods, screen=nil)
Constructs a new Gtk::TrayIcon object using the given parameters.

Instance Methods

Cancels a message which is currently displayed on the tray, giving its ID.
  • id: a message ID.
  • Returns: self.
This method returns the orientation of the tray, as a Gdk::Orientation?.
  • Returns: the orientation of the tray, as a Gdk::Orientation?.
send_message(timeout, message)
Asks the tray to display the given message for the given timeout milliseconds. If timeout is 0, the message will not expire.
  • message: a message to send (String).
  • timeout: a timeout value (Integer).
  • Returns: an Integer identifier for the message.
Last modified:2006/07/02 14:28:32
References:[Ruby/GtkTrayIcon] [News_20040603_1] [Gtk::TrayIcon]