{- | 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.WebKit2.Objects.Notification ( -- * Exported types Notification(..) , IsNotification , toNotification , noNotification , -- * Methods -- ** clicked #method:clicked# #if ENABLE_OVERLOADING NotificationClickedMethodInfo , #endif notificationClicked , -- ** close #method:close# #if ENABLE_OVERLOADING NotificationCloseMethodInfo , #endif notificationClose , -- ** getBody #method:getBody# #if ENABLE_OVERLOADING NotificationGetBodyMethodInfo , #endif notificationGetBody , -- ** getId #method:getId# #if ENABLE_OVERLOADING NotificationGetIdMethodInfo , #endif notificationGetId , -- ** getTag #method:getTag# #if ENABLE_OVERLOADING NotificationGetTagMethodInfo , #endif notificationGetTag , -- ** getTitle #method:getTitle# #if ENABLE_OVERLOADING NotificationGetTitleMethodInfo , #endif notificationGetTitle , -- * Properties -- ** body #attr:body# {- | The body for the notification. /Since: 2.8/ -} #if ENABLE_OVERLOADING NotificationBodyPropertyInfo , #endif getNotificationBody , #if ENABLE_OVERLOADING notificationBody , #endif -- ** id #attr:id# {- | The unique id for the notification. /Since: 2.8/ -} #if ENABLE_OVERLOADING NotificationIdPropertyInfo , #endif getNotificationId , #if ENABLE_OVERLOADING notificationId , #endif -- ** tag #attr:tag# {- | The tag identifier for the notification. /Since: 2.16/ -} #if ENABLE_OVERLOADING NotificationTagPropertyInfo , #endif getNotificationTag , #if ENABLE_OVERLOADING notificationTag , #endif -- ** title #attr:title# {- | The title for the notification. /Since: 2.8/ -} #if ENABLE_OVERLOADING NotificationTitlePropertyInfo , #endif getNotificationTitle , #if ENABLE_OVERLOADING notificationTitle , #endif -- * Signals -- ** clicked #signal:clicked# C_NotificationClickedCallback , NotificationClickedCallback , #if ENABLE_OVERLOADING NotificationClickedSignalInfo , #endif afterNotificationClicked , genClosure_NotificationClicked , mk_NotificationClickedCallback , noNotificationClickedCallback , onNotificationClicked , wrap_NotificationClickedCallback , -- ** 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.GObject.Objects.Object as GObject.Object -- | Memory-managed wrapper type. newtype Notification = Notification (ManagedPtr Notification) foreign import ccall "webkit_notification_get_type" c_webkit_notification_get_type :: IO GType instance GObject Notification where gobjectType = c_webkit_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 "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolveNotificationMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolveNotificationMethod "clicked" o = NotificationClickedMethodInfo 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 "stealData" o = GObject.Object.ObjectStealDataMethodInfo ResolveNotificationMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo ResolveNotificationMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo ResolveNotificationMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo ResolveNotificationMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo ResolveNotificationMethod "getBody" o = NotificationGetBodyMethodInfo ResolveNotificationMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo ResolveNotificationMethod "getId" o = NotificationGetIdMethodInfo ResolveNotificationMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo ResolveNotificationMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo ResolveNotificationMethod "getTag" o = NotificationGetTagMethodInfo ResolveNotificationMethod "getTitle" o = NotificationGetTitleMethodInfo ResolveNotificationMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo ResolveNotificationMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo 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::clicked {- | Emitted when a notification has been clicked. See 'GI.WebKit2.Objects.Notification.notificationClicked'. /Since: 2.12/ -} type NotificationClickedCallback = IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `NotificationClickedCallback`@. noNotificationClickedCallback :: Maybe NotificationClickedCallback noNotificationClickedCallback = Nothing -- | Type for the callback on the (unwrapped) C side. type C_NotificationClickedCallback = Ptr () -> -- object Ptr () -> -- user_data IO () -- | Generate a function pointer callable from C code, from a `C_NotificationClickedCallback`. foreign import ccall "wrapper" mk_NotificationClickedCallback :: C_NotificationClickedCallback -> IO (FunPtr C_NotificationClickedCallback) -- | Wrap the callback into a `GClosure`. genClosure_NotificationClicked :: MonadIO m => NotificationClickedCallback -> m (GClosure C_NotificationClickedCallback) genClosure_NotificationClicked cb = liftIO $ do let cb' = wrap_NotificationClickedCallback cb mk_NotificationClickedCallback cb' >>= B.GClosure.newGClosure -- | Wrap a `NotificationClickedCallback` into a `C_NotificationClickedCallback`. wrap_NotificationClickedCallback :: NotificationClickedCallback -> C_NotificationClickedCallback wrap_NotificationClickedCallback _cb _ _ = do _cb {- | Connect a signal handler for the “@clicked@” signal, to be run before the default handler. When is enabled, this is equivalent to @ 'Data.GI.Base.Signals.on' notification #clicked callback @ -} onNotificationClicked :: (IsNotification a, MonadIO m) => a -> NotificationClickedCallback -> m SignalHandlerId onNotificationClicked obj cb = liftIO $ do let cb' = wrap_NotificationClickedCallback cb cb'' <- mk_NotificationClickedCallback cb' connectSignalFunPtr obj "clicked" cb'' SignalConnectBefore {- | Connect a signal handler for the “@clicked@” signal, to be run after the default handler. When is enabled, this is equivalent to @ 'Data.GI.Base.Signals.after' notification #clicked callback @ -} afterNotificationClicked :: (IsNotification a, MonadIO m) => a -> NotificationClickedCallback -> m SignalHandlerId afterNotificationClicked obj cb = liftIO $ do let cb' = wrap_NotificationClickedCallback cb cb'' <- mk_NotificationClickedCallback cb' connectSignalFunPtr obj "clicked" cb'' SignalConnectAfter -- signal Notification::closed {- | Emitted when a notification has been withdrawn. The default handler will close the notification using libnotify, if built with support for it. /Since: 2.8/ -} 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 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 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 "body" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable] -- Nullable: (Just False,Nothing) {- | Get the value of the “@body@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' notification #body @ -} getNotificationBody :: (MonadIO m, IsNotification o) => o -> m T.Text getNotificationBody obj = liftIO $ checkUnexpectedNothing "getNotificationBody" $ B.Properties.getObjectPropertyString obj "body" #if ENABLE_OVERLOADING data NotificationBodyPropertyInfo instance AttrInfo NotificationBodyPropertyInfo where type AttrAllowedOps NotificationBodyPropertyInfo = '[ 'AttrGet, 'AttrClear] type AttrSetTypeConstraint NotificationBodyPropertyInfo = (~) () type AttrBaseTypeConstraint NotificationBodyPropertyInfo = IsNotification type AttrGetType NotificationBodyPropertyInfo = T.Text type AttrLabel NotificationBodyPropertyInfo = "body" type AttrOrigin NotificationBodyPropertyInfo = Notification attrGet _ = getNotificationBody attrSet _ = undefined attrConstruct _ = undefined attrClear _ = undefined #endif -- VVV Prop "id" -- Type: TBasicType TUInt64 -- Flags: [PropertyReadable] -- Nullable: (Just False,Nothing) {- | Get the value of the “@id@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' notification #id @ -} getNotificationId :: (MonadIO m, IsNotification o) => o -> m Word64 getNotificationId obj = liftIO $ B.Properties.getObjectPropertyUInt64 obj "id" #if ENABLE_OVERLOADING data NotificationIdPropertyInfo instance AttrInfo NotificationIdPropertyInfo where type AttrAllowedOps NotificationIdPropertyInfo = '[ 'AttrGet] type AttrSetTypeConstraint NotificationIdPropertyInfo = (~) () type AttrBaseTypeConstraint NotificationIdPropertyInfo = IsNotification type AttrGetType NotificationIdPropertyInfo = Word64 type AttrLabel NotificationIdPropertyInfo = "id" type AttrOrigin NotificationIdPropertyInfo = Notification attrGet _ = getNotificationId attrSet _ = undefined attrConstruct _ = undefined attrClear _ = undefined #endif -- VVV Prop "tag" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable] -- Nullable: (Just True,Nothing) {- | Get the value of the “@tag@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' notification #tag @ -} getNotificationTag :: (MonadIO m, IsNotification o) => o -> m (Maybe T.Text) getNotificationTag obj = liftIO $ B.Properties.getObjectPropertyString obj "tag" #if ENABLE_OVERLOADING data NotificationTagPropertyInfo instance AttrInfo NotificationTagPropertyInfo where type AttrAllowedOps NotificationTagPropertyInfo = '[ 'AttrGet, 'AttrClear] type AttrSetTypeConstraint NotificationTagPropertyInfo = (~) () type AttrBaseTypeConstraint NotificationTagPropertyInfo = IsNotification type AttrGetType NotificationTagPropertyInfo = (Maybe T.Text) type AttrLabel NotificationTagPropertyInfo = "tag" type AttrOrigin NotificationTagPropertyInfo = Notification attrGet _ = getNotificationTag attrSet _ = undefined attrConstruct _ = undefined attrClear _ = undefined #endif -- VVV Prop "title" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable] -- Nullable: (Just False,Nothing) {- | Get the value of the “@title@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' notification #title @ -} getNotificationTitle :: (MonadIO m, IsNotification o) => o -> m T.Text getNotificationTitle obj = liftIO $ checkUnexpectedNothing "getNotificationTitle" $ B.Properties.getObjectPropertyString obj "title" #if ENABLE_OVERLOADING data NotificationTitlePropertyInfo instance AttrInfo NotificationTitlePropertyInfo where type AttrAllowedOps NotificationTitlePropertyInfo = '[ 'AttrGet, 'AttrClear] type AttrSetTypeConstraint NotificationTitlePropertyInfo = (~) () type AttrBaseTypeConstraint NotificationTitlePropertyInfo = IsNotification type AttrGetType NotificationTitlePropertyInfo = T.Text type AttrLabel NotificationTitlePropertyInfo = "title" type AttrOrigin NotificationTitlePropertyInfo = Notification attrGet _ = getNotificationTitle attrSet _ = undefined attrConstruct _ = undefined attrClear _ = undefined #endif #if ENABLE_OVERLOADING instance O.HasAttributeList Notification type instance O.AttributeList Notification = NotificationAttributeList type NotificationAttributeList = ('[ '("body", NotificationBodyPropertyInfo), '("id", NotificationIdPropertyInfo), '("tag", NotificationTagPropertyInfo), '("title", NotificationTitlePropertyInfo)] :: [(Symbol, *)]) #endif #if ENABLE_OVERLOADING notificationBody :: AttrLabelProxy "body" notificationBody = AttrLabelProxy notificationId :: AttrLabelProxy "id" notificationId = AttrLabelProxy notificationTag :: AttrLabelProxy "tag" notificationTag = AttrLabelProxy notificationTitle :: AttrLabelProxy "title" notificationTitle = AttrLabelProxy #endif #if ENABLE_OVERLOADING data NotificationClickedSignalInfo instance SignalInfo NotificationClickedSignalInfo where type HaskellCallbackType NotificationClickedSignalInfo = NotificationClickedCallback connectSignal _ obj cb connectMode = do let cb' = wrap_NotificationClickedCallback cb cb'' <- mk_NotificationClickedCallback cb' connectSignalFunPtr obj "clicked" cb'' connectMode 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 = ('[ '("clicked", NotificationClickedSignalInfo), '("closed", NotificationClosedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)]) #endif -- method Notification::clicked -- method type : OrdinaryMethod -- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "WebKit2", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitNotification", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "webkit_notification_clicked" webkit_notification_clicked :: Ptr Notification -> -- notification : TInterface (Name {namespace = "WebKit2", name = "Notification"}) IO () {- | Tells WebKit the notification has been clicked. This will emit the 'GI.WebKit2.Objects.Notification.Notification'::@/clicked/@ signal. /Since: 2.12/ -} notificationClicked :: (B.CallStack.HasCallStack, MonadIO m, IsNotification a) => a {- ^ /@notification@/: a 'GI.WebKit2.Objects.Notification.Notification' -} -> m () notificationClicked notification = liftIO $ do notification' <- unsafeManagedPtrCastPtr notification webkit_notification_clicked notification' touchManagedPtr notification return () #if ENABLE_OVERLOADING data NotificationClickedMethodInfo instance (signature ~ (m ()), MonadIO m, IsNotification a) => O.MethodInfo NotificationClickedMethodInfo a signature where overloadedMethod _ = notificationClicked #endif -- method Notification::close -- method type : OrdinaryMethod -- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "WebKit2", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitNotification", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "webkit_notification_close" webkit_notification_close :: Ptr Notification -> -- notification : TInterface (Name {namespace = "WebKit2", name = "Notification"}) IO () {- | Closes the notification. /Since: 2.8/ -} notificationClose :: (B.CallStack.HasCallStack, MonadIO m, IsNotification a) => a {- ^ /@notification@/: a 'GI.WebKit2.Objects.Notification.Notification' -} -> m () notificationClose notification = liftIO $ do notification' <- unsafeManagedPtrCastPtr notification webkit_notification_close notification' touchManagedPtr notification 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_body -- method type : OrdinaryMethod -- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "WebKit2", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitNotification", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "webkit_notification_get_body" webkit_notification_get_body :: Ptr Notification -> -- notification : TInterface (Name {namespace = "WebKit2", name = "Notification"}) IO CString {- | Obtains the body for the notification. /Since: 2.8/ -} notificationGetBody :: (B.CallStack.HasCallStack, MonadIO m, IsNotification a) => a {- ^ /@notification@/: a 'GI.WebKit2.Objects.Notification.Notification' -} -> m T.Text {- ^ __Returns:__ the body for the notification -} notificationGetBody notification = liftIO $ do notification' <- unsafeManagedPtrCastPtr notification result <- webkit_notification_get_body notification' checkUnexpectedReturnNULL "notificationGetBody" result result' <- cstringToText result touchManagedPtr notification return result' #if ENABLE_OVERLOADING data NotificationGetBodyMethodInfo instance (signature ~ (m T.Text), MonadIO m, IsNotification a) => O.MethodInfo NotificationGetBodyMethodInfo a signature where overloadedMethod _ = notificationGetBody #endif -- method Notification::get_id -- method type : OrdinaryMethod -- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "WebKit2", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitNotification", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "webkit_notification_get_id" webkit_notification_get_id :: Ptr Notification -> -- notification : TInterface (Name {namespace = "WebKit2", name = "Notification"}) IO Word64 {- | Obtains the unique id for the notification. /Since: 2.8/ -} notificationGetId :: (B.CallStack.HasCallStack, MonadIO m, IsNotification a) => a {- ^ /@notification@/: a 'GI.WebKit2.Objects.Notification.Notification' -} -> m Word64 {- ^ __Returns:__ the unique id for the notification -} notificationGetId notification = liftIO $ do notification' <- unsafeManagedPtrCastPtr notification result <- webkit_notification_get_id notification' touchManagedPtr notification return result #if ENABLE_OVERLOADING data NotificationGetIdMethodInfo instance (signature ~ (m Word64), MonadIO m, IsNotification a) => O.MethodInfo NotificationGetIdMethodInfo a signature where overloadedMethod _ = notificationGetId #endif -- method Notification::get_tag -- method type : OrdinaryMethod -- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "WebKit2", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitNotification", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "webkit_notification_get_tag" webkit_notification_get_tag :: Ptr Notification -> -- notification : TInterface (Name {namespace = "WebKit2", name = "Notification"}) IO CString {- | Obtains the tag identifier for the notification. /Since: 2.16/ -} notificationGetTag :: (B.CallStack.HasCallStack, MonadIO m, IsNotification a) => a {- ^ /@notification@/: a 'GI.WebKit2.Objects.Notification.Notification' -} -> m (Maybe T.Text) {- ^ __Returns:__ the tag for the notification -} notificationGetTag notification = liftIO $ do notification' <- unsafeManagedPtrCastPtr notification result <- webkit_notification_get_tag notification' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToText result' return result'' touchManagedPtr notification return maybeResult #if ENABLE_OVERLOADING data NotificationGetTagMethodInfo instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsNotification a) => O.MethodInfo NotificationGetTagMethodInfo a signature where overloadedMethod _ = notificationGetTag #endif -- method Notification::get_title -- method type : OrdinaryMethod -- Args : [Arg {argCName = "notification", argType = TInterface (Name {namespace = "WebKit2", name = "Notification"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitNotification", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "webkit_notification_get_title" webkit_notification_get_title :: Ptr Notification -> -- notification : TInterface (Name {namespace = "WebKit2", name = "Notification"}) IO CString {- | Obtains the title for the notification. /Since: 2.8/ -} notificationGetTitle :: (B.CallStack.HasCallStack, MonadIO m, IsNotification a) => a {- ^ /@notification@/: a 'GI.WebKit2.Objects.Notification.Notification' -} -> m T.Text {- ^ __Returns:__ the title for the notification -} notificationGetTitle notification = liftIO $ do notification' <- unsafeManagedPtrCastPtr notification result <- webkit_notification_get_title notification' checkUnexpectedReturnNULL "notificationGetTitle" result result' <- cstringToText result touchManagedPtr notification return result' #if ENABLE_OVERLOADING data NotificationGetTitleMethodInfo instance (signature ~ (m T.Text), MonadIO m, IsNotification a) => O.MethodInfo NotificationGetTitleMethodInfo a signature where overloadedMethod _ = notificationGetTitle #endif