module Graphics.UI.Gtk.WebKit.DOM.Touch(
getClientX,
getClientY,
getScreenX,
getScreenY,
getPageX,
getPageY,
getTarget,
getIdentifier,
getWebkitRadiusX,
getWebkitRadiusY,
getWebkitRotationAngle,
getWebkitForce,
Touch,
castToTouch,
gTypeTouch,
TouchClass,
toTouch,
) where
import Prelude hiding (drop, error, print)
import Data.Typeable (Typeable)
import Foreign.Marshal (maybePeek, maybeWith)
import System.Glib.FFI (maybeNull, withForeignPtr, nullForeignPtr, Ptr, nullPtr, castPtr, Word, Int64, Word64, CChar(..), CInt(..), CUInt(..), CLong(..), CULong(..), CLLong(..), CULLong(..), CShort(..), CUShort(..), CFloat(..), CDouble(..), toBool, fromBool)
import System.Glib.UTFString (GlibString(..), readUTFString)
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Monad.IO.Class (MonadIO(..))
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventTargetClosures
import Graphics.UI.Gtk.WebKit.DOM.EventM
import Graphics.UI.Gtk.WebKit.Types
import Graphics.UI.Gtk.WebKit.DOM.Enums
getClientX :: (MonadIO m, TouchClass self) => self -> m Int
getClientX self
= liftIO
(fromIntegral <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_client_x argPtr1) (toTouch self)))
getClientY :: (MonadIO m, TouchClass self) => self -> m Int
getClientY self
= liftIO
(fromIntegral <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_client_y argPtr1) (toTouch self)))
getScreenX :: (MonadIO m, TouchClass self) => self -> m Int
getScreenX self
= liftIO
(fromIntegral <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_screen_x argPtr1) (toTouch self)))
getScreenY :: (MonadIO m, TouchClass self) => self -> m Int
getScreenY self
= liftIO
(fromIntegral <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_screen_y argPtr1) (toTouch self)))
getPageX :: (MonadIO m, TouchClass self) => self -> m Int
getPageX self
= liftIO
(fromIntegral <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_page_x argPtr1) (toTouch self)))
getPageY :: (MonadIO m, TouchClass self) => self -> m Int
getPageY self
= liftIO
(fromIntegral <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_page_y argPtr1) (toTouch self)))
getTarget ::
(MonadIO m, TouchClass self) => self -> m (Maybe EventTarget)
getTarget self
= liftIO
(maybeNull (makeNewGObject mkEventTarget)
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_target argPtr1) (toTouch self)))
getIdentifier :: (MonadIO m, TouchClass self) => self -> m Word
getIdentifier self
= liftIO
(fromIntegral <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_identifier argPtr1) (toTouch self)))
getWebkitRadiusX :: (MonadIO m, TouchClass self) => self -> m Int
getWebkitRadiusX self
= liftIO
(fromIntegral <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_webkit_radius_x argPtr1) (toTouch self)))
getWebkitRadiusY :: (MonadIO m, TouchClass self) => self -> m Int
getWebkitRadiusY self
= liftIO
(fromIntegral <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_webkit_radius_y argPtr1) (toTouch self)))
getWebkitRotationAngle ::
(MonadIO m, TouchClass self) => self -> m Float
getWebkitRotationAngle self
= liftIO
(realToFrac <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_webkit_rotation_angle argPtr1)
(toTouch self)))
getWebkitForce :: (MonadIO m, TouchClass self) => self -> m Float
getWebkitForce self
= liftIO
(realToFrac <$>
((\(Touch arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_touch_get_webkit_force argPtr1) (toTouch self)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_client_x"
webkit_dom_touch_get_client_x :: ((Ptr Touch) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_client_y"
webkit_dom_touch_get_client_y :: ((Ptr Touch) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_screen_x"
webkit_dom_touch_get_screen_x :: ((Ptr Touch) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_screen_y"
webkit_dom_touch_get_screen_y :: ((Ptr Touch) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_page_x"
webkit_dom_touch_get_page_x :: ((Ptr Touch) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_page_y"
webkit_dom_touch_get_page_y :: ((Ptr Touch) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_target"
webkit_dom_touch_get_target :: ((Ptr Touch) -> (IO (Ptr EventTarget)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_identifier"
webkit_dom_touch_get_identifier :: ((Ptr Touch) -> (IO CULong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_webkit_radius_x"
webkit_dom_touch_get_webkit_radius_x :: ((Ptr Touch) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_webkit_radius_y"
webkit_dom_touch_get_webkit_radius_y :: ((Ptr Touch) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_webkit_rotation_angle"
webkit_dom_touch_get_webkit_rotation_angle :: ((Ptr Touch) -> (IO CFloat))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Touch.h webkit_dom_touch_get_webkit_force"
webkit_dom_touch_get_webkit_force :: ((Ptr Touch) -> (IO CFloat))