#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Vte.Structs.CharAttributes
(
CharAttributes(..) ,
newZeroCharAttributes ,
noCharAttributes ,
) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
newtype CharAttributes = CharAttributes (ManagedPtr CharAttributes)
instance WrappedPtr CharAttributes where
wrappedPtrCalloc = callocBytes 40
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 40 >=> wrapPtr CharAttributes)
wrappedPtrFree = Just ptr_to_g_free
newZeroCharAttributes :: MonadIO m => m CharAttributes
newZeroCharAttributes = liftIO $ wrappedPtrCalloc >>= wrapPtr CharAttributes
instance tag ~ 'AttrSet => Constructible CharAttributes tag where
new _ attrs = do
o <- newZeroCharAttributes
GI.Attributes.set o attrs
return o
noCharAttributes :: Maybe CharAttributes
noCharAttributes = Nothing
#if ENABLE_OVERLOADING
instance O.HasAttributeList CharAttributes
type instance O.AttributeList CharAttributes = CharAttributesAttributeList
type CharAttributesAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
type family ResolveCharAttributesMethod (t :: Symbol) (o :: *) :: * where
ResolveCharAttributesMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveCharAttributesMethod t CharAttributes, O.MethodInfo info CharAttributes p) => O.IsLabelProxy t (CharAttributes -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveCharAttributesMethod t CharAttributes, O.MethodInfo info CharAttributes p) => O.IsLabel t (CharAttributes -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#endif