{-# LANGUAGE CApiFFI #-}
module OpenCascade.GP.GTrsf
( GTrsf
, new
, setValue
, setForm
) where

import OpenCascade.GP.Types
import OpenCascade.GP.Internal.Destructors
import Foreign.C
import Foreign.Ptr
import Data.Coerce (coerce)
import Data.Acquire 

foreign import capi unsafe "hs_gp_GTrsf.h hs_new_gp_GTrsf" rawNew ::IO (Ptr GTrsf)

new :: Acquire (Ptr GTrsf)
new :: Acquire (Ptr GTrsf)
new = IO (Ptr GTrsf) -> (Ptr GTrsf -> IO ()) -> Acquire (Ptr GTrsf)
forall a. IO a -> (a -> IO ()) -> Acquire a
mkAcquire IO (Ptr GTrsf)
rawNew Ptr GTrsf -> IO ()
deleteGTrsf

foreign import capi unsafe "hs_gp_GTrsf.h hs_gp_GTrsf_setValue" rawSetValue :: Ptr GTrsf -> CInt -> CInt -> CDouble -> IO () 

setValue :: Ptr GTrsf -> Int -> Int -> Double -> IO ()
setValue :: Ptr GTrsf -> Int -> Int -> Double -> IO ()
setValue Ptr GTrsf
trsf Int
row Int
column Double
value = Ptr GTrsf -> CInt -> CInt -> CDouble -> IO ()
rawSetValue Ptr GTrsf
trsf (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
row) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
column) (Double -> CDouble
forall a b. Coercible a b => a -> b
coerce Double
value)

foreign import capi unsafe "hs_gp_GTrsf.h hs_gp_GTrsf_setForm" setForm :: Ptr GTrsf -> IO ()