gi-notify 0.7.17 → 0.7.18
raw patch · 12 files changed
+14/−2518 lines, 12 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- GI/Notify.hs +0/−54
- GI/Notify/Callbacks.hs +0/−142
- GI/Notify/Constants.hs +0/−70
- GI/Notify/Enums.hs +0/−87
- GI/Notify/Enums.hs-boot +0/−27
- GI/Notify/Functions.hs +0/−278
- GI/Notify/Objects.hs +0/−41
- GI/Notify/Objects/Notification.hs +0/−1707
- GI/Notify/Objects/Notification.hs-boot +0/−110
- README.md +1/−1
- gi-notify.cabal +9/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+### 0.7.18+++ List autogenerated modules in .cabal file+ ### 0.7.17 + Update to haskell-gi(-base) 0.22
− GI/Notify.hs
@@ -1,54 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Notify- ( module GI.Notify.Callbacks ,- module GI.Notify.Constants ,- module GI.Notify.Enums ,- module GI.Notify.Functions ,- module GI.Notify.Objects ,---- module Data.GI.Base ,--- ) where--import GI.Notify.Callbacks-import GI.Notify.Constants-import GI.Notify.Enums-import GI.Notify.Functions-import GI.Notify.Objects--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---import Data.GI.Base-
− GI/Notify/Callbacks.hs
@@ -1,142 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Notify.Callbacks- ( -- -- * Signals--- ** ActionCallback #signal:ActionCallback#-- ActionCallback ,- ActionCallback_WithClosures ,- C_ActionCallback ,- drop_closures_ActionCallback ,- dynamic_ActionCallback ,- genClosure_ActionCallback ,- mk_ActionCallback ,- noActionCallback ,- noActionCallback_WithClosures ,- wrap_ActionCallback ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Notify.Objects.Notification as Notify.Notification---- callback ActionCallback--- -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "action", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "An action callback function.", sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_ActionCallback =- Ptr Notify.Notification.Notification ->- CString ->- Ptr () ->- IO ()---- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "action", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_ActionCallback :: FunPtr C_ActionCallback -> C_ActionCallback---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_ActionCallback ::- (B.CallStack.HasCallStack, MonadIO m, Notify.Notification.IsNotification a) =>- FunPtr C_ActionCallback- -> a- -> T.Text- -> Ptr ()- -> m ()-dynamic_ActionCallback __funPtr notification action userData = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- action' <- textToCString action- (__dynamic_C_ActionCallback __funPtr) notification' action' userData- touchManagedPtr notification- freeMem action'- return ()---- | Generate a function pointer callable from C code, from a `C_ActionCallback`.-foreign import ccall "wrapper"- mk_ActionCallback :: C_ActionCallback -> IO (FunPtr C_ActionCallback)--{- |-An action callback function.--}-type ActionCallback =- Notify.Notification.Notification- -> T.Text- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ActionCallback`@.-noActionCallback :: Maybe ActionCallback-noActionCallback = Nothing--{- |-An action callback function.--}-type ActionCallback_WithClosures =- Notify.Notification.Notification- -> T.Text- -> Ptr ()- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ActionCallback_WithClosures`@.-noActionCallback_WithClosures :: Maybe ActionCallback_WithClosures-noActionCallback_WithClosures = Nothing---- | A simple wrapper that ignores the closure arguments.-drop_closures_ActionCallback :: ActionCallback -> ActionCallback_WithClosures-drop_closures_ActionCallback _f notification action _ = _f notification action---- | Wrap the callback into a `GClosure`.-genClosure_ActionCallback :: MonadIO m => ActionCallback -> m (GClosure C_ActionCallback)-genClosure_ActionCallback cb = liftIO $ do- let cb' = drop_closures_ActionCallback cb- let cb'' = wrap_ActionCallback Nothing cb'- mk_ActionCallback cb'' >>= B.GClosure.newGClosure----- | Wrap a `ActionCallback` into a `C_ActionCallback`.-wrap_ActionCallback ::- Maybe (Ptr (FunPtr C_ActionCallback)) ->- ActionCallback_WithClosures ->- C_ActionCallback-wrap_ActionCallback funptrptr _cb notification action userData = do- notification' <- (newObject Notify.Notification.Notification) notification- action' <- cstringToText action- _cb notification' action' userData- maybeReleaseFunPtr funptrptr---
− GI/Notify/Constants.hs
@@ -1,70 +0,0 @@-{-# LANGUAGE PatternSynonyms, ScopedTypeVariables, ViewPatterns #-}---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Notify.Constants- ( - pattern VERSION_MINOR ,- pattern VERSION_MICRO ,- pattern VERSION_MAJOR ,- pattern EXPIRES_NEVER ,- pattern EXPIRES_DEFAULT ,-- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---{- |-/No description available in the introspection data./--}-pattern VERSION_MINOR = 7 :: Int32--{- |-/No description available in the introspection data./--}-pattern VERSION_MICRO = 8 :: Int32--{- |-/No description available in the introspection data./--}-pattern VERSION_MAJOR = 0 :: Int32--{- |-The notification never expires. It stays open until closed by the calling API-or the user.--}-pattern EXPIRES_NEVER = 0 :: Int32--{- |-The default expiration time on a notification.--}-pattern EXPIRES_DEFAULT = -1 :: Int32--
− GI/Notify/Enums.hs
@@ -1,87 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Notify.Enums- ( -- -- * Enumerations--- ** Urgency #enum:Urgency#-- Urgency(..) ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- Enum Urgency-{- |-The urgency level of the notification.--}-data Urgency = - UrgencyLow- {- ^- Low urgency. Used for unimportant notifications.- -}- | UrgencyNormal- {- ^- Normal urgency. Used for most standard notifications.- -}- | UrgencyCritical- {- ^- Critical urgency. Used for very important notifications.- -}- | AnotherUrgency Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Urgency where- fromEnum UrgencyLow = 0- fromEnum UrgencyNormal = 1- fromEnum UrgencyCritical = 2- fromEnum (AnotherUrgency k) = k-- toEnum 0 = UrgencyLow- toEnum 1 = UrgencyNormal- toEnum 2 = UrgencyCritical- toEnum k = AnotherUrgency k--instance P.Ord Urgency where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "notify_urgency_get_type" c_notify_urgency_get_type :: - IO GType--instance BoxedEnum Urgency where- boxedEnumType _ = c_notify_urgency_get_type--
− GI/Notify/Enums.hs-boot
@@ -1,27 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Notify.Enums where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--data Urgency-instance P.Enum Urgency where-instance BoxedEnum Urgency where
− GI/Notify/Functions.hs
@@ -1,278 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Notify.Functions- ( -- -- * Methods--- ** getAppName #method:getAppName#-- getAppName ,----- ** getServerCaps #method:getServerCaps#-- getServerCaps ,----- ** getServerInfo #method:getServerInfo#-- getServerInfo ,----- ** init #method:init#-- init ,----- ** isInitted #method:isInitted#-- isInitted ,----- ** setAppName #method:setAppName#-- setAppName ,----- ** uninit #method:uninit#-- uninit ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- function notify_uninit--- Args : []--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_uninit" notify_uninit :: - IO ()--{- |-Uninitialized libnotify.--This should be called when the program no longer needs libnotify for-the rest of its lifecycle, typically just before exitting.--}-uninit ::- (B.CallStack.HasCallStack, MonadIO m) =>- m ()-uninit = liftIO $ do- notify_uninit- return ()----- function notify_set_app_name--- Args : [Arg {argCName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The name of the application", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_set_app_name" notify_set_app_name :: - CString -> -- app_name : TBasicType TUTF8- IO ()--{- |-Sets the application name.--}-setAppName ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@appName@/: The name of the application -}- -> m ()-setAppName appName = liftIO $ do- appName' <- textToCString appName- notify_set_app_name appName'- freeMem appName'- return ()----- function notify_is_initted--- Args : []--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "notify_is_initted" notify_is_initted :: - IO CInt--{- |-Gets whether or not libnotify is initialized.--}-isInitted ::- (B.CallStack.HasCallStack, MonadIO m) =>- m Bool- {- ^ __Returns:__ 'True' if libnotify is initialized, or 'False' otherwise. -}-isInitted = liftIO $ do- result <- notify_is_initted- let result' = (/= 0) result- return result'----- function notify_init--- Args : [Arg {argCName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The name of the application initializing libnotify.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "notify_init" notify_init :: - CString -> -- app_name : TBasicType TUTF8- IO CInt--{- |-Initialized libnotify. This must be called before any other functions.--}-init ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@appName@/: The name of the application initializing libnotify. -}- -> m Bool- {- ^ __Returns:__ 'True' if successful, or 'False' on error. -}-init appName = liftIO $ do- appName' <- textToCString appName- result <- notify_init appName'- let result' = (/= 0) result- freeMem appName'- return result'----- function notify_get_server_info--- Args : [Arg {argCName = "ret_name", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a location to store the server name, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "ret_vendor", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a location to store the server vendor, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "ret_version", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a location to store the server version, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "ret_spec_version", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a location to store the version the service is compliant with, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "notify_get_server_info" notify_get_server_info :: - Ptr CString -> -- ret_name : TBasicType TUTF8- Ptr CString -> -- ret_vendor : TBasicType TUTF8- Ptr CString -> -- ret_version : TBasicType TUTF8- Ptr CString -> -- ret_spec_version : TBasicType TUTF8- IO CInt--{- |-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 ::- (B.CallStack.HasCallStack, MonadIO m) =>- m ((Bool, T.Text, T.Text, T.Text, T.Text))- {- ^ __Returns:__ 'True' if successful, and the variables passed will be set, 'False'- on error. The returned strings must be freed with g_free -}-getServerInfo = liftIO $ do- retName <- allocMem :: IO (Ptr CString)- retVendor <- allocMem :: IO (Ptr CString)- retVersion <- allocMem :: IO (Ptr CString)- retSpecVersion <- allocMem :: IO (Ptr CString)- result <- notify_get_server_info retName retVendor retVersion retSpecVersion- let result' = (/= 0) result- retName' <- peek retName- retName'' <- cstringToText retName'- freeMem retName'- retVendor' <- peek retVendor- retVendor'' <- cstringToText retVendor'- freeMem retVendor'- retVersion' <- peek retVersion- retVersion'' <- cstringToText retVersion'- freeMem retVersion'- retSpecVersion' <- peek retSpecVersion- retSpecVersion'' <- cstringToText retSpecVersion'- freeMem retSpecVersion'- freeMem retName- freeMem retVendor- freeMem retVersion- freeMem retSpecVersion- return (result', retName'', retVendor'', retVersion'', retSpecVersion'')----- function notify_get_server_caps--- Args : []--- Lengths : []--- returnType : Just (TGList (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "notify_get_server_caps" notify_get_server_caps :: - IO (Ptr (GList CString))--{- |-Synchronously queries the server for its capabilities and returns them in a 'GI.GLib.Structs.List.List'.--}-getServerCaps ::- (B.CallStack.HasCallStack, MonadIO m) =>- m [T.Text]- {- ^ __Returns:__ a 'GI.GLib.Structs.List.List' of server capability strings. Free- the list elements with 'GI.GLib.Functions.free' and the list itself with @/g_list_free()/@. -}-getServerCaps = liftIO $ do- result <- notify_get_server_caps- result' <- unpackGList result- result'' <- mapM cstringToText result'- mapGList freeMem result- g_list_free result- return result''----- function notify_get_app_name--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "notify_get_app_name" notify_get_app_name :: - IO CString--{- |-Gets the application name registered.--}-getAppName ::- (B.CallStack.HasCallStack, MonadIO m) =>- m T.Text- {- ^ __Returns:__ The registered application name, passed to 'GI.Notify.Functions.init'. -}-getAppName = liftIO $ do- result <- notify_get_app_name- checkUnexpectedReturnNULL "getAppName" result- result' <- cstringToText result- return result'---
− GI/Notify/Objects.hs
@@ -1,41 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Notify.Objects- ( module GI.Notify.Objects.Notification ,--- ) where--import GI.Notify.Objects.Notification--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---
− GI/Notify/Objects/Notification.hs
@@ -1,1707 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--/No description available in the introspection data./--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Notify.Objects.Notification- ( ---- * Exported types- Notification(..) ,- IsNotification ,- toNotification ,- noNotification ,--- -- * Methods--- ** addAction #method:addAction#--#if ENABLE_OVERLOADING- NotificationAddActionMethodInfo ,-#endif- notificationAddAction ,----- ** clearActions #method:clearActions#--#if ENABLE_OVERLOADING- NotificationClearActionsMethodInfo ,-#endif- notificationClearActions ,----- ** clearHints #method:clearHints#--#if ENABLE_OVERLOADING- NotificationClearHintsMethodInfo ,-#endif- notificationClearHints ,----- ** close #method:close#--#if ENABLE_OVERLOADING- NotificationCloseMethodInfo ,-#endif- notificationClose ,----- ** getClosedReason #method:getClosedReason#--#if ENABLE_OVERLOADING- NotificationGetClosedReasonMethodInfo ,-#endif- notificationGetClosedReason ,----- ** new #method:new#-- notificationNew ,----- ** setAppName #method:setAppName#--#if ENABLE_OVERLOADING- NotificationSetAppNameMethodInfo ,-#endif- notificationSetAppName ,----- ** setCategory #method:setCategory#--#if ENABLE_OVERLOADING- NotificationSetCategoryMethodInfo ,-#endif- notificationSetCategory ,----- ** setHint #method:setHint#--#if ENABLE_OVERLOADING- NotificationSetHintMethodInfo ,-#endif- notificationSetHint ,----- ** setHintByte #method:setHintByte#--#if ENABLE_OVERLOADING- NotificationSetHintByteMethodInfo ,-#endif- notificationSetHintByte ,----- ** setHintByteArray #method:setHintByteArray#--#if ENABLE_OVERLOADING- NotificationSetHintByteArrayMethodInfo ,-#endif- notificationSetHintByteArray ,----- ** setHintDouble #method:setHintDouble#--#if ENABLE_OVERLOADING- NotificationSetHintDoubleMethodInfo ,-#endif- notificationSetHintDouble ,----- ** setHintInt32 #method:setHintInt32#--#if ENABLE_OVERLOADING- NotificationSetHintInt32MethodInfo ,-#endif- notificationSetHintInt32 ,----- ** setHintString #method:setHintString#--#if ENABLE_OVERLOADING- NotificationSetHintStringMethodInfo ,-#endif- notificationSetHintString ,----- ** setHintUint32 #method:setHintUint32#--#if ENABLE_OVERLOADING- NotificationSetHintUint32MethodInfo ,-#endif- notificationSetHintUint32 ,----- ** setIconFromPixbuf #method:setIconFromPixbuf#--#if ENABLE_OVERLOADING- NotificationSetIconFromPixbufMethodInfo ,-#endif- notificationSetIconFromPixbuf ,----- ** setImageFromPixbuf #method:setImageFromPixbuf#--#if ENABLE_OVERLOADING- NotificationSetImageFromPixbufMethodInfo,-#endif- notificationSetImageFromPixbuf ,----- ** setTimeout #method:setTimeout#--#if ENABLE_OVERLOADING- NotificationSetTimeoutMethodInfo ,-#endif- notificationSetTimeout ,----- ** setUrgency #method:setUrgency#--#if ENABLE_OVERLOADING- NotificationSetUrgencyMethodInfo ,-#endif- notificationSetUrgency ,----- ** show #method:show#--#if ENABLE_OVERLOADING- NotificationShowMethodInfo ,-#endif- notificationShow ,----- ** update #method:update#--#if ENABLE_OVERLOADING- NotificationUpdateMethodInfo ,-#endif- notificationUpdate ,----- -- * Properties--- ** appName #attr:appName#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- NotificationAppNamePropertyInfo ,-#endif- constructNotificationAppName ,- getNotificationAppName ,-#if ENABLE_OVERLOADING- notificationAppName ,-#endif- setNotificationAppName ,----- ** body #attr:body#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- NotificationBodyPropertyInfo ,-#endif- clearNotificationBody ,- constructNotificationBody ,- getNotificationBody ,-#if ENABLE_OVERLOADING- notificationBody ,-#endif- setNotificationBody ,----- ** closedReason #attr:closedReason#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- NotificationClosedReasonPropertyInfo ,-#endif- getNotificationClosedReason ,-#if ENABLE_OVERLOADING- notificationClosedReason ,-#endif----- ** iconName #attr:iconName#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- NotificationIconNamePropertyInfo ,-#endif- clearNotificationIconName ,- constructNotificationIconName ,- getNotificationIconName ,-#if ENABLE_OVERLOADING- notificationIconName ,-#endif- setNotificationIconName ,----- ** id #attr:id#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- NotificationIdPropertyInfo ,-#endif- constructNotificationId ,- getNotificationId ,-#if ENABLE_OVERLOADING- notificationId ,-#endif- setNotificationId ,----- ** summary #attr:summary#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- NotificationSummaryPropertyInfo ,-#endif- clearNotificationSummary ,- constructNotificationSummary ,- getNotificationSummary ,-#if ENABLE_OVERLOADING- notificationSummary ,-#endif- setNotificationSummary ,----- -- * Signals--- ** closed #signal:closed#-- C_NotificationClosedCallback ,- NotificationClosedCallback ,-#if ENABLE_OVERLOADING- NotificationClosedSignalInfo ,-#endif- afterNotificationClosed ,- genClosure_NotificationClosed ,- mk_NotificationClosedCallback ,- noNotificationClosedCallback ,- onNotificationClosed ,- wrap_NotificationClosedCallback ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GLib.Callbacks as GLib.Callbacks-import qualified GI.GObject.Objects.Object as GObject.Object-import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf-import qualified GI.Notify.Callbacks as Notify.Callbacks-import {-# SOURCE #-} qualified GI.Notify.Enums as Notify.Enums---- | Memory-managed wrapper type.-newtype Notification = Notification (ManagedPtr Notification)-foreign import ccall "notify_notification_get_type"- c_notify_notification_get_type :: IO GType--instance GObject Notification where- gobjectType = c_notify_notification_get_type- ---- | Type class for types which can be safely cast to `Notification`, for instance with `toNotification`.-class (GObject o, O.IsDescendantOf Notification o) => IsNotification o-instance (GObject o, O.IsDescendantOf Notification o) => IsNotification o--instance O.HasParentTypes Notification-type instance O.ParentTypes Notification = '[GObject.Object.Object]---- | Cast to `Notification`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toNotification :: (MonadIO m, IsNotification o) => o -> m Notification-toNotification = liftIO . unsafeCastTo Notification---- | A convenience alias for `Nothing` :: `Maybe` `Notification`.-noNotification :: Maybe Notification-noNotification = Nothing--#if ENABLE_OVERLOADING-type family ResolveNotificationMethod (t :: Symbol) (o :: *) :: * where- ResolveNotificationMethod "addAction" o = NotificationAddActionMethodInfo- ResolveNotificationMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveNotificationMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveNotificationMethod "clearActions" o = NotificationClearActionsMethodInfo- ResolveNotificationMethod "clearHints" o = NotificationClearHintsMethodInfo- ResolveNotificationMethod "close" o = NotificationCloseMethodInfo- ResolveNotificationMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveNotificationMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveNotificationMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveNotificationMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveNotificationMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveNotificationMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveNotificationMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveNotificationMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveNotificationMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveNotificationMethod "show" o = NotificationShowMethodInfo- ResolveNotificationMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveNotificationMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveNotificationMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveNotificationMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveNotificationMethod "update" o = NotificationUpdateMethodInfo- ResolveNotificationMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveNotificationMethod "getClosedReason" o = NotificationGetClosedReasonMethodInfo- ResolveNotificationMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveNotificationMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveNotificationMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveNotificationMethod "setAppName" o = NotificationSetAppNameMethodInfo- ResolveNotificationMethod "setCategory" o = NotificationSetCategoryMethodInfo- ResolveNotificationMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveNotificationMethod "setHint" o = NotificationSetHintMethodInfo- ResolveNotificationMethod "setHintByte" o = NotificationSetHintByteMethodInfo- ResolveNotificationMethod "setHintByteArray" o = NotificationSetHintByteArrayMethodInfo- ResolveNotificationMethod "setHintDouble" o = NotificationSetHintDoubleMethodInfo- ResolveNotificationMethod "setHintInt32" o = NotificationSetHintInt32MethodInfo- ResolveNotificationMethod "setHintString" o = NotificationSetHintStringMethodInfo- ResolveNotificationMethod "setHintUint32" o = NotificationSetHintUint32MethodInfo- ResolveNotificationMethod "setIconFromPixbuf" o = NotificationSetIconFromPixbufMethodInfo- ResolveNotificationMethod "setImageFromPixbuf" o = NotificationSetImageFromPixbufMethodInfo- ResolveNotificationMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveNotificationMethod "setTimeout" o = NotificationSetTimeoutMethodInfo- ResolveNotificationMethod "setUrgency" o = NotificationSetUrgencyMethodInfo- ResolveNotificationMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveNotificationMethod t Notification, O.MethodInfo info Notification p) => OL.IsLabel t (Notification -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif---- signal Notification::closed-{- |-Emitted when the notification is closed.--}-type NotificationClosedCallback =- IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `NotificationClosedCallback`@.-noNotificationClosedCallback :: Maybe NotificationClosedCallback-noNotificationClosedCallback = Nothing---- | Type for the callback on the (unwrapped) C side.-type C_NotificationClosedCallback =- Ptr () -> -- object- Ptr () -> -- user_data- IO ()---- | Generate a function pointer callable from C code, from a `C_NotificationClosedCallback`.-foreign import ccall "wrapper"- mk_NotificationClosedCallback :: C_NotificationClosedCallback -> IO (FunPtr C_NotificationClosedCallback)---- | Wrap the callback into a `GClosure`.-genClosure_NotificationClosed :: MonadIO m => NotificationClosedCallback -> m (GClosure C_NotificationClosedCallback)-genClosure_NotificationClosed cb = liftIO $ do- let cb' = wrap_NotificationClosedCallback cb- mk_NotificationClosedCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `NotificationClosedCallback` into a `C_NotificationClosedCallback`.-wrap_NotificationClosedCallback ::- NotificationClosedCallback ->- C_NotificationClosedCallback-wrap_NotificationClosedCallback _cb _ _ = do- _cb ---{- |-Connect a signal handler for the “@closed@” signal, to be run before the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.on' notification #closed callback-@--}-onNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId-onNotificationClosed obj cb = liftIO $ do- let cb' = wrap_NotificationClosedCallback cb- cb'' <- mk_NotificationClosedCallback cb'- connectSignalFunPtr obj "closed" cb'' SignalConnectBefore--{- |-Connect a signal handler for the “@closed@” signal, to be run after the default handler.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Signals.after' notification #closed callback-@--}-afterNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId-afterNotificationClosed obj cb = liftIO $ do- let cb' = wrap_NotificationClosedCallback cb- cb'' <- mk_NotificationClosedCallback cb'- connectSignalFunPtr obj "closed" cb'' SignalConnectAfter----- VVV Prop "app-name"- -- Type: TBasicType TUTF8- -- Flags: [PropertyReadable,PropertyWritable]- -- Nullable: (Nothing,Just False)--{- |-Get the value of the “@app-name@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' notification #appName-@--}-getNotificationAppName :: (MonadIO m, IsNotification o) => o -> m (Maybe T.Text)-getNotificationAppName obj = liftIO $ B.Properties.getObjectPropertyString obj "app-name"--{- |-Set the value of the “@app-name@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' notification [ #appName 'Data.GI.Base.Attributes.:=' value ]-@--}-setNotificationAppName :: (MonadIO m, IsNotification o) => o -> T.Text -> m ()-setNotificationAppName obj val = liftIO $ B.Properties.setObjectPropertyString obj "app-name" (Just val)--{- |-Construct a `GValueConstruct` with valid value for the “@app-name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructNotificationAppName :: (IsNotification o) => T.Text -> IO (GValueConstruct o)-constructNotificationAppName val = B.Properties.constructObjectPropertyString "app-name" (Just val)--#if ENABLE_OVERLOADING-data NotificationAppNamePropertyInfo-instance AttrInfo NotificationAppNamePropertyInfo where- type AttrAllowedOps NotificationAppNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]- type AttrSetTypeConstraint NotificationAppNamePropertyInfo = (~) T.Text- type AttrBaseTypeConstraint NotificationAppNamePropertyInfo = IsNotification- type AttrGetType NotificationAppNamePropertyInfo = (Maybe T.Text)- type AttrLabel NotificationAppNamePropertyInfo = "app-name"- type AttrOrigin NotificationAppNamePropertyInfo = Notification- attrGet _ = getNotificationAppName- attrSet _ = setNotificationAppName- attrConstruct _ = constructNotificationAppName- attrClear _ = undefined-#endif---- VVV Prop "body"- -- Type: TBasicType TUTF8- -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]- -- Nullable: (Nothing,Nothing)--{- |-Get the value of the “@body@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' notification #body-@--}-getNotificationBody :: (MonadIO m, IsNotification o) => o -> m (Maybe T.Text)-getNotificationBody obj = liftIO $ B.Properties.getObjectPropertyString obj "body"--{- |-Set the value of the “@body@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' notification [ #body 'Data.GI.Base.Attributes.:=' value ]-@--}-setNotificationBody :: (MonadIO m, IsNotification o) => o -> T.Text -> m ()-setNotificationBody obj val = liftIO $ B.Properties.setObjectPropertyString obj "body" (Just val)--{- |-Construct a `GValueConstruct` with valid value for the “@body@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructNotificationBody :: (IsNotification o) => T.Text -> IO (GValueConstruct o)-constructNotificationBody val = B.Properties.constructObjectPropertyString "body" (Just val)--{- |-Set the value of the “@body@” property to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #body-@--}-clearNotificationBody :: (MonadIO m, IsNotification o) => o -> m ()-clearNotificationBody obj = liftIO $ B.Properties.setObjectPropertyString obj "body" (Nothing :: Maybe T.Text)--#if ENABLE_OVERLOADING-data NotificationBodyPropertyInfo-instance AttrInfo NotificationBodyPropertyInfo where- type AttrAllowedOps NotificationBodyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint NotificationBodyPropertyInfo = (~) T.Text- type AttrBaseTypeConstraint NotificationBodyPropertyInfo = IsNotification- type AttrGetType NotificationBodyPropertyInfo = (Maybe T.Text)- type AttrLabel NotificationBodyPropertyInfo = "body"- type AttrOrigin NotificationBodyPropertyInfo = Notification- attrGet _ = getNotificationBody- attrSet _ = setNotificationBody- attrConstruct _ = constructNotificationBody- attrClear _ = clearNotificationBody-#endif---- VVV Prop "closed-reason"- -- Type: TBasicType TInt- -- Flags: [PropertyReadable]- -- Nullable: (Just False,Nothing)--{- |-Get the value of the “@closed-reason@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' notification #closedReason-@--}-getNotificationClosedReason :: (MonadIO m, IsNotification o) => o -> m Int32-getNotificationClosedReason obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "closed-reason"--#if ENABLE_OVERLOADING-data NotificationClosedReasonPropertyInfo-instance AttrInfo NotificationClosedReasonPropertyInfo where- type AttrAllowedOps NotificationClosedReasonPropertyInfo = '[ 'AttrGet]- type AttrSetTypeConstraint NotificationClosedReasonPropertyInfo = (~) ()- type AttrBaseTypeConstraint NotificationClosedReasonPropertyInfo = IsNotification- type AttrGetType NotificationClosedReasonPropertyInfo = Int32- type AttrLabel NotificationClosedReasonPropertyInfo = "closed-reason"- type AttrOrigin NotificationClosedReasonPropertyInfo = Notification- attrGet _ = getNotificationClosedReason- attrSet _ = undefined- attrConstruct _ = undefined- attrClear _ = undefined-#endif---- VVV Prop "icon-name"- -- Type: TBasicType TUTF8- -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]- -- Nullable: (Nothing,Nothing)--{- |-Get the value of the “@icon-name@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' notification #iconName-@--}-getNotificationIconName :: (MonadIO m, IsNotification o) => o -> m (Maybe T.Text)-getNotificationIconName obj = liftIO $ B.Properties.getObjectPropertyString obj "icon-name"--{- |-Set the value of the “@icon-name@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' notification [ #iconName 'Data.GI.Base.Attributes.:=' value ]-@--}-setNotificationIconName :: (MonadIO m, IsNotification o) => o -> T.Text -> m ()-setNotificationIconName obj val = liftIO $ B.Properties.setObjectPropertyString obj "icon-name" (Just val)--{- |-Construct a `GValueConstruct` with valid value for the “@icon-name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructNotificationIconName :: (IsNotification o) => T.Text -> IO (GValueConstruct o)-constructNotificationIconName val = B.Properties.constructObjectPropertyString "icon-name" (Just val)--{- |-Set the value of the “@icon-name@” property to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #iconName-@--}-clearNotificationIconName :: (MonadIO m, IsNotification o) => o -> m ()-clearNotificationIconName obj = liftIO $ B.Properties.setObjectPropertyString obj "icon-name" (Nothing :: Maybe T.Text)--#if ENABLE_OVERLOADING-data NotificationIconNamePropertyInfo-instance AttrInfo NotificationIconNamePropertyInfo where- type AttrAllowedOps NotificationIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint NotificationIconNamePropertyInfo = (~) T.Text- type AttrBaseTypeConstraint NotificationIconNamePropertyInfo = IsNotification- type AttrGetType NotificationIconNamePropertyInfo = (Maybe T.Text)- type AttrLabel NotificationIconNamePropertyInfo = "icon-name"- type AttrOrigin NotificationIconNamePropertyInfo = Notification- attrGet _ = getNotificationIconName- attrSet _ = setNotificationIconName- attrConstruct _ = constructNotificationIconName- attrClear _ = clearNotificationIconName-#endif---- VVV Prop "id"- -- Type: TBasicType TInt- -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]- -- Nullable: (Nothing,Nothing)--{- |-Get the value of the “@id@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' notification #id-@--}-getNotificationId :: (MonadIO m, IsNotification o) => o -> m Int32-getNotificationId obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "id"--{- |-Set the value of the “@id@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' notification [ #id 'Data.GI.Base.Attributes.:=' value ]-@--}-setNotificationId :: (MonadIO m, IsNotification o) => o -> Int32 -> m ()-setNotificationId obj val = liftIO $ B.Properties.setObjectPropertyInt32 obj "id" val--{- |-Construct a `GValueConstruct` with valid value for the “@id@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructNotificationId :: (IsNotification o) => Int32 -> IO (GValueConstruct o)-constructNotificationId val = B.Properties.constructObjectPropertyInt32 "id" val--#if ENABLE_OVERLOADING-data NotificationIdPropertyInfo-instance AttrInfo NotificationIdPropertyInfo where- type AttrAllowedOps NotificationIdPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]- type AttrSetTypeConstraint NotificationIdPropertyInfo = (~) Int32- type AttrBaseTypeConstraint NotificationIdPropertyInfo = IsNotification- type AttrGetType NotificationIdPropertyInfo = Int32- type AttrLabel NotificationIdPropertyInfo = "id"- type AttrOrigin NotificationIdPropertyInfo = Notification- attrGet _ = getNotificationId- attrSet _ = setNotificationId- attrConstruct _ = constructNotificationId- attrClear _ = undefined-#endif---- VVV Prop "summary"- -- Type: TBasicType TUTF8- -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]- -- Nullable: (Nothing,Nothing)--{- |-Get the value of the “@summary@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' notification #summary-@--}-getNotificationSummary :: (MonadIO m, IsNotification o) => o -> m (Maybe T.Text)-getNotificationSummary obj = liftIO $ B.Properties.getObjectPropertyString obj "summary"--{- |-Set the value of the “@summary@” property.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' notification [ #summary 'Data.GI.Base.Attributes.:=' value ]-@--}-setNotificationSummary :: (MonadIO m, IsNotification o) => o -> T.Text -> m ()-setNotificationSummary obj val = liftIO $ B.Properties.setObjectPropertyString obj "summary" (Just val)--{- |-Construct a `GValueConstruct` with valid value for the “@summary@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.--}-constructNotificationSummary :: (IsNotification o) => T.Text -> IO (GValueConstruct o)-constructNotificationSummary val = B.Properties.constructObjectPropertyString "summary" (Just val)--{- |-Set the value of the “@summary@” property to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #summary-@--}-clearNotificationSummary :: (MonadIO m, IsNotification o) => o -> m ()-clearNotificationSummary obj = liftIO $ B.Properties.setObjectPropertyString obj "summary" (Nothing :: Maybe T.Text)--#if ENABLE_OVERLOADING-data NotificationSummaryPropertyInfo-instance AttrInfo NotificationSummaryPropertyInfo where- type AttrAllowedOps NotificationSummaryPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint NotificationSummaryPropertyInfo = (~) T.Text- type AttrBaseTypeConstraint NotificationSummaryPropertyInfo = IsNotification- type AttrGetType NotificationSummaryPropertyInfo = (Maybe T.Text)- type AttrLabel NotificationSummaryPropertyInfo = "summary"- type AttrOrigin NotificationSummaryPropertyInfo = Notification- attrGet _ = getNotificationSummary- attrSet _ = setNotificationSummary- attrConstruct _ = constructNotificationSummary- attrClear _ = clearNotificationSummary-#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Notification-type instance O.AttributeList Notification = NotificationAttributeList-type NotificationAttributeList = ('[ '("appName", NotificationAppNamePropertyInfo), '("body", NotificationBodyPropertyInfo), '("closedReason", NotificationClosedReasonPropertyInfo), '("iconName", NotificationIconNamePropertyInfo), '("id", NotificationIdPropertyInfo), '("summary", NotificationSummaryPropertyInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-notificationAppName :: AttrLabelProxy "appName"-notificationAppName = AttrLabelProxy--notificationBody :: AttrLabelProxy "body"-notificationBody = AttrLabelProxy--notificationClosedReason :: AttrLabelProxy "closedReason"-notificationClosedReason = AttrLabelProxy--notificationIconName :: AttrLabelProxy "iconName"-notificationIconName = AttrLabelProxy--notificationId :: AttrLabelProxy "id"-notificationId = AttrLabelProxy--notificationSummary :: AttrLabelProxy "summary"-notificationSummary = AttrLabelProxy--#endif--#if ENABLE_OVERLOADING-data NotificationClosedSignalInfo-instance SignalInfo NotificationClosedSignalInfo where- type HaskellCallbackType NotificationClosedSignalInfo = NotificationClosedCallback- connectSignal _ obj cb connectMode = do- let cb' = wrap_NotificationClosedCallback cb- cb'' <- mk_NotificationClosedCallback cb'- connectSignalFunPtr obj "closed" cb'' connectMode--type instance O.SignalList Notification = NotificationSignalList-type NotificationSignalList = ('[ '("closed", NotificationClosedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method Notification::new--- method type : Constructor--- Args : [Arg {argCName = "summary", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The required summary text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "body", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The optional body text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "icon", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The optional icon theme icon name or filename.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Notify", name = "Notification"}))--- throws : False--- Skip return : False--foreign import ccall "notify_notification_new" notify_notification_new :: - CString -> -- summary : TBasicType TUTF8- CString -> -- body : TBasicType TUTF8- CString -> -- icon : TBasicType TUTF8- IO (Ptr Notification)--{- |-Creates a new 'GI.Notify.Objects.Notification.Notification'. The summary text is required, but-all other parameters are optional.--}-notificationNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@summary@/: The required summary text. -}- -> Maybe (T.Text)- {- ^ /@body@/: The optional body text. -}- -> Maybe (T.Text)- {- ^ /@icon@/: The optional icon theme icon name or filename. -}- -> m Notification- {- ^ __Returns:__ The new 'GI.Notify.Objects.Notification.Notification'. -}-notificationNew summary body icon = liftIO $ do- summary' <- textToCString summary- maybeBody <- case body of- Nothing -> return nullPtr- Just jBody -> do- jBody' <- textToCString jBody- return jBody'- maybeIcon <- case icon of- Nothing -> return nullPtr- Just jIcon -> do- jIcon' <- textToCString jIcon- return jIcon'- result <- notify_notification_new summary' maybeBody maybeIcon- checkUnexpectedReturnNULL "notificationNew" result- result' <- (wrapObject Notification) result- freeMem summary'- freeMem maybeBody- freeMem maybeIcon- return result'--#if ENABLE_OVERLOADING-#endif---- method Notification::add_action--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "action", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The action ID.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The human-readable action label.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Notify", name = "ActionCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The action's callback function.", sinceVersion = Nothing}, argScope = ScopeTypeNotified, argClosure = 4, argDestroy = 5, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Optional custom data to pass to @callback.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "free_func", argType = TInterface (Name {namespace = "GLib", name = "DestroyNotify"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "An optional function to free @user_data when the notification\n is destroyed.", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_add_action" notify_notification_add_action :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- action : TBasicType TUTF8- CString -> -- label : TBasicType TUTF8- FunPtr Notify.Callbacks.C_ActionCallback -> -- callback : TInterface (Name {namespace = "Notify", name = "ActionCallback"})- Ptr () -> -- user_data : TBasicType TPtr- FunPtr GLib.Callbacks.C_DestroyNotify -> -- free_func : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})- IO ()--{- |-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 ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> T.Text- {- ^ /@action@/: The action ID. -}- -> T.Text- {- ^ /@label@/: The human-readable action label. -}- -> Notify.Callbacks.ActionCallback- {- ^ /@callback@/: The action\'s callback function. -}- -> m ()-notificationAddAction notification action label callback = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- action' <- textToCString action- label' <- textToCString label- callback' <- Notify.Callbacks.mk_ActionCallback (Notify.Callbacks.wrap_ActionCallback Nothing (Notify.Callbacks.drop_closures_ActionCallback callback))- let userData = castFunPtrToPtr callback'- let freeFunc = safeFreeFunPtrPtr- notify_notification_add_action notification' action' label' callback' userData freeFunc- touchManagedPtr notification- freeMem action'- freeMem label'- return ()--#if ENABLE_OVERLOADING-data NotificationAddActionMethodInfo-instance (signature ~ (T.Text -> T.Text -> Notify.Callbacks.ActionCallback -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationAddActionMethodInfo a signature where- overloadedMethod _ = notificationAddAction--#endif---- method Notification::clear_actions--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_clear_actions" notify_notification_clear_actions :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- IO ()--{- |-Clears all actions from the notification.--}-notificationClearActions ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> m ()-notificationClearActions notification = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- notify_notification_clear_actions notification'- touchManagedPtr notification- return ()--#if ENABLE_OVERLOADING-data NotificationClearActionsMethodInfo-instance (signature ~ (m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationClearActionsMethodInfo a signature where- overloadedMethod _ = notificationClearActions--#endif---- method Notification::clear_hints--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_clear_hints" notify_notification_clear_hints :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- IO ()--{- |-Clears all hints from the notification.--}-notificationClearHints ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> m ()-notificationClearHints notification = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- notify_notification_clear_hints notification'- touchManagedPtr notification- return ()--#if ENABLE_OVERLOADING-data NotificationClearHintsMethodInfo-instance (signature ~ (m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationClearHintsMethodInfo a signature where- overloadedMethod _ = notificationClearHints--#endif---- method Notification::close--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "notify_notification_close" notify_notification_close :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- Ptr (Ptr GError) -> -- error- IO CInt--{- |-Synchronously tells the notification server to hide the notification on the screen.--}-notificationClose ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> m ()- {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}-notificationClose notification = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- onException (do- _ <- propagateGError $ notify_notification_close notification'- touchManagedPtr notification- return ()- ) (do- return ()- )--#if ENABLE_OVERLOADING-data NotificationCloseMethodInfo-instance (signature ~ (m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationCloseMethodInfo a signature where- overloadedMethod _ = notificationClose--#endif---- method Notification::get_closed_reason--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "notify_notification_get_closed_reason" notify_notification_get_closed_reason :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- IO Int32--{- |-Returns the closed reason code for the notification. This is valid only-after the \"closed\" signal is emitted.--}-notificationGetClosedReason ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> m Int32- {- ^ __Returns:__ The closed reason code. -}-notificationGetClosedReason notification = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- result <- notify_notification_get_closed_reason notification'- touchManagedPtr notification- return result--#if ENABLE_OVERLOADING-data NotificationGetClosedReasonMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsNotification a) => O.MethodInfo NotificationGetClosedReasonMethodInfo a signature where- overloadedMethod _ = notificationGetClosedReason--#endif---- method Notification::set_app_name--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #NotifyNotification", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the localised application name", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_app_name" notify_notification_set_app_name :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- app_name : TBasicType TUTF8- IO ()--{- |-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 'GI.Notify.Functions.init' or overridden with-'GI.Notify.Functions.setAppName'.--/Since: 0.7.3/--}-notificationSetAppName ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: a 'GI.Notify.Objects.Notification.Notification' -}- -> T.Text- {- ^ /@appName@/: the localised application name -}- -> m ()-notificationSetAppName notification appName = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- appName' <- textToCString appName- notify_notification_set_app_name notification' appName'- touchManagedPtr notification- freeMem appName'- return ()--#if ENABLE_OVERLOADING-data NotificationSetAppNameMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetAppNameMethodInfo a signature where- overloadedMethod _ = notificationSetAppName--#endif---- method Notification::set_category--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "category", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The category.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_category" notify_notification_set_category :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- category : TBasicType TUTF8- IO ()--{- |-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 ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> T.Text- {- ^ /@category@/: The category. -}- -> m ()-notificationSetCategory notification category = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- category' <- textToCString category- notify_notification_set_category notification' category'- touchManagedPtr notification- freeMem category'- return ()--#if ENABLE_OVERLOADING-data NotificationSetCategoryMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetCategoryMethodInfo a signature where- overloadedMethod _ = notificationSetCategory--#endif---- method Notification::set_hint--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #NotifyNotification", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the hint key", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the hint value, or %NULL to unset the hint", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_hint" notify_notification_set_hint :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- key : TBasicType TUTF8- Ptr GVariant -> -- value : TVariant- IO ()--{- |-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 ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: a 'GI.Notify.Objects.Notification.Notification' -}- -> T.Text- {- ^ /@key@/: the hint key -}- -> Maybe (GVariant)- {- ^ /@value@/: the hint value, or 'Nothing' to unset the hint -}- -> m ()-notificationSetHint notification key value = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- key' <- textToCString key- maybeValue <- case value of- Nothing -> return nullPtr- Just jValue -> do- jValue' <- unsafeManagedPtrGetPtr jValue- return jValue'- notify_notification_set_hint notification' key' maybeValue- touchManagedPtr notification- whenJust value touchManagedPtr- freeMem key'- return ()--#if ENABLE_OVERLOADING-data NotificationSetHintMethodInfo-instance (signature ~ (T.Text -> Maybe (GVariant) -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetHintMethodInfo a signature where- overloadedMethod _ = notificationSetHint--#endif---- method Notification::set_hint_byte--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint's value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_hint_byte" notify_notification_set_hint_byte :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- key : TBasicType TUTF8- Word8 -> -- value : TBasicType TUInt8- IO ()--{-# DEPRECATED notificationSetHintByte ["(Since version 0.6.)","Use 'GI.Notify.Objects.Notification.notificationSetHint' instead"] #-}-{- |-Sets a hint with a byte value.--}-notificationSetHintByte ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> T.Text- {- ^ /@key@/: The hint. -}- -> Word8- {- ^ /@value@/: The hint\'s value. -}- -> m ()-notificationSetHintByte notification key value = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- key' <- textToCString key- notify_notification_set_hint_byte notification' key' value- touchManagedPtr notification- freeMem key'- return ()--#if ENABLE_OVERLOADING-data NotificationSetHintByteMethodInfo-instance (signature ~ (T.Text -> Word8 -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetHintByteMethodInfo a signature where- overloadedMethod _ = notificationSetHintByte--#endif---- method Notification::set_hint_byte_array--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TCArray False (-1) 3 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint's value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The length of the byte array.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The length of the byte array.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_hint_byte_array" notify_notification_set_hint_byte_array :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- key : TBasicType TUTF8- Ptr Word8 -> -- value : TCArray False (-1) 3 (TBasicType TUInt8)- Word64 -> -- len : TBasicType TUInt64- IO ()--{-# DEPRECATED notificationSetHintByteArray ["(Since version 0.6.)","Use 'GI.Notify.Objects.Notification.notificationSetHint' instead"] #-}-{- |-Sets a hint with a byte array value. The length of /@value@/ must be passed-as /@len@/.--}-notificationSetHintByteArray ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> T.Text- {- ^ /@key@/: The hint. -}- -> ByteString- {- ^ /@value@/: The hint\'s value. -}- -> m ()-notificationSetHintByteArray notification key value = liftIO $ do- let len = fromIntegral $ B.length value- notification' <- unsafeManagedPtrCastPtr notification- key' <- textToCString key- value' <- packByteString value- notify_notification_set_hint_byte_array notification' key' value' len- touchManagedPtr notification- freeMem key'- freeMem value'- return ()--#if ENABLE_OVERLOADING-data NotificationSetHintByteArrayMethodInfo-instance (signature ~ (T.Text -> ByteString -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetHintByteArrayMethodInfo a signature where- overloadedMethod _ = notificationSetHintByteArray--#endif---- method Notification::set_hint_double--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint's value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_hint_double" notify_notification_set_hint_double :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- key : TBasicType TUTF8- CDouble -> -- value : TBasicType TDouble- IO ()--{-# DEPRECATED notificationSetHintDouble ["(Since version 0.6.)","Use 'GI.Notify.Objects.Notification.notificationSetHint' instead"] #-}-{- |-Sets a hint with a double value.--}-notificationSetHintDouble ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> T.Text- {- ^ /@key@/: The hint. -}- -> Double- {- ^ /@value@/: The hint\'s value. -}- -> m ()-notificationSetHintDouble notification key value = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- key' <- textToCString key- let value' = realToFrac value- notify_notification_set_hint_double notification' key' value'- touchManagedPtr notification- freeMem key'- return ()--#if ENABLE_OVERLOADING-data NotificationSetHintDoubleMethodInfo-instance (signature ~ (T.Text -> Double -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetHintDoubleMethodInfo a signature where- overloadedMethod _ = notificationSetHintDouble--#endif---- method Notification::set_hint_int32--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint's value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_hint_int32" notify_notification_set_hint_int32 :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- key : TBasicType TUTF8- Int32 -> -- value : TBasicType TInt- IO ()--{-# DEPRECATED notificationSetHintInt32 ["(Since version 0.6.)","Use 'GI.Notify.Objects.Notification.notificationSetHint' instead"] #-}-{- |-Sets a hint with a 32-bit integer value.--}-notificationSetHintInt32 ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> T.Text- {- ^ /@key@/: The hint. -}- -> Int32- {- ^ /@value@/: The hint\'s value. -}- -> m ()-notificationSetHintInt32 notification key value = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- key' <- textToCString key- notify_notification_set_hint_int32 notification' key' value- touchManagedPtr notification- freeMem key'- return ()--#if ENABLE_OVERLOADING-data NotificationSetHintInt32MethodInfo-instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetHintInt32MethodInfo a signature where- overloadedMethod _ = notificationSetHintInt32--#endif---- method Notification::set_hint_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint's value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_hint_string" notify_notification_set_hint_string :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- key : TBasicType TUTF8- CString -> -- value : TBasicType TUTF8- IO ()--{-# DEPRECATED notificationSetHintString ["(Since version 0.6.)","Use 'GI.Notify.Objects.Notification.notificationSetHint' instead"] #-}-{- |-Sets a hint with a string value.--}-notificationSetHintString ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> T.Text- {- ^ /@key@/: The hint. -}- -> T.Text- {- ^ /@value@/: The hint\'s value. -}- -> m ()-notificationSetHintString notification key value = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- key' <- textToCString key- value' <- textToCString value- notify_notification_set_hint_string notification' key' value'- touchManagedPtr notification- freeMem key'- freeMem value'- return ()--#if ENABLE_OVERLOADING-data NotificationSetHintStringMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetHintStringMethodInfo a signature where- overloadedMethod _ = notificationSetHintString--#endif---- method Notification::set_hint_uint32--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The hint's value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_hint_uint32" notify_notification_set_hint_uint32 :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- key : TBasicType TUTF8- Word32 -> -- value : TBasicType TUInt- IO ()--{-# DEPRECATED notificationSetHintUint32 ["(Since version 0.6.)","Use 'GI.Notify.Objects.Notification.notificationSetHint' instead"] #-}-{- |-Sets a hint with an unsigned 32-bit integer value.--}-notificationSetHintUint32 ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> T.Text- {- ^ /@key@/: The hint. -}- -> Word32- {- ^ /@value@/: The hint\'s value. -}- -> m ()-notificationSetHintUint32 notification key value = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- key' <- textToCString key- notify_notification_set_hint_uint32 notification' key' value- touchManagedPtr notification- freeMem key'- return ()--#if ENABLE_OVERLOADING-data NotificationSetHintUint32MethodInfo-instance (signature ~ (T.Text -> Word32 -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetHintUint32MethodInfo a signature where- overloadedMethod _ = notificationSetHintUint32--#endif---- method Notification::set_icon_from_pixbuf--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "icon", argType = TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The icon.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_icon_from_pixbuf" notify_notification_set_icon_from_pixbuf :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- Ptr GdkPixbuf.Pixbuf.Pixbuf -> -- icon : TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})- IO ()--{-# DEPRECATED notificationSetIconFromPixbuf ["use 'GI.Notify.Objects.Notification.notificationSetImageFromPixbuf' instead."] #-}-{- |-Sets the icon in the notification from a 'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf'.--}-notificationSetIconFromPixbuf ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a, GdkPixbuf.Pixbuf.IsPixbuf b) =>- a- {- ^ /@notification@/: The notification. -}- -> b- {- ^ /@icon@/: The icon. -}- -> m ()-notificationSetIconFromPixbuf notification icon = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- icon' <- unsafeManagedPtrCastPtr icon- notify_notification_set_icon_from_pixbuf notification' icon'- touchManagedPtr notification- touchManagedPtr icon- return ()--#if ENABLE_OVERLOADING-data NotificationSetIconFromPixbufMethodInfo-instance (signature ~ (b -> m ()), MonadIO m, IsNotification a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.MethodInfo NotificationSetIconFromPixbufMethodInfo a signature where- overloadedMethod _ = notificationSetIconFromPixbuf--#endif---- method Notification::set_image_from_pixbuf--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pixbuf", argType = TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The image.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_image_from_pixbuf" notify_notification_set_image_from_pixbuf :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- Ptr GdkPixbuf.Pixbuf.Pixbuf -> -- pixbuf : TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})- IO ()--{- |-Sets the image in the notification from a 'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf'.--}-notificationSetImageFromPixbuf ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a, GdkPixbuf.Pixbuf.IsPixbuf b) =>- a- {- ^ /@notification@/: The notification. -}- -> b- {- ^ /@pixbuf@/: The image. -}- -> m ()-notificationSetImageFromPixbuf notification pixbuf = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- pixbuf' <- unsafeManagedPtrCastPtr pixbuf- notify_notification_set_image_from_pixbuf notification' pixbuf'- touchManagedPtr notification- touchManagedPtr pixbuf- return ()--#if ENABLE_OVERLOADING-data NotificationSetImageFromPixbufMethodInfo-instance (signature ~ (b -> m ()), MonadIO m, IsNotification a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.MethodInfo NotificationSetImageFromPixbufMethodInfo a signature where- overloadedMethod _ = notificationSetImageFromPixbuf--#endif---- method Notification::set_timeout--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "timeout", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The timeout in milliseconds.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_timeout" notify_notification_set_timeout :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- Int32 -> -- timeout : TBasicType TInt- IO ()--{- |-Sets the timeout of the notification. To set the default time, pass-'GI.Notify.Constants.EXPIRES_DEFAULT' as /@timeout@/. To set the notification to never-expire, pass 'GI.Notify.Constants.EXPIRES_NEVER'.--Note that the timeout may be ignored by the server.--}-notificationSetTimeout ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> Int32- {- ^ /@timeout@/: The timeout in milliseconds. -}- -> m ()-notificationSetTimeout notification timeout = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- notify_notification_set_timeout notification' timeout- touchManagedPtr notification- return ()--#if ENABLE_OVERLOADING-data NotificationSetTimeoutMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetTimeoutMethodInfo a signature where- overloadedMethod _ = notificationSetTimeout--#endif---- method Notification::set_urgency--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "urgency", argType = TInterface (Name {namespace = "Notify", name = "Urgency"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The urgency level.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "notify_notification_set_urgency" notify_notification_set_urgency :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CUInt -> -- urgency : TInterface (Name {namespace = "Notify", name = "Urgency"})- IO ()--{- |-Sets the urgency level of this notification.--See: 'GI.Notify.Enums.Urgency'--}-notificationSetUrgency ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> Notify.Enums.Urgency- {- ^ /@urgency@/: The urgency level. -}- -> m ()-notificationSetUrgency notification urgency = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- let urgency' = (fromIntegral . fromEnum) urgency- notify_notification_set_urgency notification' urgency'- touchManagedPtr notification- return ()--#if ENABLE_OVERLOADING-data NotificationSetUrgencyMethodInfo-instance (signature ~ (Notify.Enums.Urgency -> m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationSetUrgencyMethodInfo a signature where- overloadedMethod _ = notificationSetUrgency--#endif---- method Notification::show--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "notify_notification_show" notify_notification_show :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- Ptr (Ptr GError) -> -- error- IO CInt--{- |-Tells the notification server to display the notification on the screen.--}-notificationShow ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification. -}- -> m ()- {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}-notificationShow notification = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- onException (do- _ <- propagateGError $ notify_notification_show notification'- touchManagedPtr notification- return ()- ) (do- return ()- )--#if ENABLE_OVERLOADING-data NotificationShowMethodInfo-instance (signature ~ (m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationShowMethodInfo a signature where- overloadedMethod _ = notificationShow--#endif---- method Notification::update--- method type : OrdinaryMethod--- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "Notify", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The notification to update.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "summary", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The new required summary text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "body", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The optional body text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "icon", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The optional icon theme icon name or filename.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "notify_notification_update" notify_notification_update :: - Ptr Notification -> -- notification : TInterface (Name {namespace = "Notify", name = "Notification"})- CString -> -- summary : TBasicType TUTF8- CString -> -- body : TBasicType TUTF8- CString -> -- icon : TBasicType TUTF8- IO CInt--{- |-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-'GI.Notify.Objects.Notification.notificationShow'.--}-notificationUpdate ::- (B.CallStack.HasCallStack, MonadIO m, IsNotification a) =>- a- {- ^ /@notification@/: The notification to update. -}- -> T.Text- {- ^ /@summary@/: The new required summary text. -}- -> Maybe (T.Text)- {- ^ /@body@/: The optional body text. -}- -> Maybe (T.Text)- {- ^ /@icon@/: The optional icon theme icon name or filename. -}- -> m Bool- {- ^ __Returns:__ 'True', unless an invalid parameter was passed. -}-notificationUpdate notification summary body icon = liftIO $ do- notification' <- unsafeManagedPtrCastPtr notification- summary' <- textToCString summary- maybeBody <- case body of- Nothing -> return nullPtr- Just jBody -> do- jBody' <- textToCString jBody- return jBody'- maybeIcon <- case icon of- Nothing -> return nullPtr- Just jIcon -> do- jIcon' <- textToCString jIcon- return jIcon'- result <- notify_notification_update notification' summary' maybeBody maybeIcon- let result' = (/= 0) result- touchManagedPtr notification- freeMem summary'- freeMem maybeBody- freeMem maybeIcon- return result'--#if ENABLE_OVERLOADING-data NotificationUpdateMethodInfo-instance (signature ~ (T.Text -> Maybe (T.Text) -> Maybe (T.Text) -> m Bool), MonadIO m, IsNotification a) => O.MethodInfo NotificationUpdateMethodInfo a signature where- overloadedMethod _ = notificationUpdate--#endif--
− GI/Notify/Objects/Notification.hs-boot
@@ -1,110 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Notify.Objects.Notification where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Notification = Notification (ManagedPtr Notification)-instance GObject Notification where-class (GObject o, O.IsDescendantOf Notification o) => IsNotification o-instance (GObject o, O.IsDescendantOf Notification o) => IsNotification o-instance O.HasParentTypes Notification-#if ENABLE_OVERLOADING-data NotificationAppNamePropertyInfo-#endif-#if ENABLE_OVERLOADING-data NotificationBodyPropertyInfo-#endif-#if ENABLE_OVERLOADING-data NotificationClosedReasonPropertyInfo-#endif-#if ENABLE_OVERLOADING-data NotificationIconNamePropertyInfo-#endif-#if ENABLE_OVERLOADING-data NotificationIdPropertyInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSummaryPropertyInfo-#endif-#if ENABLE_OVERLOADING-data NotificationClosedSignalInfo-#endif-#if ENABLE_OVERLOADING-data NotificationAddActionMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationClearActionsMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationClearHintsMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationCloseMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationGetClosedReasonMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetAppNameMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetCategoryMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetHintMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetHintByteMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetHintByteArrayMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetHintDoubleMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetHintInt32MethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetHintStringMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetHintUint32MethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetIconFromPixbufMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetImageFromPixbufMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetTimeoutMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationSetUrgencyMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationShowMethodInfo-#endif-#if ENABLE_OVERLOADING-data NotificationUpdateMethodInfo-#endif
README.md view
@@ -1,6 +1,6 @@ # Documentation Autogenerated documentation for this package can be found at -[https://hackage.haskell.org/package/gi-notify-0.7.17/docs/GI-Notify.html](https://hackage.haskell.org/package/gi-notify-0.7.17/docs/GI-Notify.html)+[https://hackage.haskell.org/package/gi-notify-0.7.18/docs/GI-Notify.html](https://hackage.haskell.org/package/gi-notify-0.7.18/docs/GI-Notify.html) For general documentation on using [haskell-gi](https://github.com/haskell-gi/haskell-gi) based bindings, see [the project page](https://github.com/haskell-gi/haskell-gi) or [the Wiki](https://github.com/haskell-gi/haskell-gi/wiki).
gi-notify.cabal view
@@ -1,5 +1,5 @@ name: gi-notify-version: 0.7.17+version: 0.7.18 synopsis: Libnotify bindings description: Bindings for Libnotify, autogenerated by haskell-gi. homepage: https://github.com/haskell-gi/haskell-gi@@ -43,6 +43,14 @@ build-depends: haskell-gi-overloading == 0.0 exposed-modules: GI.Notify,+ GI.Notify.Callbacks,+ GI.Notify.Constants,+ GI.Notify.Enums,+ GI.Notify.Functions,+ GI.Notify.Objects,+ GI.Notify.Objects.Notification++ autogen-modules: GI.Notify, GI.Notify.Callbacks, GI.Notify.Constants, GI.Notify.Enums,