{-# LANGUAGE ConstraintKinds, GADTs, FlexibleContexts, MultiParamTypeClasses #-}
module Reflex.GI.Gtk.Input
(
MonadGtkSource(eventFromSignalWith)
, eventOnSignal
, eventOnSignal0
, eventFromSignalWith0
, eventOnSignal1
, eventFromSignalWith1
, eventOnSignal0R
, eventFromSignalWith0R
, eventOnSignal1R
, eventFromSignalWith1R
, behaviorOnSignal
, behaviorFromSignalWith
, behaviorOnSignal1
, behaviorFromSignalWith1
, behaviorOnSignal1R
, behaviorFromSignalWith1R
, dynamicOnSignal
, dynamicFromSignalWith
, dynamicOnSignal1
, dynamicFromSignalWith1
, dynamicOnSignal1R
, dynamicFromSignalWith1R
, eventOnAttribute
, eventFromAttributeWith
, behaviorOnAttribute
, behaviorFromAttributeWith
, dynamicOnAttribute
, dynamicFromAttributeWith
, FireAsync(..)
, Registerer
) where
import Data.GI.Base (GObject)
import Data.GI.Base.Attributes ( AttrGetC
, AttrLabel
, AttrLabelProxy
, get
)
import Data.GI.Base.Signals ( GObjectNotifySignalInfo
, HaskellCallbackType
, SignalHandlerId
, SignalInfo
, SignalProxy(PropertyNotify)
, on
)
import GHC.TypeLits (KnownSymbol)
import Reflex ( Behavior
, Dynamic
, Event
, MonadHold
, TriggerEvent
, hold
, holdDyn
)
import Reflex.GI.Gtk.Run.Class ( MonadRunGtk
, runGtk
)
class ( MonadRunGtk m
, TriggerEvent t m
) => MonadGtkSource t m where
eventFromSignalWith :: ( GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
type Registerer object info =
object -> SignalProxy object info -> HaskellCallbackType info -> IO SignalHandlerId
data FireAsync = FireAsync
| FireSync
deriving (Int -> FireAsync -> ShowS
[FireAsync] -> ShowS
FireAsync -> String
(Int -> FireAsync -> ShowS)
-> (FireAsync -> String)
-> ([FireAsync] -> ShowS)
-> Show FireAsync
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FireAsync] -> ShowS
$cshowList :: [FireAsync] -> ShowS
show :: FireAsync -> String
$cshow :: FireAsync -> String
showsPrec :: Int -> FireAsync -> ShowS
$cshowsPrec :: Int -> FireAsync -> ShowS
Show, ReadPrec [FireAsync]
ReadPrec FireAsync
Int -> ReadS FireAsync
ReadS [FireAsync]
(Int -> ReadS FireAsync)
-> ReadS [FireAsync]
-> ReadPrec FireAsync
-> ReadPrec [FireAsync]
-> Read FireAsync
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FireAsync]
$creadListPrec :: ReadPrec [FireAsync]
readPrec :: ReadPrec FireAsync
$creadPrec :: ReadPrec FireAsync
readList :: ReadS [FireAsync]
$creadList :: ReadS [FireAsync]
readsPrec :: Int -> ReadS FireAsync
$creadsPrec :: Int -> ReadS FireAsync
Read, FireAsync -> FireAsync -> Bool
(FireAsync -> FireAsync -> Bool)
-> (FireAsync -> FireAsync -> Bool) -> Eq FireAsync
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FireAsync -> FireAsync -> Bool
$c/= :: FireAsync -> FireAsync -> Bool
== :: FireAsync -> FireAsync -> Bool
$c== :: FireAsync -> FireAsync -> Bool
Eq)
eventOnSignal :: ( MonadGtkSource t m
, GObject object
, SignalInfo info
)
=> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventOnSignal :: object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventOnSignal = Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventFromSignalWith Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
eventFromSignalWith0 :: ( MonadGtkSource t m
, GObject object
, SignalInfo info
, HaskellCallbackType info ~ IO ()
)
=> Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> m (Event t ())
eventFromSignalWith0 :: Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t ())
eventFromSignalWith0 register :: Registerer object info
register sync :: FireAsync
sync object :: object
object signal :: SignalProxy object info
signal =
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((() -> IO ()) -> HaskellCallbackType info)
-> m (Event t ())
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventFromSignalWith Registerer object info
register FireAsync
sync object
object SignalProxy object info
signal ((() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ())
eventOnSignal0 :: ( MonadGtkSource t m
, HaskellCallbackType info ~ IO ()
, GObject object
, SignalInfo info
)
=> object
-> SignalProxy object info
-> m (Event t ())
eventOnSignal0 :: object -> SignalProxy object info -> m (Event t ())
eventOnSignal0 = Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t ())
forall t (m :: * -> *) object info.
(MonadGtkSource t m, GObject object, SignalInfo info,
HaskellCallbackType info ~ IO ()) =>
Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t ())
eventFromSignalWith0 Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
eventFromSignalWith1 :: ( MonadGtkSource t m
, HaskellCallbackType info ~ (a -> IO ())
, GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> m (Event t a)
eventFromSignalWith1 :: Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t a)
eventFromSignalWith1 register :: Registerer object info
register sync :: FireAsync
sync object :: object
object signal :: SignalProxy object info
signal =
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventFromSignalWith Registerer object info
register FireAsync
sync object
object SignalProxy object info
signal (a -> IO ()) -> HaskellCallbackType info
forall a. a -> a
id
eventOnSignal1 :: ( MonadGtkSource t m
, HaskellCallbackType info ~ (a -> IO ())
, GObject object
, SignalInfo info
)
=> object
-> SignalProxy object info
-> m (Event t a)
eventOnSignal1 :: object -> SignalProxy object info -> m (Event t a)
eventOnSignal1 = Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t a)
forall t (m :: * -> *) info a object.
(MonadGtkSource t m, HaskellCallbackType info ~ (a -> IO ()),
GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t a)
eventFromSignalWith1 Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
eventFromSignalWith0R :: ( MonadGtkSource t m
, HaskellCallbackType info ~ IO b
, GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t ())
eventFromSignalWith0R :: Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t ())
eventFromSignalWith0R register :: Registerer object info
register sync :: FireAsync
sync obj :: object
obj signal :: SignalProxy object info
signal x :: b
x =
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((() -> IO ()) -> HaskellCallbackType info)
-> m (Event t ())
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventFromSignalWith Registerer object info
register FireAsync
sync object
obj SignalProxy object info
signal (((() -> IO ()) -> HaskellCallbackType info) -> m (Event t ()))
-> ((() -> IO ()) -> HaskellCallbackType info) -> m (Event t ())
forall a b. (a -> b) -> a -> b
$ \fire :: () -> IO ()
fire -> b
x b -> IO () -> IO b
forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ () -> IO ()
fire ()
eventOnSignal0R :: ( MonadGtkSource t m
, HaskellCallbackType info ~ IO b
, GObject object
, SignalInfo info
)
=> object
-> SignalProxy object info
-> b
-> m (Event t ())
eventOnSignal0R :: object -> SignalProxy object info -> b -> m (Event t ())
eventOnSignal0R = Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t ())
forall t (m :: * -> *) info b object.
(MonadGtkSource t m, HaskellCallbackType info ~ IO b,
GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t ())
eventFromSignalWith0R Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
eventFromSignalWith1R :: ( MonadGtkSource t m
, HaskellCallbackType info ~ (a -> IO b)
, GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t a)
eventFromSignalWith1R :: Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t a)
eventFromSignalWith1R register :: Registerer object info
register sync :: FireAsync
sync obj :: object
obj signal :: SignalProxy object info
signal r :: b
r =
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventFromSignalWith Registerer object info
register FireAsync
sync object
obj SignalProxy object info
signal (((a -> IO ()) -> HaskellCallbackType info) -> m (Event t a))
-> ((a -> IO ()) -> HaskellCallbackType info) -> m (Event t a)
forall a b. (a -> b) -> a -> b
$ \fire :: a -> IO ()
fire v :: a
v -> b
r b -> IO () -> IO b
forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ a -> IO ()
fire a
v
eventOnSignal1R :: ( MonadGtkSource t m
, HaskellCallbackType info ~ (a -> IO b)
, GObject object
, SignalInfo info
)
=> object
-> SignalProxy object info
-> b
-> m (Event t a)
eventOnSignal1R :: object -> SignalProxy object info -> b -> m (Event t a)
eventOnSignal1R = Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t a)
forall t (m :: * -> *) info a b object.
(MonadGtkSource t m, HaskellCallbackType info ~ (a -> IO b),
GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t a)
eventFromSignalWith1R Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
behaviorFromSignalWith :: ( MonadGtkSource t m
, MonadHold t m
, GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Behavior t a)
behaviorFromSignalWith :: Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Behavior t a)
behaviorFromSignalWith register :: Registerer object info
register sync :: FireAsync
sync initial :: a
initial object :: object
object signal :: SignalProxy object info
signal f :: (a -> IO ()) -> HaskellCallbackType info
f =
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventFromSignalWith Registerer object info
register FireAsync
sync object
object SignalProxy object info
signal (a -> IO ()) -> HaskellCallbackType info
f m (Event t a)
-> (Event t a -> m (Behavior t a)) -> m (Behavior t a)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= a -> Event t a -> m (Behavior t a)
forall k (t :: k) (m :: * -> *) a.
MonadHold t m =>
a -> Event t a -> m (Behavior t a)
hold a
initial
behaviorOnSignal :: ( MonadGtkSource t m
, MonadHold t m
, GObject object
, SignalInfo info
)
=> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Behavior t a)
behaviorOnSignal :: a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Behavior t a)
behaviorOnSignal = Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Behavior t a)
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, MonadHold t m, GObject object,
SignalInfo info) =>
Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Behavior t a)
behaviorFromSignalWith Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
behaviorFromSignalWith1 :: ( MonadGtkSource t m
, MonadHold t m
, HaskellCallbackType info ~ (a -> IO ())
, GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> m (Behavior t a)
behaviorFromSignalWith1 :: Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> m (Behavior t a)
behaviorFromSignalWith1 register :: Registerer object info
register sync :: FireAsync
sync initial :: a
initial object :: object
object signal :: SignalProxy object info
signal =
Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t a)
forall t (m :: * -> *) info a object.
(MonadGtkSource t m, HaskellCallbackType info ~ (a -> IO ()),
GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t a)
eventFromSignalWith1 Registerer object info
register FireAsync
sync object
object SignalProxy object info
signal m (Event t a)
-> (Event t a -> m (Behavior t a)) -> m (Behavior t a)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= a -> Event t a -> m (Behavior t a)
forall k (t :: k) (m :: * -> *) a.
MonadHold t m =>
a -> Event t a -> m (Behavior t a)
hold a
initial
behaviorOnSignal1 :: ( MonadGtkSource t m
, MonadHold t m
, HaskellCallbackType info ~ (a -> IO ())
, GObject object
, SignalInfo info
)
=> a
-> object
-> SignalProxy object info
-> m (Behavior t a)
behaviorOnSignal1 :: a -> object -> SignalProxy object info -> m (Behavior t a)
behaviorOnSignal1 = Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> m (Behavior t a)
forall t (m :: * -> *) info a object.
(MonadGtkSource t m, MonadHold t m,
HaskellCallbackType info ~ (a -> IO ()), GObject object,
SignalInfo info) =>
Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> m (Behavior t a)
behaviorFromSignalWith1 Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
behaviorFromSignalWith1R :: ( MonadGtkSource t m
, MonadHold t m
, HaskellCallbackType info ~ (a -> IO b)
, GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> b
-> m (Behavior t a)
behaviorFromSignalWith1R :: Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> b
-> m (Behavior t a)
behaviorFromSignalWith1R register :: Registerer object info
register sync :: FireAsync
sync initial :: a
initial object :: object
object signal :: SignalProxy object info
signal result :: b
result =
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t a)
forall t (m :: * -> *) info a b object.
(MonadGtkSource t m, HaskellCallbackType info ~ (a -> IO b),
GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t a)
eventFromSignalWith1R Registerer object info
register FireAsync
sync object
object SignalProxy object info
signal b
result m (Event t a)
-> (Event t a -> m (Behavior t a)) -> m (Behavior t a)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= a -> Event t a -> m (Behavior t a)
forall k (t :: k) (m :: * -> *) a.
MonadHold t m =>
a -> Event t a -> m (Behavior t a)
hold a
initial
behaviorOnSignal1R :: ( MonadGtkSource t m
, MonadHold t m
, HaskellCallbackType info ~ (a -> IO b)
, GObject object
, SignalInfo info
)
=> a
-> object
-> SignalProxy object info
-> b
-> m (Behavior t a)
behaviorOnSignal1R :: a -> object -> SignalProxy object info -> b -> m (Behavior t a)
behaviorOnSignal1R = Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> b
-> m (Behavior t a)
forall t (m :: * -> *) info a b object.
(MonadGtkSource t m, MonadHold t m,
HaskellCallbackType info ~ (a -> IO b), GObject object,
SignalInfo info) =>
Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> b
-> m (Behavior t a)
behaviorFromSignalWith1R Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
dynamicFromSignalWith :: ( MonadGtkSource t m
, MonadHold t m
, GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Dynamic t a)
dynamicFromSignalWith :: Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Dynamic t a)
dynamicFromSignalWith register :: Registerer object info
register sync :: FireAsync
sync initial :: a
initial object :: object
object signal :: SignalProxy object info
signal f :: (a -> IO ()) -> HaskellCallbackType info
f =
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventFromSignalWith Registerer object info
register FireAsync
sync object
object SignalProxy object info
signal (a -> IO ()) -> HaskellCallbackType info
f m (Event t a) -> (Event t a -> m (Dynamic t a)) -> m (Dynamic t a)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= a -> Event t a -> m (Dynamic t a)
forall k (t :: k) (m :: * -> *) a.
MonadHold t m =>
a -> Event t a -> m (Dynamic t a)
holdDyn a
initial
dynamicOnSignal :: ( MonadGtkSource t m
, MonadHold t m
, GObject object
, SignalInfo info
)
=> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Dynamic t a)
dynamicOnSignal :: a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Dynamic t a)
dynamicOnSignal = Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Dynamic t a)
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, MonadHold t m, GObject object,
SignalInfo info) =>
Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Dynamic t a)
dynamicFromSignalWith Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
dynamicFromSignalWith1 :: ( MonadGtkSource t m
, MonadHold t m
, HaskellCallbackType info ~ (a -> IO ())
, GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> m (Dynamic t a)
dynamicFromSignalWith1 :: Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> m (Dynamic t a)
dynamicFromSignalWith1 register :: Registerer object info
register sync :: FireAsync
sync initial :: a
initial object :: object
object signal :: SignalProxy object info
signal =
Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t a)
forall t (m :: * -> *) info a object.
(MonadGtkSource t m, HaskellCallbackType info ~ (a -> IO ()),
GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync -> object -> SignalProxy object info -> m (Event t a)
eventFromSignalWith1 Registerer object info
register FireAsync
sync object
object SignalProxy object info
signal m (Event t a) -> (Event t a -> m (Dynamic t a)) -> m (Dynamic t a)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= a -> Event t a -> m (Dynamic t a)
forall k (t :: k) (m :: * -> *) a.
MonadHold t m =>
a -> Event t a -> m (Dynamic t a)
holdDyn a
initial
dynamicOnSignal1 :: ( MonadGtkSource t m
, MonadHold t m
, HaskellCallbackType info ~ (a -> IO ())
, GObject object
, SignalInfo info
)
=> a
-> object
-> SignalProxy object info
-> m (Dynamic t a)
dynamicOnSignal1 :: a -> object -> SignalProxy object info -> m (Dynamic t a)
dynamicOnSignal1 = Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> m (Dynamic t a)
forall t (m :: * -> *) info a object.
(MonadGtkSource t m, MonadHold t m,
HaskellCallbackType info ~ (a -> IO ()), GObject object,
SignalInfo info) =>
Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> m (Dynamic t a)
dynamicFromSignalWith1 Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
dynamicFromSignalWith1R :: ( MonadGtkSource t m
, MonadHold t m
, HaskellCallbackType info ~ (a -> IO b)
, GObject object
, SignalInfo info
)
=> Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> b
-> m (Dynamic t a)
dynamicFromSignalWith1R :: Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> b
-> m (Dynamic t a)
dynamicFromSignalWith1R register :: Registerer object info
register sync :: FireAsync
sync initial :: a
initial object :: object
object signal :: SignalProxy object info
signal result :: b
result =
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t a)
forall t (m :: * -> *) info a b object.
(MonadGtkSource t m, HaskellCallbackType info ~ (a -> IO b),
GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> b
-> m (Event t a)
eventFromSignalWith1R Registerer object info
register FireAsync
sync object
object SignalProxy object info
signal b
result m (Event t a) -> (Event t a -> m (Dynamic t a)) -> m (Dynamic t a)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= a -> Event t a -> m (Dynamic t a)
forall k (t :: k) (m :: * -> *) a.
MonadHold t m =>
a -> Event t a -> m (Dynamic t a)
holdDyn a
initial
dynamicOnSignal1R :: ( MonadGtkSource t m
, MonadHold t m
, HaskellCallbackType info ~ (a -> IO b)
, GObject object
, SignalInfo info
)
=> a
-> object
-> SignalProxy object info
-> b
-> m (Dynamic t a)
dynamicOnSignal1R :: a -> object -> SignalProxy object info -> b -> m (Dynamic t a)
dynamicOnSignal1R = Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> b
-> m (Dynamic t a)
forall t (m :: * -> *) info a b object.
(MonadGtkSource t m, MonadHold t m,
HaskellCallbackType info ~ (a -> IO b), GObject object,
SignalInfo info) =>
Registerer object info
-> FireAsync
-> a
-> object
-> SignalProxy object info
-> b
-> m (Dynamic t a)
dynamicFromSignalWith1R Registerer object info
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
eventFromAttributeWith :: ( MonadGtkSource t m
, AttrGetC info object attr value
, GObject object
, KnownSymbol (AttrLabel info)
)
=> Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> AttrLabelProxy attr
-> m (Event t value)
eventFromAttributeWith :: Registerer object GObjectNotifySignalInfo
-> FireAsync -> object -> AttrLabelProxy attr -> m (Event t value)
eventFromAttributeWith register :: Registerer object GObjectNotifySignalInfo
register sync :: FireAsync
sync object :: object
object attr :: AttrLabelProxy attr
attr =
Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> SignalProxy object GObjectNotifySignalInfo
-> ((value -> IO ())
-> HaskellCallbackType GObjectNotifySignalInfo)
-> m (Event t value)
forall t (m :: * -> *) object info a.
(MonadGtkSource t m, GObject object, SignalInfo info) =>
Registerer object info
-> FireAsync
-> object
-> SignalProxy object info
-> ((a -> IO ()) -> HaskellCallbackType info)
-> m (Event t a)
eventFromSignalWith Registerer object GObjectNotifySignalInfo
register FireAsync
sync object
object (AttrLabelProxy attr -> SignalProxy object GObjectNotifySignalInfo
forall info1 (propName :: Symbol) object (pl :: Symbol).
(info1 ~ ResolveAttribute propName object, AttrInfo info1,
pl ~ AttrLabel info1, KnownSymbol pl) =>
AttrLabelProxy propName
-> SignalProxy object GObjectNotifySignalInfo
PropertyNotify AttrLabelProxy attr
attr) (((value -> IO ()) -> HaskellCallbackType GObjectNotifySignalInfo)
-> m (Event t value))
-> ((value -> IO ())
-> HaskellCallbackType GObjectNotifySignalInfo)
-> m (Event t value)
forall a b. (a -> b) -> a -> b
$ \fire :: value -> IO ()
fire _ ->
object -> AttrLabelProxy attr -> IO value
forall info (attr :: Symbol) obj result (m :: * -> *).
(AttrGetC info obj attr result, MonadIO m) =>
obj -> AttrLabelProxy attr -> m result
get object
object AttrLabelProxy attr
attr IO value -> (value -> IO ()) -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= value -> IO ()
fire
eventOnAttribute :: ( MonadGtkSource t m
, AttrGetC info object attr value
, GObject object
, KnownSymbol (AttrLabel info)
)
=> object
-> AttrLabelProxy attr
-> m (Event t value)
eventOnAttribute :: object -> AttrLabelProxy attr -> m (Event t value)
eventOnAttribute = Registerer object GObjectNotifySignalInfo
-> FireAsync -> object -> AttrLabelProxy attr -> m (Event t value)
forall t (m :: * -> *) info object (attr :: Symbol) value.
(MonadGtkSource t m, AttrGetC info object attr value,
GObject object, KnownSymbol (AttrLabel info)) =>
Registerer object GObjectNotifySignalInfo
-> FireAsync -> object -> AttrLabelProxy attr -> m (Event t value)
eventFromAttributeWith Registerer object GObjectNotifySignalInfo
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
behaviorFromAttributeWith :: ( MonadGtkSource t m
, MonadHold t m
, AttrGetC info object attr value
, GObject object
, KnownSymbol (AttrLabel info)
)
=> Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> AttrLabelProxy attr
-> m (Behavior t value)
behaviorFromAttributeWith :: Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> AttrLabelProxy attr
-> m (Behavior t value)
behaviorFromAttributeWith register :: Registerer object GObjectNotifySignalInfo
register sync :: FireAsync
sync object :: object
object attr :: AttrLabelProxy attr
attr = do
value
initial <- IO value -> m value
forall (m :: * -> *) a. MonadRunGtk m => IO a -> m a
runGtk (IO value -> m value) -> IO value -> m value
forall a b. (a -> b) -> a -> b
$ object -> AttrLabelProxy attr -> IO value
forall info (attr :: Symbol) obj result (m :: * -> *).
(AttrGetC info obj attr result, MonadIO m) =>
obj -> AttrLabelProxy attr -> m result
get object
object AttrLabelProxy attr
attr
Registerer object GObjectNotifySignalInfo
-> FireAsync -> object -> AttrLabelProxy attr -> m (Event t value)
forall t (m :: * -> *) info object (attr :: Symbol) value.
(MonadGtkSource t m, AttrGetC info object attr value,
GObject object, KnownSymbol (AttrLabel info)) =>
Registerer object GObjectNotifySignalInfo
-> FireAsync -> object -> AttrLabelProxy attr -> m (Event t value)
eventFromAttributeWith Registerer object GObjectNotifySignalInfo
register FireAsync
sync object
object AttrLabelProxy attr
attr m (Event t value)
-> (Event t value -> m (Behavior t value)) -> m (Behavior t value)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= value -> Event t value -> m (Behavior t value)
forall k (t :: k) (m :: * -> *) a.
MonadHold t m =>
a -> Event t a -> m (Behavior t a)
hold value
initial
behaviorOnAttribute :: ( MonadGtkSource t m
, MonadHold t m
, AttrGetC info object attr value
, GObject object
, KnownSymbol (AttrLabel info)
)
=> object
-> AttrLabelProxy attr
-> m (Behavior t value)
behaviorOnAttribute :: object -> AttrLabelProxy attr -> m (Behavior t value)
behaviorOnAttribute = Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> AttrLabelProxy attr
-> m (Behavior t value)
forall t (m :: * -> *) info object (attr :: Symbol) value.
(MonadGtkSource t m, MonadHold t m,
AttrGetC info object attr value, GObject object,
KnownSymbol (AttrLabel info)) =>
Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> AttrLabelProxy attr
-> m (Behavior t value)
behaviorFromAttributeWith Registerer object GObjectNotifySignalInfo
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync
dynamicFromAttributeWith :: ( MonadGtkSource t m
, MonadHold t m
, AttrGetC info object attr value
, GObject object
, KnownSymbol (AttrLabel info)
)
=> Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> AttrLabelProxy attr
-> m (Dynamic t value)
dynamicFromAttributeWith :: Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> AttrLabelProxy attr
-> m (Dynamic t value)
dynamicFromAttributeWith register :: Registerer object GObjectNotifySignalInfo
register sync :: FireAsync
sync object :: object
object attr :: AttrLabelProxy attr
attr = do
value
initial <- IO value -> m value
forall (m :: * -> *) a. MonadRunGtk m => IO a -> m a
runGtk (IO value -> m value) -> IO value -> m value
forall a b. (a -> b) -> a -> b
$ object -> AttrLabelProxy attr -> IO value
forall info (attr :: Symbol) obj result (m :: * -> *).
(AttrGetC info obj attr result, MonadIO m) =>
obj -> AttrLabelProxy attr -> m result
get object
object AttrLabelProxy attr
attr
Registerer object GObjectNotifySignalInfo
-> FireAsync -> object -> AttrLabelProxy attr -> m (Event t value)
forall t (m :: * -> *) info object (attr :: Symbol) value.
(MonadGtkSource t m, AttrGetC info object attr value,
GObject object, KnownSymbol (AttrLabel info)) =>
Registerer object GObjectNotifySignalInfo
-> FireAsync -> object -> AttrLabelProxy attr -> m (Event t value)
eventFromAttributeWith Registerer object GObjectNotifySignalInfo
register FireAsync
sync object
object AttrLabelProxy attr
attr m (Event t value)
-> (Event t value -> m (Dynamic t value)) -> m (Dynamic t value)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= value -> Event t value -> m (Dynamic t value)
forall k (t :: k) (m :: * -> *) a.
MonadHold t m =>
a -> Event t a -> m (Dynamic t a)
holdDyn value
initial
dynamicOnAttribute :: ( MonadGtkSource t m
, MonadHold t m
, AttrGetC info object attr value
, GObject object
, KnownSymbol (AttrLabel info)
)
=> object
-> AttrLabelProxy attr
-> m (Dynamic t value)
dynamicOnAttribute :: object -> AttrLabelProxy attr -> m (Dynamic t value)
dynamicOnAttribute = Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> AttrLabelProxy attr
-> m (Dynamic t value)
forall t (m :: * -> *) info object (attr :: Symbol) value.
(MonadGtkSource t m, MonadHold t m,
AttrGetC info object attr value, GObject object,
KnownSymbol (AttrLabel info)) =>
Registerer object GObjectNotifySignalInfo
-> FireAsync
-> object
-> AttrLabelProxy attr
-> m (Dynamic t value)
dynamicFromAttributeWith Registerer object GObjectNotifySignalInfo
forall object info (m :: * -> *).
(GObject object, MonadIO m, SignalInfo info) =>
object
-> SignalProxy object info
-> HaskellCallbackType info
-> m SignalHandlerId
on FireAsync
FireSync