{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module OGDF.GraphAttributes.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import OGDF.GraphAttributes.RawType import OGDF.DRect.RawType import STD.Deletable.Interface class (IDeletable a) => IGraphAttributes a where boundingBox :: () => a -> IO DRect upcastGraphAttributes :: forall a . (FPtr a, IGraphAttributes a) => a -> GraphAttributes upcastGraphAttributes :: forall a. (FPtr a, IGraphAttributes a) => a -> GraphAttributes upcastGraphAttributes a h = let fh :: Ptr (Raw a) fh = a -> Ptr (Raw a) forall a. FPtr a => a -> Ptr (Raw a) get_fptr a h Ptr RawGraphAttributes fh2 :: Ptr RawGraphAttributes = Ptr (Raw a) -> Ptr RawGraphAttributes forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw GraphAttributes) -> GraphAttributes forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw GraphAttributes) Ptr RawGraphAttributes fh2 downcastGraphAttributes :: forall a . (FPtr a, IGraphAttributes a) => GraphAttributes -> a downcastGraphAttributes :: forall a. (FPtr a, IGraphAttributes a) => GraphAttributes -> a downcastGraphAttributes GraphAttributes h = let fh :: Ptr (Raw GraphAttributes) fh = GraphAttributes -> Ptr (Raw GraphAttributes) forall a. FPtr a => a -> Ptr (Raw a) get_fptr GraphAttributes h fh2 :: Ptr (Raw a) fh2 = Ptr RawGraphAttributes -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw GraphAttributes) Ptr RawGraphAttributes fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2