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


-- | Bindings to libnotify library
--   
--   The package provides a high level interface to libnotify API (see
--   <a>Libnotify</a>)
--   
--   <a>Libnotify.C.Notify</a> and <a>Libnotify.C.NotifyNotification</a>
--   modules contain bindings to C-level functions if you're into that
@package libnotify
@version 0.2


-- | Low level bindings to libnotify
--   
--   See also
--   <a>https://developer.gnome.org/libnotify/0.7/NotifyNotification.html</a>.
--   Haddocks here are mostly excerpts from there
module Libnotify.C.NotifyNotification

-- | An opaque notification token
data NotifyNotification

-- | Create a new <a>NotifyNotification</a>
--   
--   Only summary is required
notify_notification_new :: String -> String -> String -> IO NotifyNotification

-- | Update the notification text and icon
notify_notification_update :: NotifyNotification -> String -> String -> String -> IO Bool

-- | Display the notification on the screen
notify_notification_show :: NotifyNotification -> IO Bool

-- | Set the application name for the notification
--   
--   Used to override an application name for a specific notification. See
--   also <tt>notify_init</tt> and <tt>notify_set_app_name</tt>
notify_notification_set_app_name :: NotifyNotification -> String -> IO ()

-- | Timeout after which notification is closed
data Timeout

-- | Default server timeout
Default :: Timeout

-- | User defined timeout (in milliseconds)
Custom :: Int -> Timeout

-- | Notification will never expire
Infinite :: Timeout

-- | Set the timeout of the notification
notify_notification_set_timeout :: NotifyNotification -> Timeout -> IO ()

-- | Set the category of the notification
notify_notification_set_category :: NotifyNotification -> String -> IO ()

-- | The urgency level of the notification
data Urgency

-- | Low urgency. Used for unimportant notifications
Low :: Urgency

-- | Normal urgency. Used for most standard notifications
Normal :: Urgency

-- | Critical urgency. Used for very important notifications
Critical :: Urgency

-- | Set the urgency level of the notification
notify_notification_set_urgency :: NotifyNotification -> Urgency -> IO ()

-- | Set the icon in the notification from the <a>Pixbuf</a>

-- | <i>Deprecated: Use notify_notification_set_image_from_pixbuf
--   instead</i>
notify_notification_set_icon_from_pixbuf :: NotifyNotification -> Pixbuf -> IO ()

-- | Set the icon in the notification from the <a>Pixbuf</a>
notify_notification_set_image_from_pixbuf :: NotifyNotification -> Pixbuf -> IO ()

-- | Set a hint with a 32-bit integer value
notify_notification_set_hint_int32 :: NotifyNotification -> String -> Int32 -> IO ()

-- | Set a hint with an unsigned 32-bit integer value
notify_notification_set_hint_uint32 :: NotifyNotification -> String -> Word32 -> IO ()

-- | Set a hint with a double value
notify_notification_set_hint_double :: NotifyNotification -> String -> Double -> IO ()

-- | Set a hint with a string value
notify_notification_set_hint_string :: NotifyNotification -> String -> String -> IO ()

-- | Set a hint with a byte value
notify_notification_set_hint_byte :: NotifyNotification -> String -> Word8 -> IO ()

-- | Set a hint with a byte array value
notify_notification_set_hint_byte_array :: NotifyNotification -> String -> ByteString -> IO ()

-- | Clear all hints
notify_notification_clear_hints :: NotifyNotification -> IO ()

-- | Add an action to a notification. When the action is invoked, the
--   specified callback function will be called
--   
--   For the callback to be *actually* invoked, some kind of magical glib
--   <tt>mainLoop</tt> thing should be running
notify_notification_add_action :: NotifyNotification -> String -> String -> (NotifyNotification -> String -> IO ()) -> IO ()

-- | Clear all actions
notify_notification_clear_actions :: NotifyNotification -> IO ()

-- | Hide the notification from the screen
notify_notification_close :: NotifyNotification -> IO Bool

-- | Get the closed reason code for the notification
notify_notification_get_closed_reason :: NotifyNotification -> IO Int
instance GHC.Generics.Generic Libnotify.C.NotifyNotification.Urgency
instance Data.Data.Data Libnotify.C.NotifyNotification.Urgency
instance GHC.Classes.Ord Libnotify.C.NotifyNotification.Urgency
instance GHC.Classes.Eq Libnotify.C.NotifyNotification.Urgency
instance GHC.Show.Show Libnotify.C.NotifyNotification.Urgency
instance GHC.Generics.Generic Libnotify.C.NotifyNotification.Timeout
instance Data.Data.Data Libnotify.C.NotifyNotification.Timeout
instance GHC.Classes.Eq Libnotify.C.NotifyNotification.Timeout
instance GHC.Show.Show Libnotify.C.NotifyNotification.Timeout
instance GHC.Classes.Eq Libnotify.C.NotifyNotification.NotifyNotification
instance GHC.Show.Show Libnotify.C.NotifyNotification.NotifyNotification
instance System.Glib.Types.GObjectClass Libnotify.C.NotifyNotification.NotifyNotification


-- | Low level bindings to libnotify
--   
--   See also
--   <a>https://developer.gnome.org/libnotify/0.7/libnotify-notify.html</a>.
--   Haddocks here are mostly excerpts from there
module Libnotify.C.Notify

-- | Initialize libnotify
--   
--   This must be called before any other functions
notify_init :: String -> IO Bool

-- | Uninitialize libnotify
notify_uninit :: IO ()

-- | Get whether libnotify is initialized or not
notify_is_initted :: IO Bool

-- | Get the application name
--   
--   Do not forget to call <a>notify_init</a> before calling this!
notify_get_app_name :: IO String

-- | Set the application name
--   
--   Do not forget to call <a>notify_init</a> before calling this!
notify_set_app_name :: String -> IO ()

-- | Return server capabilities
--   
--   Synchronously queries the server for its capabilities
--   
--   <pre>
--   &gt;&gt;&gt; notify_get_server_caps
--   ["actions","body","body-markup","body-hyperlinks","icon-static","x-canonical-private-icon-only"]
--   </pre>
notify_get_server_caps :: IO [String]

-- | Server information
data ServerInfo
ServerInfo :: String -> String -> String -> String -> ServerInfo
[serverName] :: ServerInfo -> String
[serverVendor] :: ServerInfo -> String
[serverVersion] :: ServerInfo -> String
[serverSpecVersion] :: ServerInfo -> String

-- | Return server information
--   
--   Synchronously queries the server for its information, specifically,
--   the name, vendor, server version, and the version of the notifications
--   specification that it is compliant with
--   
--   <pre>
--   &gt;&gt;&gt; notify_get_server_info
--   Just (ServerInfo {name = "Xfce Notify Daemon", vendor = "Xfce", version = "0.2.4", specVersion = "0.9"})
--   </pre>
notify_get_server_info :: IO (Maybe ServerInfo)
instance GHC.Generics.Generic Libnotify.C.Notify.ServerInfo
instance Data.Data.Data Libnotify.C.Notify.ServerInfo
instance GHC.Classes.Eq Libnotify.C.Notify.ServerInfo
instance GHC.Show.Show Libnotify.C.Notify.ServerInfo


-- | High level interface to libnotify API
module Libnotify

-- | Notification object
data Notification

-- | Display notification
--   
--   <pre>
--   &gt;&gt;&gt; token &lt;- display (summary "Greeting" &lt;&gt; body "Hello world!" &lt;&gt; icon "face-smile-big")
--   </pre>
--   
--   
--   You can <a>reuse</a> notification tokens:
--   
--   <pre>
--   &gt;&gt;&gt; display_ (reuse token &lt;&gt; body "Hey!")
--   </pre>
--   
display :: Mod Notification -> IO Notification

-- | Display and discard notification token
--   
--   <pre>
--   &gt;&gt;&gt; display_ (summary "Greeting" &lt;&gt; body "Hello world!" &lt;&gt; icon "face-smile-big")
--   </pre>
display_ :: Mod Notification -> IO ()

-- | Close notification
close :: Notification -> IO ()

-- | A notification modifier
data Mod a

-- | Set notification summary
--   
--   <pre>
--   &gt;&gt;&gt; display_ (summary "Hello!")
--   </pre>
--   
summary :: String -> Mod Notification

-- | Set notification body
--   
--   <pre>
--   &gt;&gt;&gt; display_ (body "Hello world!")
--   </pre>
--   
body :: String -> Mod Notification

-- | Set notification icon
--   
--   <pre>
--   &gt;&gt;&gt; display_ (icon "face-smile")
--   </pre>
--   
--   The argument is either icon name or file name
--   
icon :: String -> Mod Notification

-- | Set notification timeout
timeout :: Timeout -> Mod Notification

-- | Timeout after which notification is closed
data Timeout

-- | Default server timeout
Default :: Timeout

-- | User defined timeout (in milliseconds)
Custom :: Int -> Timeout

-- | Notification will never expire
Infinite :: Timeout

-- | Set notification category
category :: String -> Mod Notification

-- | Set notification urgency
urgency :: Urgency -> Mod Notification

-- | The urgency level of the notification
data Urgency

-- | Low urgency. Used for unimportant notifications
Low :: Urgency

-- | Normal urgency. Used for most standard notifications
Normal :: Urgency

-- | Critical urgency. Used for very important notifications
Critical :: Urgency

-- | Set notification image
image :: Pixbuf -> Mod Notification

-- | Add a hint to notification
--   
--   It's perfectly OK to add multiple hints to a single notification
class Hint v
hint :: Hint v => String -> v -> Mod Notification

-- | Remove all hints from the notification
nohints :: Mod Notification

-- | Add an action to notification
--   
--   It's perfectly OK to add multiple actions to a single notification
--   
--   <pre>
--   &gt;&gt;&gt; display_ (action "hello" "Hello world!" (\_ _ -&gt; return ()))
--   </pre>
--   
action :: String -> String -> (Notification -> String -> IO a) -> Mod Notification

-- | Remove all actions from the notification
--   
--   <pre>
--   &gt;&gt;&gt; let callback _ _ = return ()
--   
--   &gt;&gt;&gt; display_ (summary "No hello for you!" &lt;&gt; action "hello" "Hello world!" callback &lt;&gt; noactions)
--   </pre>
--   
noactions :: Mod Notification

-- | Set the application name.
appName :: String -> Mod Notification

-- | Reuse existing notification token, instead of creating a new one
--   
--   If you try to reuse multiple tokens, the last one wins, e.g.
--   
--   <pre>
--   &gt;&gt;&gt; foo &lt;- display (body "foo")
--   
--   &gt;&gt;&gt; bar &lt;- display (body "bar")
--   
--   &gt;&gt;&gt; display_ (base foo &lt;&gt; base bar)
--   </pre>
--   
--   will show only "bar"
--   
reuse :: Notification -> Mod Notification

-- | The class of monoids (types with an associative binary operation that
--   has an identity). Instances should satisfy the following laws:
--   
--   <ul>
--   <li><pre>mappend mempty x = x</pre></li>
--   <li><pre>mappend x mempty = x</pre></li>
--   <li><pre>mappend x (mappend y z) = mappend (mappend x y) z</pre></li>
--   <li><pre>mconcat = <a>foldr</a> mappend mempty</pre></li>
--   </ul>
--   
--   The method names refer to the monoid of lists under concatenation, but
--   there are many other instances.
--   
--   Some types can be viewed as a monoid in more than one way, e.g. both
--   addition and multiplication on numbers. In such cases we often define
--   <tt>newtype</tt>s and make those instances of <a>Monoid</a>, e.g.
--   <tt>Sum</tt> and <tt>Product</tt>.
class Monoid a

-- | Identity of <a>mappend</a>
mempty :: Monoid a => a

-- | An associative operation
mappend :: Monoid a => a -> a -> a

-- | Fold a list using the monoid. For most types, the default definition
--   for <a>mconcat</a> will be used, but the function is included in the
--   class definition so that an optimized version can be provided for
--   specific types.
mconcat :: Monoid a => [a] -> a

-- | An infix synonym for <a>mappend</a>.
(<>) :: Monoid m => m -> m -> m
infixr 6 <>
instance GHC.Classes.Eq Libnotify.Notification
instance GHC.Show.Show Libnotify.Notification
instance GHC.Base.Monoid (Libnotify.Mod a)
instance Libnotify.Hint GHC.Int.Int32
instance Libnotify.Hint GHC.Types.Double
instance Libnotify.Hint GHC.Base.String
instance Libnotify.Hint GHC.Word.Word8
instance Libnotify.Hint Data.ByteString.Internal.ByteString
