{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) -} module GI.WebKit.Objects.DOMWebKitPoint ( -- * Exported types DOMWebKitPoint(..) , DOMWebKitPointK , toDOMWebKitPoint , noDOMWebKitPoint , -- * Methods -- ** dOMWebKitPointGetX dOMWebKitPointGetX , -- ** dOMWebKitPointGetY dOMWebKitPointGetY , -- ** dOMWebKitPointSetX dOMWebKitPointSetX , -- ** dOMWebKitPointSetY dOMWebKitPointSetY , -- * Properties -- ** X DOMWebKitPointXPropertyInfo , constructDOMWebKitPointX , getDOMWebKitPointX , setDOMWebKitPointX , -- ** Y DOMWebKitPointYPropertyInfo , constructDOMWebKitPointY , getDOMWebKitPointY , setDOMWebKitPointY , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.WebKit.Types import GI.WebKit.Callbacks import qualified GI.GObject as GObject newtype DOMWebKitPoint = DOMWebKitPoint (ForeignPtr DOMWebKitPoint) foreign import ccall "webkit_dom_webkit_point_get_type" c_webkit_dom_webkit_point_get_type :: IO GType type instance ParentTypes DOMWebKitPoint = DOMWebKitPointParentTypes type DOMWebKitPointParentTypes = '[DOMObject, GObject.Object] instance GObject DOMWebKitPoint where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_webkit_dom_webkit_point_get_type class GObject o => DOMWebKitPointK o instance (GObject o, IsDescendantOf DOMWebKitPoint o) => DOMWebKitPointK o toDOMWebKitPoint :: DOMWebKitPointK o => o -> IO DOMWebKitPoint toDOMWebKitPoint = unsafeCastTo DOMWebKitPoint noDOMWebKitPoint :: Maybe DOMWebKitPoint noDOMWebKitPoint = Nothing -- VVV Prop "x" -- Type: TBasicType TFloat -- Flags: [PropertyReadable,PropertyWritable] getDOMWebKitPointX :: (MonadIO m, DOMWebKitPointK o) => o -> m Float getDOMWebKitPointX obj = liftIO $ getObjectPropertyFloat obj "x" setDOMWebKitPointX :: (MonadIO m, DOMWebKitPointK o) => o -> Float -> m () setDOMWebKitPointX obj val = liftIO $ setObjectPropertyFloat obj "x" val constructDOMWebKitPointX :: Float -> IO ([Char], GValue) constructDOMWebKitPointX val = constructObjectPropertyFloat "x" val data DOMWebKitPointXPropertyInfo instance AttrInfo DOMWebKitPointXPropertyInfo where type AttrAllowedOps DOMWebKitPointXPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint DOMWebKitPointXPropertyInfo = (~) Float type AttrBaseTypeConstraint DOMWebKitPointXPropertyInfo = DOMWebKitPointK type AttrGetType DOMWebKitPointXPropertyInfo = Float type AttrLabel DOMWebKitPointXPropertyInfo = "DOMWebKitPoint::x" attrGet _ = getDOMWebKitPointX attrSet _ = setDOMWebKitPointX attrConstruct _ = constructDOMWebKitPointX -- VVV Prop "y" -- Type: TBasicType TFloat -- Flags: [PropertyReadable,PropertyWritable] getDOMWebKitPointY :: (MonadIO m, DOMWebKitPointK o) => o -> m Float getDOMWebKitPointY obj = liftIO $ getObjectPropertyFloat obj "y" setDOMWebKitPointY :: (MonadIO m, DOMWebKitPointK o) => o -> Float -> m () setDOMWebKitPointY obj val = liftIO $ setObjectPropertyFloat obj "y" val constructDOMWebKitPointY :: Float -> IO ([Char], GValue) constructDOMWebKitPointY val = constructObjectPropertyFloat "y" val data DOMWebKitPointYPropertyInfo instance AttrInfo DOMWebKitPointYPropertyInfo where type AttrAllowedOps DOMWebKitPointYPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint DOMWebKitPointYPropertyInfo = (~) Float type AttrBaseTypeConstraint DOMWebKitPointYPropertyInfo = DOMWebKitPointK type AttrGetType DOMWebKitPointYPropertyInfo = Float type AttrLabel DOMWebKitPointYPropertyInfo = "DOMWebKitPoint::y" attrGet _ = getDOMWebKitPointY attrSet _ = setDOMWebKitPointY attrConstruct _ = constructDOMWebKitPointY type instance AttributeList DOMWebKitPoint = DOMWebKitPointAttributeList type DOMWebKitPointAttributeList = ('[ '("core-object", DOMObjectCoreObjectPropertyInfo), '("x", DOMWebKitPointXPropertyInfo), '("y", DOMWebKitPointYPropertyInfo)] :: [(Symbol, *)]) type instance SignalList DOMWebKitPoint = DOMWebKitPointSignalList type DOMWebKitPointSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method DOMWebKitPoint::get_x -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMWebKitPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMWebKitPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TFloat -- throws : False -- Skip return : False foreign import ccall "webkit_dom_webkit_point_get_x" webkit_dom_webkit_point_get_x :: Ptr DOMWebKitPoint -> -- _obj : TInterface "WebKit" "DOMWebKitPoint" IO CFloat dOMWebKitPointGetX :: (MonadIO m, DOMWebKitPointK a) => a -> -- _obj m Float dOMWebKitPointGetX _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_dom_webkit_point_get_x _obj' let result' = realToFrac result touchManagedPtr _obj return result' -- method DOMWebKitPoint::get_y -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMWebKitPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMWebKitPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TFloat -- throws : False -- Skip return : False foreign import ccall "webkit_dom_webkit_point_get_y" webkit_dom_webkit_point_get_y :: Ptr DOMWebKitPoint -> -- _obj : TInterface "WebKit" "DOMWebKitPoint" IO CFloat dOMWebKitPointGetY :: (MonadIO m, DOMWebKitPointK a) => a -> -- _obj m Float dOMWebKitPointGetY _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_dom_webkit_point_get_y _obj' let result' = realToFrac result touchManagedPtr _obj return result' -- method DOMWebKitPoint::set_x -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMWebKitPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMWebKitPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "webkit_dom_webkit_point_set_x" webkit_dom_webkit_point_set_x :: Ptr DOMWebKitPoint -> -- _obj : TInterface "WebKit" "DOMWebKitPoint" CFloat -> -- value : TBasicType TFloat IO () dOMWebKitPointSetX :: (MonadIO m, DOMWebKitPointK a) => a -> -- _obj Float -> -- value m () dOMWebKitPointSetX _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let value' = realToFrac value webkit_dom_webkit_point_set_x _obj' value' touchManagedPtr _obj return () -- method DOMWebKitPoint::set_y -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMWebKitPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMWebKitPoint", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TFloat, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "webkit_dom_webkit_point_set_y" webkit_dom_webkit_point_set_y :: Ptr DOMWebKitPoint -> -- _obj : TInterface "WebKit" "DOMWebKitPoint" CFloat -> -- value : TBasicType TFloat IO () dOMWebKitPointSetY :: (MonadIO m, DOMWebKitPointK a) => a -> -- _obj Float -> -- value m () dOMWebKitPointSetY _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let value' = realToFrac value webkit_dom_webkit_point_set_y _obj' value' touchManagedPtr _obj return ()