{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances, EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-} -- module HROOT.Class.Interface where module HROOT.Class.TButton.Interface where import Data.Word import Foreign.ForeignPtr import HROOT.TypeCast import HROOT.Class.TButton.RawType import HROOT.Class.TPad.Interface import HROOT.Class.TAttText.Interface class (ITPad a,ITAttText a) => ITButton a where instance Existable TButton where data Exist TButton = forall a. (FPtr a, ITButton a) => ETButton a upcastTButton :: (FPtr a, ITButton a) => a -> TButton upcastTButton h = let fh = get_fptr h fh2 :: ForeignPtr RawTButton = castForeignPtr fh in cast_fptr_to_obj fh2