Safe Haskell | None |
---|---|
Language | Haskell98 |
Routines for connecting GObject
s to signals.
Synopsis
- on :: forall object info m. (GObject object, MonadIO m, SignalInfo info) => object -> SignalProxy object info -> HaskellCallbackType info -> m SignalHandlerId
- after :: forall object info m. (GObject object, MonadIO m, SignalInfo info) => object -> SignalProxy object info -> HaskellCallbackType info -> m SignalHandlerId
- data SignalProxy (object :: *) (info :: *) where
- SignalProxy :: SignalProxy o info
- PropertyNotify :: (info ~ ResolveAttribute propName o, AttrInfo info, pl ~ AttrLabel info) => AttrLabelProxy propName -> SignalProxy o (GObjectNotifySignalInfo pl)
- data SignalConnectMode
- connectSignalFunPtr :: GObject o => o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
- disconnectSignalHandler :: GObject o => o -> SignalHandlerId -> IO ()
- type SignalHandlerId = CULong
- class SignalInfo (info :: *) where
- type HaskellCallbackType info
- connectSignal :: GObject o => SignalProxy o info -> o -> HaskellCallbackType info -> SignalConnectMode -> IO SignalHandlerId
- data GObjectNotifySignalInfo (propName :: Symbol)
Documentation
on :: forall object info m. (GObject object, MonadIO m, SignalInfo info) => object -> SignalProxy object info -> HaskellCallbackType info -> m SignalHandlerId Source #
Same as connectSignal
, specifying from the beginning that the
handler is to be run before the default handler.
on object signal handler = liftIO $ connectSignal signal object handler SignalConnectBefore
after :: forall object info m. (GObject object, MonadIO m, SignalInfo info) => object -> SignalProxy object info -> HaskellCallbackType info -> m SignalHandlerId Source #
Connect a signal to a handler, running the handler after the default one.
after object signal handler = liftIO $ connectSignal signal object handler SignalConnectAfter
data SignalProxy (object :: *) (info :: *) where Source #
Support for overloaded signal connectors.
SignalProxy :: SignalProxy o info | |
PropertyNotify :: (info ~ ResolveAttribute propName o, AttrInfo info, pl ~ AttrLabel info) => AttrLabelProxy propName -> SignalProxy o (GObjectNotifySignalInfo pl) |
Instances
info ~ ResolveSignal slot object => IsLabel slot (SignalProxy object info) Source # | Support for overloaded labels. |
Defined in Data.GI.Base.Signals fromLabel :: SignalProxy object info # |
data SignalConnectMode Source #
Whether to connect a handler to a signal with connectSignal
so
that it runs before/after the default handler for the given signal.
SignalConnectBefore | Run before the default handler. |
SignalConnectAfter | Run after the default handler. |
connectSignalFunPtr :: GObject o => o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId Source #
Connect a signal to a handler, given as a FunPtr
.
disconnectSignalHandler :: GObject o => o -> SignalHandlerId -> IO () Source #
Disconnect a previously connected signal.
type SignalHandlerId = CULong Source #
Type of a GObject
signal handler id.
class SignalInfo (info :: *) where Source #
Information about an overloaded signal.
type HaskellCallbackType info Source #
connectSignal :: GObject o => SignalProxy o info -> o -> HaskellCallbackType info -> SignalConnectMode -> IO SignalHandlerId Source #
Connect a Haskell function to a signal of the given GObject
,
specifying whether the handler will be called before or after
the default handler.
Instances
KnownSymbol propName => SignalInfo (GObjectNotifySignalInfo propName) Source # | |
Defined in Data.GI.Base.Signals type HaskellCallbackType (GObjectNotifySignalInfo propName) :: Type Source # connectSignal :: GObject o => SignalProxy o (GObjectNotifySignalInfo propName) -> o -> HaskellCallbackType (GObjectNotifySignalInfo propName) -> SignalConnectMode -> IO SignalHandlerId Source # |
data GObjectNotifySignalInfo (propName :: Symbol) Source #
Connection information for a "notify" signal indicating that a
specific property changed (see PropertyNotify
for the relevant
constructor).
Instances
KnownSymbol propName => SignalInfo (GObjectNotifySignalInfo propName) Source # | |
Defined in Data.GI.Base.Signals type HaskellCallbackType (GObjectNotifySignalInfo propName) :: Type Source # connectSignal :: GObject o => SignalProxy o (GObjectNotifySignalInfo propName) -> o -> HaskellCallbackType (GObjectNotifySignalInfo propName) -> SignalConnectMode -> IO SignalHandlerId Source # | |
type HaskellCallbackType (GObjectNotifySignalInfo propName) Source # | |
Defined in Data.GI.Base.Signals |