-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Desktop Notifications client -- -- A library for issuing notifications using FreeDesktop.org's Desktop -- Notifications protcol. This protocol is supported by services such as -- Ubuntu's NotifyOSD. @package fdo-notify @version 0.2 -- | A library for issuing notifications using FreeDesktop.org Desktop -- Notifications protocol. This protocol is used to communicate with -- services such as Ubuntu's NotifyOSD. -- -- This library does not yet support receiving events relating to -- notifications, or images in notifications: if you need that -- functionality please contact the maintainer. module DBus.Notify -- | Display a notification. Return a handle which can be used to replace -- the notification. notify :: Client -> Note -> IO Notification -- | Replace an existing notification. If the notification has already been -- closed, a new one will be created. replace :: Client -> Notification -> Note -> IO Notification -- | A handle on a displayed notification The notification may not have -- reached the screen yet, and may already have been closed. data Notification -- | Create a Client connected to the session bus. Note that this -- opens a socket and spawns a thread, so it's best to reuse a single -- client. mkSessionClient :: IO Client -- | Clients are opaque handles to an open connection and other -- internal state. data Client :: * -- | A Note with default values. All fields are blank except for -- expiry, which is Dependent. blankNote :: Note -- | Contents of a notification data Note Note :: String -> Maybe Image -> String -> Maybe Body -> [(Action, String)] -> [Hint] -> Timeout -> Note appName :: Note -> String appImage :: Note -> Maybe Image summary :: Note -> String body :: Note -> Maybe Body actions :: Note -> [(Action, String)] hints :: Note -> [Hint] expiry :: Note -> Timeout -- | Message bodies may contain simple markup. NotifyOSD doesn't support -- any markup. data Body Text :: String -> Body Bold :: Body -> Body Italic :: Body -> Body Underline :: Body -> Body Hyperlink :: URL -> Body -> Body Img :: URL -> String -> Body Concat :: Body -> Body -> Body type URL = String -- | Length of time to display notifications. NotifyOSD seems to ignore -- these. data Timeout -- | Wait to be dismissed by user Never :: Timeout -- | Let the notification service decide Dependent :: Timeout -- | Show notification for a fixed duration (must be positive) Milliseconds :: Int32 -> Timeout newtype Action Action :: String -> Action actionName :: Action -> String -- | Images are not yet supported data Image -- | Categorisation of (some) notifications data Category Device :: Category DeviceAdded :: Category DeviceError :: Category DeviceRemoved :: Category Email :: Category EmailArrived :: Category EmailBounced :: Category Im :: Category ImError :: Category ImReceived :: Category Network :: Category NetworkConnected :: Category NetworkDisconnected :: Category NetworkError :: Category Presence :: Category PresenceOffline :: Category PresenceOnline :: Category Transfer :: Category TransferComplete :: Category TransferError :: Category -- | Urgency of the notification. Notifications may be prioritised by -- urgency. data UrgencyLevel Low :: UrgencyLevel Normal :: UrgencyLevel -- | Critical notifications require user attention Critical :: UrgencyLevel -- | Various hints about how the notification should be displayed data Hint Urgency :: UrgencyLevel -> Hint Category :: Category -> Hint ImageData :: Image -> Hint SoundFile :: FilePath -> Hint SuppressSound :: Bool -> Hint X :: Int32 -> Hint Y :: Int32 -> Hint -- | Determine the server's capabilities getCapabilities :: Client -> IO [Capability] data Capability ActionsCap :: Capability BodyCap :: Capability BodyHyperlinksCap :: Capability BodyImagesCap :: Capability BodyMarkupCap :: Capability IconMultiCap :: Capability IconStaticCap :: Capability SoundCap :: Capability UnknownCap :: String -> Capability instance Eq Capability instance Read Capability instance Show Capability instance Eq Category instance Show Category instance Eq Hint instance Show Hint instance Eq UrgencyLevel instance Ord UrgencyLevel instance Enum UrgencyLevel instance Show UrgencyLevel instance Eq Image instance Show Image instance Eq Action instance Show Action instance Eq Timeout instance Show Timeout instance Eq Body instance Show Body instance Eq Note instance Show Note