-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A wrapper around the eggtraymanager library for Linux system trays
--   
--   This package provides a wrapper around the prolific eggtraymanager
--   code. Note that it is *NOT* itself a system tray widget, though it is
--   a very convenient utility for implementing one. This package adopts
--   the style of gtk2hs and is designed to work well with it.
@package gtk-traymanager
@version 1.0.1


-- | This module implements a TrayManager - an integral part of a Linux
--   system tray widget, though it is not itself a widget. This package
--   exports a single GObject (for use with gtk2hs) that implements the
--   freedesktop.org system tray specification (it handles receiving events
--   and translating them into convenient signals, along with the messy
--   work of dealing with XEMBED).
--   
--   The basic usage of the object is to:
--   
--   <ol>
--   <li>Instantiate the object with <a>trayManagerNew</a></li>
--   <li>Have it manage a specific screen with
--   <a>trayManagerManageScreen</a></li>
--   <li>Set up handlers for the events exposed by the tray (e.g.,
--   <a>trayIconAdded</a>).</li>
--   </ol>
--   
--   As an example, a functional system tray widget looks something like:
--   
--   <pre>
--   import Graphics.UI.Gtk
--   import Graphics.UI.Gtk.Misc.TrayManager
--   systrayNew = do
--     box &lt;- hBoxNew False 5
--     trayManager &lt;- rayManagerNew
--     Just screen &lt;- screenGetDefault
--     trayManagerManageScreen trayManager screen
--     on trayManager trayIconAdded $ \w -&gt; do
--       widgetShowAll w
--       boxPackStart box w PackNatural 0
--   </pre>
--   
--   Note that the widgets made available in the event handlers are not
--   shown by default; you need to explicitly show them if you want that
--   (and you probably do).
module Graphics.UI.Gtk.Misc.TrayManager
data TrayManager
type TrayManagerChild = Ptr EggTrayManagerChild
class GObjectClass o => TrayManagerClass o
castToTrayManager :: GObjectClass o => o -> TrayManager
toTrayManager :: TrayManagerClass o => o -> TrayManager
gTypeTrayManager :: GType
trayManagerCheckRunning :: Screen -> IO Bool
trayManagerNew :: IO TrayManager
trayManagerManageScreen :: TrayManager -> Screen -> IO Bool
trayManagerGetChildTitle :: TrayManager -> TrayManagerChild -> IO String

-- | The signal emitted when a new tray icon is added. These are delivered
--   even for systray icons that already exist when the tray manager is
--   created.
trayIconAdded :: TrayManagerClass self => Signal self (Widget -> IO ())

-- | This signal is emitted when a tray icon is removed by its parent
--   application. No action is really necessary here (the icon is removed
--   without any intervention). You could do something here if you wanted,
--   though.
trayIconRemoved :: TrayManagerClass self => Signal self (Widget -> IO ())

-- | This signal is emitted when the application that displayed an icon
--   wants a semi-persistent notification displayed for its icon. The
--   standard doesn't seem to require that these be honored.
trayMessageSent :: TrayManagerClass self => Signal self (Widget -> String -> Int64 -> Int64 -> IO ())

-- | Similarly, the applciation can send this to cancel a previous
--   persistent message.
trayMessageCanceled :: TrayManagerClass self => Signal self (Widget -> Int64 -> IO ())

-- | ??
trayLostSelection :: TrayManagerClass self => Signal self (IO ())
instance GHC.Classes.Ord Graphics.UI.Gtk.Misc.TrayManager.TrayManager
instance GHC.Classes.Eq Graphics.UI.Gtk.Misc.TrayManager.TrayManager
instance Graphics.UI.Gtk.Misc.TrayManager.TrayManagerClass Graphics.UI.Gtk.Misc.TrayManager.TrayManager
instance System.Glib.Types.GObjectClass Graphics.UI.Gtk.Misc.TrayManager.TrayManager
