{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances, EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-} -- module HROOT.Class.Interface where module HROOT.Core.TAttText.Interface where import Data.Word import Foreign.C import Foreign.Ptr import Foreign.ForeignPtr import FFICXX.Runtime.Cast import HROOT.Core.TAttText.RawType import HROOT.Core.Deletable.Interface ---- ============ ---- class (IDeletable a) => ITAttText a where getTextAlign :: a -> IO CInt getTextAngle :: a -> IO CDouble getTextColor :: a -> IO CInt getTextFont :: a -> IO CInt getTextSize :: a -> IO CDouble resetAttText :: a -> CString -> IO () setTextAttributes :: a -> IO () setTextAlign :: a -> CInt -> IO () setTextAngle :: a -> CDouble -> IO () setTextColor :: a -> CInt -> IO () setTextFont :: a -> CInt -> IO () setTextSize :: a -> CDouble -> IO () setTextSizePixels :: a -> CInt -> IO () instance Existable TAttText where data Exist TAttText = forall a. (FPtr a, ITAttText a) => ETAttText a upcastTAttText :: (FPtr a, ITAttText a) => a -> TAttText upcastTAttText h = let fh = get_fptr h fh2 :: ForeignPtr RawTAttText = castForeignPtr fh in cast_fptr_to_obj fh2 downcastTAttText :: (FPtr a, ITAttText a) => TAttText -> a downcastTAttText h = let fh = get_fptr h fh2 = castForeignPtr fh in cast_fptr_to_obj fh2