{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
  TypeSynonymInstances #-}
module HROOT.Core.TAttText.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Core.TAttText.RawType
import STD.Deletable.Interface

class (IDeletable a) => ITAttText a where
        getTextAlign :: () => a -> IO CShort
        
        getTextAngle :: () => a -> IO CFloat
        
        getTextColor :: () => a -> IO CShort
        
        getTextFont :: () => a -> IO CShort
        
        getTextSize :: () => a -> IO CFloat
        
        resetAttText :: (Castable c0 CString) => a -> c0 -> IO ()
        
        setTextAttributes :: () => a -> IO ()
        
        setTextAlign :: () => a -> CShort -> IO ()
        
        setTextAngle :: () => a -> CFloat -> IO ()
        
        setTextColor :: () => a -> CInt -> IO ()
        
        setTextFont :: () => a -> CShort -> IO ()
        
        setTextSize :: () => a -> CFloat -> IO ()
        
        setTextSizePixels :: () => a -> CInt -> IO ()

upcastTAttText :: forall a . (FPtr a, ITAttText a) => a -> TAttText
upcastTAttText :: forall a. (FPtr a, ITAttText a) => a -> TAttText
upcastTAttText 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 RawTAttText
fh2 :: Ptr RawTAttText = Ptr (Raw a) -> Ptr RawTAttText
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw a)
fh
      in Ptr (Raw TAttText) -> TAttText
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw TAttText)
Ptr RawTAttText
fh2

downcastTAttText ::
                 forall a . (FPtr a, ITAttText a) => TAttText -> a
downcastTAttText :: forall a. (FPtr a, ITAttText a) => TAttText -> a
downcastTAttText TAttText
h
  = let fh :: Ptr (Raw TAttText)
fh = TAttText -> Ptr (Raw TAttText)
forall a. FPtr a => a -> Ptr (Raw a)
get_fptr TAttText
h
        fh2 :: Ptr (Raw a)
fh2 = Ptr RawTAttText -> Ptr (Raw a)
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw TAttText)
Ptr RawTAttText
fh
      in Ptr (Raw a) -> a
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw a)
fh2