packages feed

qtah-qt5-0.8.0: src/Graphics/UI/Qtah/Gui/QDragMoveEvent.hs

{-# LANGUAGE FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MonoLocalBinds, MultiParamTypeClasses, ScopedTypeVariables, TypeSynonymInstances, UndecidableInstances #-}
---------- GENERATED FILE, EDITS WILL BE LOST ----------

{-# LANGUAGE NoMonomorphismRestriction #-}

module Graphics.UI.Qtah.Gui.QDragMoveEvent (
  QDragMoveEventValue (..),
  QDragMoveEventConstPtr (..),
  QDragMoveEventPtr (..),
  QDragMoveEventConst,
  QDragMoveEvent,
  castConst,
  cast,
  downCastConst,
  downCast,
  new,
  newWithType,
  accept,
  acceptWithRect,
  answerRect,
  ignore,
  ignoreWithRect,
  ) where

import qualified Foreign.Hoppy.Runtime as QtahFHR
import qualified Graphics.UI.Qtah.Event as QtahEvent
import Graphics.UI.Qtah.Generated.Gui.QDragMoveEvent
import qualified Graphics.UI.Qtah.SceneEvent as QtahSceneEvent
import Prelude (($), (==))
import qualified Prelude as QtahP


castConst = toQDragMoveEventConst
cast = toQDragMoveEvent
downCastConst = downToQDragMoveEventConst
downCast = downToQDragMoveEvent

instance QtahEvent.Event QDragMoveEvent 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 QDragMoveEvent 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'