{-# LANGUAGE FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, GeneralizedNewtypeDeriving, MonoLocalBinds, MultiParamTypeClasses, ScopedTypeVariables, TypeSynonymInstances, UndecidableInstances #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Graphics.UI.Qtah.Gui.QActionEvent (
QActionEventValue (..),
QActionEventConstPtr (..),
QActionEventPtr (..),
QActionEventConst,
QActionEvent,
castConst,
cast,
downCastConst,
downCast,
new,
newBefore,
action,
before,
) where
import qualified Foreign.Hoppy.Runtime as QtahFHR
import qualified Graphics.UI.Qtah.Event as QtahEvent
import Graphics.UI.Qtah.Generated.Gui.QActionEvent
import qualified Graphics.UI.Qtah.SceneEvent as QtahSceneEvent
import Prelude (($), (==))
import qualified Prelude as QtahP
castConst = toQActionEventConst
cast = toQActionEvent
downCastConst = downToQActionEventConst
downCast = downToQActionEvent
instance QtahEvent.Event QActionEvent where
onEvent receiver' handler' = QtahEvent.onAnyEvent receiver' $ \_ qevent' ->
let event' = downCast qevent'
in if event' == QtahFHR.nullptr then QtahP.return QtahP.False else handler' event'
instance QtahSceneEvent.SceneEvent QActionEvent where
onSceneEvent receiver' handler' = QtahSceneEvent.onAnySceneEvent receiver' $ \_ qevent' ->
let event' = downCast qevent'
in if event' == QtahFHR.nullptr then QtahP.return QtahP.False else handler' event'