{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Poppler.Structs.Rectangle
(
Rectangle(..) ,
newZeroRectangle ,
#if defined(ENABLE_OVERLOADING)
ResolveRectangleMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
RectangleCopyMethodInfo ,
#endif
rectangleCopy ,
#if defined(ENABLE_OVERLOADING)
RectangleFindGetIgnoredHyphenMethodInfo ,
#endif
rectangleFindGetIgnoredHyphen ,
#if defined(ENABLE_OVERLOADING)
RectangleFindGetMatchContinuedMethodInfo,
#endif
rectangleFindGetMatchContinued ,
#if defined(ENABLE_OVERLOADING)
RectangleFreeMethodInfo ,
#endif
rectangleFree ,
rectangleNew ,
getRectangleX1 ,
#if defined(ENABLE_OVERLOADING)
rectangle_x1 ,
#endif
setRectangleX1 ,
getRectangleX2 ,
#if defined(ENABLE_OVERLOADING)
rectangle_x2 ,
#endif
setRectangleX2 ,
getRectangleY1 ,
#if defined(ENABLE_OVERLOADING)
rectangle_y1 ,
#endif
setRectangleY1 ,
getRectangleY2 ,
#if defined(ENABLE_OVERLOADING)
rectangle_y2 ,
#endif
setRectangleY2 ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
newtype Rectangle = Rectangle (SP.ManagedPtr Rectangle)
deriving (Rectangle -> Rectangle -> Bool
(Rectangle -> Rectangle -> Bool)
-> (Rectangle -> Rectangle -> Bool) -> Eq Rectangle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Rectangle -> Rectangle -> Bool
== :: Rectangle -> Rectangle -> Bool
$c/= :: Rectangle -> Rectangle -> Bool
/= :: Rectangle -> Rectangle -> Bool
Eq)
instance SP.ManagedPtrNewtype Rectangle where
toManagedPtr :: Rectangle -> ManagedPtr Rectangle
toManagedPtr (Rectangle ManagedPtr Rectangle
p) = ManagedPtr Rectangle
p
foreign import ccall "poppler_rectangle_get_type" c_poppler_rectangle_get_type ::
IO GType
type instance O.ParentTypes Rectangle = '[]
instance O.HasParentTypes Rectangle
instance B.Types.TypedObject Rectangle where
glibType :: IO GType
glibType = IO GType
c_poppler_rectangle_get_type
instance B.Types.GBoxed Rectangle
instance B.GValue.IsGValue (Maybe Rectangle) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_poppler_rectangle_get_type
gvalueSet_ :: Ptr GValue -> Maybe Rectangle -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Rectangle
P.Nothing = Ptr GValue -> Ptr Rectangle -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr Rectangle
forall a. Ptr a
FP.nullPtr :: FP.Ptr Rectangle)
gvalueSet_ Ptr GValue
gv (P.Just Rectangle
obj) = Rectangle -> (Ptr Rectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Rectangle
obj (Ptr GValue -> Ptr Rectangle -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Rectangle)
gvalueGet_ Ptr GValue
gv = do
Ptr Rectangle
ptr <- Ptr GValue -> IO (Ptr Rectangle)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr Rectangle)
if Ptr Rectangle
ptr Ptr Rectangle -> Ptr Rectangle -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Rectangle
forall a. Ptr a
FP.nullPtr
then Rectangle -> Maybe Rectangle
forall a. a -> Maybe a
P.Just (Rectangle -> Maybe Rectangle)
-> IO Rectangle -> IO (Maybe Rectangle)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr Rectangle -> Rectangle
Rectangle Ptr Rectangle
ptr
else Maybe Rectangle -> IO (Maybe Rectangle)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Rectangle
forall a. Maybe a
P.Nothing
newZeroRectangle :: MonadIO m => m Rectangle
newZeroRectangle :: forall (m :: * -> *). MonadIO m => m Rectangle
newZeroRectangle = IO Rectangle -> m Rectangle
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Rectangle -> m Rectangle) -> IO Rectangle -> m Rectangle
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr Rectangle)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
32 IO (Ptr Rectangle)
-> (Ptr Rectangle -> IO Rectangle) -> IO Rectangle
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Rectangle
instance tag ~ 'AttrSet => Constructible Rectangle tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr Rectangle -> Rectangle)
-> [AttrOp Rectangle tag] -> m Rectangle
new ManagedPtr Rectangle -> Rectangle
_ [AttrOp Rectangle tag]
attrs = do
Rectangle
o <- m Rectangle
forall (m :: * -> *). MonadIO m => m Rectangle
newZeroRectangle
Rectangle -> [AttrOp Rectangle 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set Rectangle
o [AttrOp Rectangle tag]
[AttrOp Rectangle 'AttrSet]
attrs
Rectangle -> m Rectangle
forall a. a -> m a
forall (m :: * -> *) a. Monad m => a -> m a
return Rectangle
o
getRectangleX1 :: MonadIO m => Rectangle -> m Double
getRectangleX1 :: forall (m :: * -> *). MonadIO m => Rectangle -> m Double
getRectangleX1 Rectangle
s = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ Rectangle -> (Ptr Rectangle -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Rectangle
s ((Ptr Rectangle -> IO Double) -> IO Double)
-> (Ptr Rectangle -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr Rectangle
ptr Ptr Rectangle -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setRectangleX1 :: MonadIO m => Rectangle -> Double -> m ()
setRectangleX1 :: forall (m :: * -> *). MonadIO m => Rectangle -> Double -> m ()
setRectangleX1 Rectangle
s Double
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Rectangle -> (Ptr Rectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Rectangle
s ((Ptr Rectangle -> IO ()) -> IO ())
-> (Ptr Rectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Rectangle
ptr Ptr Rectangle -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data RectangleX1FieldInfo
instance AttrInfo RectangleX1FieldInfo where
type AttrBaseTypeConstraint RectangleX1FieldInfo = (~) Rectangle
type AttrAllowedOps RectangleX1FieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RectangleX1FieldInfo = (~) Double
type AttrTransferTypeConstraint RectangleX1FieldInfo = (~)Double
type AttrTransferType RectangleX1FieldInfo = Double
type AttrGetType RectangleX1FieldInfo = Double
type AttrLabel RectangleX1FieldInfo = "x1"
type AttrOrigin RectangleX1FieldInfo = Rectangle
attrGet = getRectangleX1
attrSet = setRectangleX1
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.Rectangle.x1"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-Rectangle.html#g:attr:x1"
})
rectangle_x1 :: AttrLabelProxy "x1"
rectangle_x1 = AttrLabelProxy
#endif
getRectangleY1 :: MonadIO m => Rectangle -> m Double
getRectangleY1 :: forall (m :: * -> *). MonadIO m => Rectangle -> m Double
getRectangleY1 Rectangle
s = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ Rectangle -> (Ptr Rectangle -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Rectangle
s ((Ptr Rectangle -> IO Double) -> IO Double)
-> (Ptr Rectangle -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr Rectangle
ptr Ptr Rectangle -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setRectangleY1 :: MonadIO m => Rectangle -> Double -> m ()
setRectangleY1 :: forall (m :: * -> *). MonadIO m => Rectangle -> Double -> m ()
setRectangleY1 Rectangle
s Double
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Rectangle -> (Ptr Rectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Rectangle
s ((Ptr Rectangle -> IO ()) -> IO ())
-> (Ptr Rectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Rectangle
ptr Ptr Rectangle -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data RectangleY1FieldInfo
instance AttrInfo RectangleY1FieldInfo where
type AttrBaseTypeConstraint RectangleY1FieldInfo = (~) Rectangle
type AttrAllowedOps RectangleY1FieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RectangleY1FieldInfo = (~) Double
type AttrTransferTypeConstraint RectangleY1FieldInfo = (~)Double
type AttrTransferType RectangleY1FieldInfo = Double
type AttrGetType RectangleY1FieldInfo = Double
type AttrLabel RectangleY1FieldInfo = "y1"
type AttrOrigin RectangleY1FieldInfo = Rectangle
attrGet = getRectangleY1
attrSet = setRectangleY1
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.Rectangle.y1"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-Rectangle.html#g:attr:y1"
})
rectangle_y1 :: AttrLabelProxy "y1"
rectangle_y1 = AttrLabelProxy
#endif
getRectangleX2 :: MonadIO m => Rectangle -> m Double
getRectangleX2 :: forall (m :: * -> *). MonadIO m => Rectangle -> m Double
getRectangleX2 Rectangle
s = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ Rectangle -> (Ptr Rectangle -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Rectangle
s ((Ptr Rectangle -> IO Double) -> IO Double)
-> (Ptr Rectangle -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr Rectangle
ptr Ptr Rectangle -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setRectangleX2 :: MonadIO m => Rectangle -> Double -> m ()
setRectangleX2 :: forall (m :: * -> *). MonadIO m => Rectangle -> Double -> m ()
setRectangleX2 Rectangle
s Double
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Rectangle -> (Ptr Rectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Rectangle
s ((Ptr Rectangle -> IO ()) -> IO ())
-> (Ptr Rectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Rectangle
ptr Ptr Rectangle -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data RectangleX2FieldInfo
instance AttrInfo RectangleX2FieldInfo where
type AttrBaseTypeConstraint RectangleX2FieldInfo = (~) Rectangle
type AttrAllowedOps RectangleX2FieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RectangleX2FieldInfo = (~) Double
type AttrTransferTypeConstraint RectangleX2FieldInfo = (~)Double
type AttrTransferType RectangleX2FieldInfo = Double
type AttrGetType RectangleX2FieldInfo = Double
type AttrLabel RectangleX2FieldInfo = "x2"
type AttrOrigin RectangleX2FieldInfo = Rectangle
attrGet = getRectangleX2
attrSet = setRectangleX2
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.Rectangle.x2"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-Rectangle.html#g:attr:x2"
})
rectangle_x2 :: AttrLabelProxy "x2"
rectangle_x2 = AttrLabelProxy
#endif
getRectangleY2 :: MonadIO m => Rectangle -> m Double
getRectangleY2 :: forall (m :: * -> *). MonadIO m => Rectangle -> m Double
getRectangleY2 Rectangle
s = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ Rectangle -> (Ptr Rectangle -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Rectangle
s ((Ptr Rectangle -> IO Double) -> IO Double)
-> (Ptr Rectangle -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr Rectangle
ptr Ptr Rectangle -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setRectangleY2 :: MonadIO m => Rectangle -> Double -> m ()
setRectangleY2 :: forall (m :: * -> *). MonadIO m => Rectangle -> Double -> m ()
setRectangleY2 Rectangle
s Double
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Rectangle -> (Ptr Rectangle -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Rectangle
s ((Ptr Rectangle -> IO ()) -> IO ())
-> (Ptr Rectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Rectangle
ptr Ptr Rectangle -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data RectangleY2FieldInfo
instance AttrInfo RectangleY2FieldInfo where
type AttrBaseTypeConstraint RectangleY2FieldInfo = (~) Rectangle
type AttrAllowedOps RectangleY2FieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RectangleY2FieldInfo = (~) Double
type AttrTransferTypeConstraint RectangleY2FieldInfo = (~)Double
type AttrTransferType RectangleY2FieldInfo = Double
type AttrGetType RectangleY2FieldInfo = Double
type AttrLabel RectangleY2FieldInfo = "y2"
type AttrOrigin RectangleY2FieldInfo = Rectangle
attrGet = getRectangleY2
attrSet = setRectangleY2
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.Rectangle.y2"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-Rectangle.html#g:attr:y2"
})
rectangle_y2 :: AttrLabelProxy "y2"
rectangle_y2 = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Rectangle
type instance O.AttributeList Rectangle = RectangleAttributeList
type RectangleAttributeList = ('[ '("x1", RectangleX1FieldInfo), '("y1", RectangleY1FieldInfo), '("x2", RectangleX2FieldInfo), '("y2", RectangleY2FieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "poppler_rectangle_new" poppler_rectangle_new ::
IO (Ptr Rectangle)
rectangleNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Rectangle
rectangleNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Rectangle
rectangleNew = IO Rectangle -> m Rectangle
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Rectangle -> m Rectangle) -> IO Rectangle -> m Rectangle
forall a b. (a -> b) -> a -> b
$ do
Ptr Rectangle
result <- IO (Ptr Rectangle)
poppler_rectangle_new
Text -> Ptr Rectangle -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"rectangleNew" Ptr Rectangle
result
Rectangle
result' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Rectangle) Ptr Rectangle
result
Rectangle -> IO Rectangle
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Rectangle
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "poppler_rectangle_copy" poppler_rectangle_copy ::
Ptr Rectangle ->
IO (Ptr Rectangle)
rectangleCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
Rectangle
-> m Rectangle
rectangleCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Rectangle -> m Rectangle
rectangleCopy Rectangle
rectangle = IO Rectangle -> m Rectangle
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Rectangle -> m Rectangle) -> IO Rectangle -> m Rectangle
forall a b. (a -> b) -> a -> b
$ do
Ptr Rectangle
rectangle' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
rectangle
Ptr Rectangle
result <- Ptr Rectangle -> IO (Ptr Rectangle)
poppler_rectangle_copy Ptr Rectangle
rectangle'
Text -> Ptr Rectangle -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"rectangleCopy" Ptr Rectangle
result
Rectangle
result' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Rectangle) Ptr Rectangle
result
Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
rectangle
Rectangle -> IO Rectangle
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Rectangle
result'
#if defined(ENABLE_OVERLOADING)
data RectangleCopyMethodInfo
instance (signature ~ (m Rectangle), MonadIO m) => O.OverloadedMethod RectangleCopyMethodInfo Rectangle signature where
overloadedMethod = rectangleCopy
instance O.OverloadedMethodInfo RectangleCopyMethodInfo Rectangle where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.Rectangle.rectangleCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-Rectangle.html#v:rectangleCopy"
})
#endif
foreign import ccall "poppler_rectangle_find_get_ignored_hyphen" poppler_rectangle_find_get_ignored_hyphen ::
Ptr Rectangle ->
IO CInt
rectangleFindGetIgnoredHyphen ::
(B.CallStack.HasCallStack, MonadIO m) =>
Rectangle
-> m Bool
rectangleFindGetIgnoredHyphen :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Rectangle -> m Bool
rectangleFindGetIgnoredHyphen Rectangle
rectangle = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Rectangle
rectangle' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
rectangle
CInt
result <- Ptr Rectangle -> IO CInt
poppler_rectangle_find_get_ignored_hyphen Ptr Rectangle
rectangle'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
rectangle
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data RectangleFindGetIgnoredHyphenMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod RectangleFindGetIgnoredHyphenMethodInfo Rectangle signature where
overloadedMethod = rectangleFindGetIgnoredHyphen
instance O.OverloadedMethodInfo RectangleFindGetIgnoredHyphenMethodInfo Rectangle where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.Rectangle.rectangleFindGetIgnoredHyphen",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-Rectangle.html#v:rectangleFindGetIgnoredHyphen"
})
#endif
foreign import ccall "poppler_rectangle_find_get_match_continued" poppler_rectangle_find_get_match_continued ::
Ptr Rectangle ->
IO CInt
rectangleFindGetMatchContinued ::
(B.CallStack.HasCallStack, MonadIO m) =>
Rectangle
-> m Bool
rectangleFindGetMatchContinued :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Rectangle -> m Bool
rectangleFindGetMatchContinued Rectangle
rectangle = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Rectangle
rectangle' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
rectangle
CInt
result <- Ptr Rectangle -> IO CInt
poppler_rectangle_find_get_match_continued Ptr Rectangle
rectangle'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
rectangle
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data RectangleFindGetMatchContinuedMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod RectangleFindGetMatchContinuedMethodInfo Rectangle signature where
overloadedMethod = rectangleFindGetMatchContinued
instance O.OverloadedMethodInfo RectangleFindGetMatchContinuedMethodInfo Rectangle where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.Rectangle.rectangleFindGetMatchContinued",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-Rectangle.html#v:rectangleFindGetMatchContinued"
})
#endif
foreign import ccall "poppler_rectangle_free" poppler_rectangle_free ::
Ptr Rectangle ->
IO ()
rectangleFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
Rectangle
-> m ()
rectangleFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Rectangle -> m ()
rectangleFree Rectangle
rectangle = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Rectangle
rectangle' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
rectangle
Ptr Rectangle -> IO ()
poppler_rectangle_free Ptr Rectangle
rectangle'
Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
rectangle
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data RectangleFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod RectangleFreeMethodInfo Rectangle signature where
overloadedMethod = rectangleFree
instance O.OverloadedMethodInfo RectangleFreeMethodInfo Rectangle where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Poppler.Structs.Rectangle.rectangleFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-poppler-0.18.27/docs/GI-Poppler-Structs-Rectangle.html#v:rectangleFree"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveRectangleMethod (t :: Symbol) (o :: *) :: * where
ResolveRectangleMethod "copy" o = RectangleCopyMethodInfo
ResolveRectangleMethod "findGetIgnoredHyphen" o = RectangleFindGetIgnoredHyphenMethodInfo
ResolveRectangleMethod "findGetMatchContinued" o = RectangleFindGetMatchContinuedMethodInfo
ResolveRectangleMethod "free" o = RectangleFreeMethodInfo
ResolveRectangleMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRectangleMethod t Rectangle, O.OverloadedMethod info Rectangle p) => OL.IsLabel t (Rectangle -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveRectangleMethod t Rectangle, O.OverloadedMethod info Rectangle p, R.HasField t Rectangle p) => R.HasField t Rectangle p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveRectangleMethod t Rectangle, O.OverloadedMethodInfo info Rectangle) => OL.IsLabel t (O.MethodProxy info Rectangle) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif