Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype Notification = Notification (ManagedPtr Notification)
- class (GObject o, IsDescendantOf Notification o) => IsNotification o
- toNotification :: (MonadIO m, IsNotification o) => o -> m Notification
- notificationClicked :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- notificationClose :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- notificationGetBody :: (HasCallStack, MonadIO m, IsNotification a) => a -> m Text
- notificationGetId :: (HasCallStack, MonadIO m, IsNotification a) => a -> m Word64
- notificationGetTag :: (HasCallStack, MonadIO m, IsNotification a) => a -> m (Maybe Text)
- notificationGetTitle :: (HasCallStack, MonadIO m, IsNotification a) => a -> m Text
- getNotificationBody :: (MonadIO m, IsNotification o) => o -> m Text
- getNotificationId :: (MonadIO m, IsNotification o) => o -> m Word64
- getNotificationTag :: (MonadIO m, IsNotification o) => o -> m (Maybe Text)
- getNotificationTitle :: (MonadIO m, IsNotification o) => o -> m Text
- type C_NotificationClickedCallback = Ptr () -> Ptr () -> IO ()
- type NotificationClickedCallback = IO ()
- afterNotificationClicked :: (IsNotification a, MonadIO m) => a -> NotificationClickedCallback -> m SignalHandlerId
- genClosure_NotificationClicked :: MonadIO m => NotificationClickedCallback -> m (GClosure C_NotificationClickedCallback)
- mk_NotificationClickedCallback :: C_NotificationClickedCallback -> IO (FunPtr C_NotificationClickedCallback)
- noNotificationClickedCallback :: Maybe NotificationClickedCallback
- onNotificationClicked :: (IsNotification a, MonadIO m) => a -> NotificationClickedCallback -> m SignalHandlerId
- wrap_NotificationClickedCallback :: NotificationClickedCallback -> C_NotificationClickedCallback
- type C_NotificationClosedCallback = Ptr () -> Ptr () -> IO ()
- type NotificationClosedCallback = IO ()
- afterNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId
- genClosure_NotificationClosed :: MonadIO m => NotificationClosedCallback -> m (GClosure C_NotificationClosedCallback)
- mk_NotificationClosedCallback :: C_NotificationClosedCallback -> IO (FunPtr C_NotificationClosedCallback)
- noNotificationClosedCallback :: Maybe NotificationClosedCallback
- onNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId
- wrap_NotificationClosedCallback :: NotificationClosedCallback -> C_NotificationClosedCallback
Exported types
newtype Notification Source #
Memory-managed wrapper type.
Notification (ManagedPtr Notification) |
Instances
Eq Notification Source # | |
Defined in GI.WebKit2.Objects.Notification (==) :: Notification -> Notification -> Bool # (/=) :: Notification -> Notification -> Bool # | |
GObject Notification Source # | |
Defined in GI.WebKit2.Objects.Notification | |
ManagedPtrNewtype Notification Source # | |
Defined in GI.WebKit2.Objects.Notification toManagedPtr :: Notification -> ManagedPtr Notification | |
TypedObject Notification Source # | |
Defined in GI.WebKit2.Objects.Notification | |
HasParentTypes Notification Source # | |
Defined in GI.WebKit2.Objects.Notification | |
IsGValue (Maybe Notification) Source # | Convert |
Defined in GI.WebKit2.Objects.Notification gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Notification -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Notification) | |
type ParentTypes Notification Source # | |
Defined in GI.WebKit2.Objects.Notification |
class (GObject o, IsDescendantOf Notification o) => IsNotification o Source #
Type class for types which can be safely cast to Notification
, for instance with toNotification
.
Instances
(GObject o, IsDescendantOf Notification o) => IsNotification o Source # | |
Defined in GI.WebKit2.Objects.Notification |
toNotification :: (MonadIO m, IsNotification o) => o -> m Notification Source #
Cast to Notification
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, clicked, close, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getBody, getData, getId, getProperty, getQdata, getTag, getTitle.
Setters
clicked
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m () |
Tells WebKit the notification has been clicked. This will emit the clicked signal.
Since: 2.12
close
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m () |
Closes the notification.
Since: 2.8
getBody
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m Text | Returns: the body for the notification |
Obtains the body for the notification.
Since: 2.8
getId
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m Word64 | Returns: the unique id for the notification |
Obtains the unique id for the notification.
Since: 2.8
getTag
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m (Maybe Text) | Returns: the tag for the notification |
Obtains the tag identifier for the notification.
Since: 2.16
getTitle
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m Text | Returns: the title for the notification |
Obtains the title for the notification.
Since: 2.8
Properties
body
The body for the notification.
Since: 2.8
getNotificationBody :: (MonadIO m, IsNotification o) => o -> m Text Source #
Get the value of the “body
” property.
When overloading is enabled, this is equivalent to
get
notification #body
id
The unique id for the notification.
Since: 2.8
getNotificationId :: (MonadIO m, IsNotification o) => o -> m Word64 Source #
Get the value of the “id
” property.
When overloading is enabled, this is equivalent to
get
notification #id
tag
The tag identifier for the notification.
Since: 2.16
getNotificationTag :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) Source #
Get the value of the “tag
” property.
When overloading is enabled, this is equivalent to
get
notification #tag
title
The title for the notification.
Since: 2.8
getNotificationTitle :: (MonadIO m, IsNotification o) => o -> m Text Source #
Get the value of the “title
” property.
When overloading is enabled, this is equivalent to
get
notification #title
Signals
clicked
type C_NotificationClickedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type NotificationClickedCallback = IO () Source #
Emitted when a notification has been clicked. See notificationClicked
.
Since: 2.12
afterNotificationClicked :: (IsNotification a, MonadIO m) => a -> NotificationClickedCallback -> m SignalHandlerId Source #
Connect a signal handler for the clicked signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
notification #clicked callback
genClosure_NotificationClicked :: MonadIO m => NotificationClickedCallback -> m (GClosure C_NotificationClickedCallback) Source #
Wrap the callback into a GClosure
.
mk_NotificationClickedCallback :: C_NotificationClickedCallback -> IO (FunPtr C_NotificationClickedCallback) Source #
Generate a function pointer callable from C code, from a C_NotificationClickedCallback
.
noNotificationClickedCallback :: Maybe NotificationClickedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
NotificationClickedCallback
onNotificationClicked :: (IsNotification a, MonadIO m) => a -> NotificationClickedCallback -> m SignalHandlerId Source #
Connect a signal handler for the clicked signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
notification #clicked callback
wrap_NotificationClickedCallback :: NotificationClickedCallback -> C_NotificationClickedCallback Source #
Wrap a NotificationClickedCallback
into a C_NotificationClickedCallback
.
closed
type C_NotificationClosedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type NotificationClosedCallback = IO () Source #
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
afterNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId Source #
Connect a signal handler for the closed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
notification #closed callback
genClosure_NotificationClosed :: MonadIO m => NotificationClosedCallback -> m (GClosure C_NotificationClosedCallback) Source #
Wrap the callback into a GClosure
.
mk_NotificationClosedCallback :: C_NotificationClosedCallback -> IO (FunPtr C_NotificationClosedCallback) Source #
Generate a function pointer callable from C code, from a C_NotificationClosedCallback
.
noNotificationClosedCallback :: Maybe NotificationClosedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
NotificationClosedCallback
onNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId Source #
Connect a signal handler for the closed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
notification #closed callback