Module

Graphics.Glapple.Data.Emitter

Package
purescript-glapple
Repository
yukikurage/purescript-glapple

#newEmitter Source

newEmitter :: forall m m' i. MonadEffect m => m (EmitterId m' i)

Create a new emitter

#unregister Source

unregister :: forall m m' i. MonadEffect m => RegistrationId m' i -> m Unit

Remove the handler from the emitter.

#unregisterAll Source

unregisterAll :: forall m m' i. MonadEffect m => EmitterId m' i -> m Unit

Delete all handlers.

#register Source

register :: forall m m' i. MonadEffect m => EmitterId m' i -> (i -> m' Unit) -> m (RegistrationId m' i)

Register a handler to the Emitter.

#fire Source

fire :: forall m i. MonadEffect m => MonadRec m => EmitterId m i -> i -> m Unit

Fire emitter.

#EmitterId Source

newtype EmitterId :: (Type -> Type) -> Type -> Typenewtype EmitterId m i

#RegistrationId Source

data RegistrationId :: (Type -> Type) -> Type -> Typedata RegistrationId m i

The key that comes back when you register to the Emitter.

#emitterSize Source

emitterSize :: forall m' i m. MonadEffect m => EmitterId m' i -> m Int