-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Libnotify bindings -- -- Bindings for Libnotify, autogenerated by haskell-gi. @package gi-notify @version 0.7.21 -- | Build time configuration used during code generation. module GI.Notify.Config -- | Overrides used when generating these bindings. overrides :: Text module GI.Notify.Constants -- | No description available in the introspection data. pattern VERSION_MINOR :: Int32 -- | No description available in the introspection data. pattern VERSION_MICRO :: Int32 -- | No description available in the introspection data. pattern VERSION_MAJOR :: Int32 -- | The notification never expires. It stays open until closed by the -- calling API or the user. pattern EXPIRES_NEVER :: Int32 -- | The default expiration time on a notification. pattern EXPIRES_DEFAULT :: Int32 module GI.Notify.Enums -- | The urgency level of the notification. data Urgency -- | Low urgency. Used for unimportant notifications. UrgencyLow :: Urgency -- | Normal urgency. Used for most standard notifications. UrgencyNormal :: Urgency -- | Critical urgency. Used for very important notifications. UrgencyCritical :: Urgency -- | Catch-all for unknown values AnotherUrgency :: Int -> Urgency instance GHC.Classes.Eq GI.Notify.Enums.Urgency instance GHC.Show.Show GI.Notify.Enums.Urgency instance GHC.Enum.Enum GI.Notify.Enums.Urgency instance GHC.Classes.Ord GI.Notify.Enums.Urgency instance Data.GI.Base.BasicTypes.BoxedEnum GI.Notify.Enums.Urgency module GI.Notify.Functions -- | Gets the application name registered. getAppName :: (HasCallStack, MonadIO m) => m Text -- | Synchronously queries the server for its capabilities and returns them -- in a List. getServerCaps :: (HasCallStack, MonadIO m) => m [Text] -- | 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. getServerInfo :: (HasCallStack, MonadIO m) => m (Bool, Text, Text, Text, Text) -- | Initialized libnotify. This must be called before any other functions. init :: (HasCallStack, MonadIO m) => Text -> m Bool -- | Gets whether or not libnotify is initialized. isInitted :: (HasCallStack, MonadIO m) => m Bool -- | Sets the application name. setAppName :: (HasCallStack, MonadIO m) => Text -> m () -- | Uninitialized libnotify. -- -- This should be called when the program no longer needs libnotify for -- the rest of its lifecycle, typically just before exitting. uninit :: (HasCallStack, MonadIO m) => m () module GI.Notify.Callbacks -- | An action callback function. type ActionCallback = Notification -> Text -> IO () -- | An action callback function. type ActionCallback_WithClosures = Notification -> Text -> Ptr () -> IO () -- | Type for the callback on the (unwrapped) C side. type C_ActionCallback = Ptr Notification -> CString -> Ptr () -> IO () -- | A simple wrapper that ignores the closure arguments. drop_closures_ActionCallback :: ActionCallback -> ActionCallback_WithClosures -- | Given a pointer to a foreign C function, wrap it into a function -- callable from Haskell. dynamic_ActionCallback :: (HasCallStack, MonadIO m, IsNotification a) => FunPtr C_ActionCallback -> a -> Text -> Ptr () -> m () -- | Wrap the callback into a GClosure. genClosure_ActionCallback :: MonadIO m => ActionCallback -> m (GClosure C_ActionCallback) -- | Generate a function pointer callable from C code, from a -- C_ActionCallback. mk_ActionCallback :: C_ActionCallback -> IO (FunPtr C_ActionCallback) -- | A convenience synonym for Nothing :: Maybe -- ActionCallback. noActionCallback :: Maybe ActionCallback -- | A convenience synonym for Nothing :: Maybe -- ActionCallback_WithClosures. noActionCallback_WithClosures :: Maybe ActionCallback_WithClosures -- | Wrap a ActionCallback into a C_ActionCallback. wrap_ActionCallback :: Maybe (Ptr (FunPtr C_ActionCallback)) -> ActionCallback_WithClosures -> C_ActionCallback -- | No description available in the introspection data. module GI.Notify.Objects.Notification -- | Memory-managed wrapper type. newtype Notification Notification :: ManagedPtr Notification -> Notification -- | Type class for types which can be safely cast to Notification, -- for instance with toNotification. class (GObject o, IsDescendantOf Notification o) => IsNotification o -- | Cast to Notification, for types for which this is known to be -- safe. For general casts, use castTo. toNotification :: (MonadIO m, IsNotification o) => o -> m Notification -- | A convenience alias for Nothing :: Maybe -- Notification. noNotification :: Maybe Notification -- | Adds an action to a notification. When the action is invoked, the -- specified callback function will be called, along with the value -- passed to userData. notificationAddAction :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> ActionCallback -> m () -- | Clears all actions from the notification. notificationClearActions :: (HasCallStack, MonadIO m, IsNotification a) => a -> m () -- | Clears all hints from the notification. notificationClearHints :: (HasCallStack, MonadIO m, IsNotification a) => a -> m () -- | Synchronously tells the notification server to hide the notification -- on the screen. notificationClose :: (HasCallStack, MonadIO m, IsNotification a) => a -> m () -- | Returns the closed reason code for the notification. This is valid -- only after the "closed" signal is emitted. notificationGetClosedReason :: (HasCallStack, MonadIO m, IsNotification a) => a -> m Int32 -- | Creates a new Notification. The summary text is required, but -- all other parameters are optional. notificationNew :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Maybe Text -> m Notification -- | Sets the application name for the notification. If this function is -- not called or if appName is Nothing, the -- application name will be set from the value used in init or -- overridden with setAppName. -- -- Since: 0.7.3 notificationSetAppName :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m () -- | Sets the category of this notification. This can be used by the -- notification server to filter or display the data in a certain way. notificationSetCategory :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m () -- | Sets a hint for key with value value. -- If value is Nothing, a previously set hint for -- key is unset. -- -- If value is floating, it is consumed. -- -- Since: 0.6 notificationSetHint :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Maybe GVariant -> m () -- | Sets a hint with a byte value. -- | Deprecated: (Since version 0.6.)Use notificationSetHint -- instead notificationSetHintByte :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Word8 -> m () -- | Sets a hint with a byte array value. The length of -- value must be passed as len. -- | Deprecated: (Since version 0.6.)Use notificationSetHint -- instead notificationSetHintByteArray :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> ByteString -> m () -- | Sets a hint with a double value. -- | Deprecated: (Since version 0.6.)Use notificationSetHint -- instead notificationSetHintDouble :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Double -> m () -- | Sets a hint with a 32-bit integer value. -- | Deprecated: (Since version 0.6.)Use notificationSetHint -- instead notificationSetHintInt32 :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Int32 -> m () -- | Sets a hint with a string value. -- | Deprecated: (Since version 0.6.)Use notificationSetHint -- instead notificationSetHintString :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> m () -- | Sets a hint with an unsigned 32-bit integer value. -- | Deprecated: (Since version 0.6.)Use notificationSetHint -- instead notificationSetHintUint32 :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Word32 -> m () -- | Sets the icon in the notification from a Pixbuf. -- | Deprecated: use notificationSetImageFromPixbuf instead. notificationSetIconFromPixbuf :: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) => a -> b -> m () -- | Sets the image in the notification from a Pixbuf. notificationSetImageFromPixbuf :: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) => a -> b -> m () -- | Sets the timeout of the notification. To set the default time, pass -- EXPIRES_DEFAULT as timeout. To set the -- notification to never expire, pass EXPIRES_NEVER. -- -- Note that the timeout may be ignored by the server. notificationSetTimeout :: (HasCallStack, MonadIO m, IsNotification a) => a -> Int32 -> m () -- | Sets the urgency level of this notification. -- -- See: Urgency notificationSetUrgency :: (HasCallStack, MonadIO m, IsNotification a) => a -> Urgency -> m () -- | Tells the notification server to display the notification on the -- screen. notificationShow :: (HasCallStack, MonadIO m, IsNotification a) => a -> m () -- | Updates the notification text and icon. This won't send the update out -- and display it on the screen. For that, you will need to call -- notificationShow. notificationUpdate :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Maybe Text -> Maybe Text -> m Bool -- | Construct a GValueConstruct with valid value for the -- “app-name” property. This is rarely needed directly, but it -- is used by new. constructNotificationAppName :: IsNotification o => Text -> IO (GValueConstruct o) -- | Get the value of the “app-name” property. When -- overloading is enabled, this is equivalent to -- --
--   get notification #appName
--   
getNotificationAppName :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) -- | Set the value of the “app-name” property. When -- overloading is enabled, this is equivalent to -- --
--   set notification [ #appName := value ]
--   
setNotificationAppName :: (MonadIO m, IsNotification o) => o -> Text -> m () -- | Set the value of the “body” property to Nothing. When -- overloading is enabled, this is equivalent to -- --
--   clear #body
--   
clearNotificationBody :: (MonadIO m, IsNotification o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “body” property. This is rarely needed directly, but it is -- used by new. constructNotificationBody :: IsNotification o => Text -> IO (GValueConstruct o) -- | Get the value of the “body” property. When overloading -- is enabled, this is equivalent to -- --
--   get notification #body
--   
getNotificationBody :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) -- | Set the value of the “body” property. When overloading -- is enabled, this is equivalent to -- --
--   set notification [ #body := value ]
--   
setNotificationBody :: (MonadIO m, IsNotification o) => o -> Text -> m () -- | Get the value of the “closed-reason” property. When -- overloading is enabled, this is equivalent to -- --
--   get notification #closedReason
--   
getNotificationClosedReason :: (MonadIO m, IsNotification o) => o -> m Int32 -- | Set the value of the “icon-name” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
--   clear #iconName
--   
clearNotificationIconName :: (MonadIO m, IsNotification o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “icon-name” property. This is rarely needed directly, but it -- is used by new. constructNotificationIconName :: IsNotification o => Text -> IO (GValueConstruct o) -- | Get the value of the “icon-name” property. When -- overloading is enabled, this is equivalent to -- --
--   get notification #iconName
--   
getNotificationIconName :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) -- | Set the value of the “icon-name” property. When -- overloading is enabled, this is equivalent to -- --
--   set notification [ #iconName := value ]
--   
setNotificationIconName :: (MonadIO m, IsNotification o) => o -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “id” property. This is rarely needed directly, but it is used -- by new. constructNotificationId :: IsNotification o => Int32 -> IO (GValueConstruct o) -- | Get the value of the “id” property. When overloading -- is enabled, this is equivalent to -- --
--   get notification #id
--   
getNotificationId :: (MonadIO m, IsNotification o) => o -> m Int32 -- | Set the value of the “id” property. When overloading -- is enabled, this is equivalent to -- --
--   set notification [ #id := value ]
--   
setNotificationId :: (MonadIO m, IsNotification o) => o -> Int32 -> m () -- | Set the value of the “summary” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
--   clear #summary
--   
clearNotificationSummary :: (MonadIO m, IsNotification o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “summary” property. This is rarely needed directly, but it is -- used by new. constructNotificationSummary :: IsNotification o => Text -> IO (GValueConstruct o) -- | Get the value of the “summary” property. When -- overloading is enabled, this is equivalent to -- --
--   get notification #summary
--   
getNotificationSummary :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) -- | Set the value of the “summary” property. When -- overloading is enabled, this is equivalent to -- --
--   set notification [ #summary := value ]
--   
setNotificationSummary :: (MonadIO m, IsNotification o) => o -> Text -> m () -- | Type for the callback on the (unwrapped) C side. type C_NotificationClosedCallback = Ptr () -> Ptr () -> IO () -- | Emitted when the notification is closed. type NotificationClosedCallback = IO () -- | Connect a signal handler for the closed signal, to be run after -- the default handler. When overloading is enabled, this is -- equivalent to -- --
--   after notification #closed callback
--   
afterNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_NotificationClosed :: MonadIO m => NotificationClosedCallback -> m (GClosure C_NotificationClosedCallback) -- | Generate a function pointer callable from C code, from a -- C_NotificationClosedCallback. mk_NotificationClosedCallback :: C_NotificationClosedCallback -> IO (FunPtr C_NotificationClosedCallback) -- | A convenience synonym for Nothing :: Maybe -- NotificationClosedCallback. noNotificationClosedCallback :: Maybe NotificationClosedCallback -- | Connect a signal handler for the closed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
--   on notification #closed callback
--   
onNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId -- | Wrap a NotificationClosedCallback into a -- C_NotificationClosedCallback. wrap_NotificationClosedCallback :: NotificationClosedCallback -> C_NotificationClosedCallback instance GHC.Classes.Eq GI.Notify.Objects.Notification.Notification instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Notify.Objects.Notification.Notification o) => GI.Notify.Objects.Notification.IsNotification o instance Data.GI.Base.BasicTypes.GObject GI.Notify.Objects.Notification.Notification instance Data.GI.Base.GValue.IsGValue GI.Notify.Objects.Notification.Notification instance Data.GI.Base.Overloading.HasParentTypes GI.Notify.Objects.Notification.Notification module GI.Notify.Objects module GI.Notify