Safe Haskell | None |
---|---|
Language | Haskell98 |
Routines for connecting GObject
s to signals.
- data SignalConnectMode
- connectSignalFunPtr :: GObject o => o -> String -> FunPtr a -> SignalConnectMode -> IO SignalHandlerId
- on :: forall signal extra o info constraint proxy m. (GObject o, HasSignal signal o, info ~ ResolveSignal signal o, SignalInfo info, KnownSymbol extra, constraint o, MonadIO m) => o -> proxy (signal :: Symbol) (extra :: Symbol) (constraint :: * -> Constraint) -> HaskellCallbackType info -> m SignalHandlerId
- after :: forall signal extra o info constraint proxy m. (GObject o, HasSignal signal o, info ~ ResolveSignal signal o, SignalInfo info, KnownSymbol extra, constraint o, MonadIO m) => o -> proxy (signal :: Symbol) (extra :: Symbol) (constraint :: * -> Constraint) -> HaskellCallbackType info -> m SignalHandlerId
- type SignalHandlerId = Word64
- class SignalInfo info where
- type HaskellCallbackType info
- connectSignal :: (KnownSymbol extra, GObject o, constraint o) => SignalProxy info extra constraint -> o -> HaskellCallbackType info -> SignalConnectMode -> IO SignalHandlerId
Documentation
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
.
on :: forall signal extra o info constraint proxy m. (GObject o, HasSignal signal o, info ~ ResolveSignal signal o, SignalInfo info, KnownSymbol extra, constraint o, MonadIO m) => o -> proxy (signal :: Symbol) (extra :: Symbol) (constraint :: * -> Constraint) -> HaskellCallbackType info -> m SignalHandlerId Source
Same as connectSignal
, specifying from the beginning that the
handler is to be run before the default handler.
on = connectSignal SignalConnectBefore
after :: forall signal extra o info constraint proxy m. (GObject o, HasSignal signal o, info ~ ResolveSignal signal o, SignalInfo info, KnownSymbol extra, constraint o, MonadIO m) => o -> proxy (signal :: Symbol) (extra :: Symbol) (constraint :: * -> Constraint) -> HaskellCallbackType info -> m SignalHandlerId Source
Connect a signal to a handler, running the handler after the default one.
after = connectSignal SignalConnectAfter
type SignalHandlerId = Word64 Source
Type of a GObject
signal handler id.
class SignalInfo info where Source
Information about an overloaded signal.
type HaskellCallbackType info Source
connectSignal :: (KnownSymbol extra, GObject o, constraint o) => SignalProxy info extra constraint -> 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.